gridview

Select Particular Row In Gridview

I am using a GridView and a DataTable to fill the grid. I am also using custom paging. Using the search feature of the GridView, I provided a textbox on each field for searching the records in the grid. If that record is found, that record gets selected. I'm having an issue with paging where when I loop through the rows of the grid, t...

Reset scroll position after Async postback - ASP.NET

What is the best way to reset the scroll position to the top of page after the an asynchronous postback? The asynchronous postback is initiated from a ASP.NET GridView CommandField column and the ASP.NET update panel Update method is called in the GridView OnRowCommand. My current application is an ASP.NET 3.5 web site. EDIT: I ha...

Sorting a gridview when databinding a collection or list of objects

I am attemping to have my gridview be: bound by a List in code-behind. I am using my own custom BOL. no datasource object on the html page sortable on each column that I choose. The SortExpressions are all set correctly. The resulting error message: The GridView 'myGridView' fired event Sorting which wasn't handled. How can I have...

how to make a gridview-like list view in VB.NET 2005

What control should I use to create a grid like a ListView or Excel grid? ...

Binding Generic List Array to GridView

Hi I have a List which returns an array of "Question". My question is how can I bind this to a grid view? When I try to call Question.Ordinal I get that it does not exist in the data source. I am using the following code: GridView1.DataSource = myList.GetQ(); GrdiView1.DataBind(); myList.GetQ() returns a List which is an array of "...

Binding dropdown list in a gridview edit item template

i can bind the dropdownlist in the edit item template. The drop down list is having null values. protected void grdDevelopment_RowDataBound(object sender, GridViewRowEventArgs e) { DropDownList drpBuildServers = new DropDownList(); if (grdDevelopment.EditIndex == e.Row.RowIndex) { drpBuildServers = (DropDown...

Need an Excel-like grid in VB.NET

I am designing a program in VB.NET that can use an Excel-like grid. I want the grid to be able to handle merging and unmerging of cells. Suggestions? ...

GridView ASP.NET Sorting

I have an ASP.NET GridView that just won't sort! I'm sure that I am missing something pretty obvious. Page.aspx <asp:GridView ID="TimeAwayGridView" runat="server" AutoGenerateSelectButton="False" AutoGenerateEditButton="False" AutoGenerateDeleteButton="False" AllowPaging="False" AllowSorting="True" CssClass="gridview" OnSortin...

WPF Gridview Zindex

I have a datepicker control that I am using to set a date field in a gridview control, my datepicker shows a date and a button to display a calendar you can use to pick a date. This works great on its own but when I add this to a gridview the calendar pops up and the columns and rows cover up parts of the calendar. Setting the ZIndex fo...

Grid View-colour

Hi My grid view is showing the details as per the search button.But I want the latest Date row ,to be colured to help the users identify the latest one.Can you please help? Iam using ASP.NET,VB.NET,SQL-2005 ...

Nested Gridview in Repeater control

Hi I've a gridview control nested within a repeater control the repeater control is databound on pageload and in the itemdatabound event I look for the gridview control If e.Item.ItemType = ListItemType.Item Then Dim gvw As GridView = DirectCast(e.Item.Controls(3), GridView) gvw.DataSource = GetData() gvw.DataBind() End ...

How can I store a GridView cell value to a session variable?

How would I store the value of a GridView's selected rows to a session variable? ...

How do you bind a gridview column to a subclass value?

I have a ASP.net gridview that I am trying bind to. My DataSource has a collection and 2 of the columns I am binding to are part of a subclass. My DataSource has a subclass called Staff the contains the staff information. The boundfields SurveyID and NumberOfExceptions bind fine, but the Staff.Name and Staff.Office cannot be bound. a...

How can I add a new DB row and then edit it using a GridView control?

In my application I am using a grid view control. I am creating a new empty row in my grid view control using the following code: string co = ConfigurationSettings.AppSettings["MyLogin"]; SqlConnection connection = new SqlConnection(co); connection.Open(); string sql = "insert into TeamMember_tab...

How do I smoothly update a GridView by updating the bound DataTable in C#?

Hi, I have a GridView who's DataSource is set to a DataTable. The DataTable is updated by some backend logic every few seconds, at which point a delegate is called to refresh GridView. Currently I am simply resetting the DataSource, but that causes a problem - it interrupts any ongoing edits in the grid view and makes the selection 'ju...

How can I hide the header of a listview WPF?

I want to be able to hide the header at the top of each grid column in a WPF ListView. This is the XAML for my ListView: <Window x:Class="ListViewTest.Test0.ListViewTest" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Title="Empty ListView Grid" Heigh...

Wildcard in query for ASP.NET GridView

I am using GridView in ASP.NET 2.0. I am want to show the details from 3 tables (SQL2005) in the GridView per my search crieteria (Name of Visitor,Passport Number,Name of Company). It is working, but I want to use a wildcard for searching by first letter of "Name of Visitor". I have my code in the QueryBuilder in GridView (using Configur...

How to skin an ASP.NET GridView column?

The idea is simple - I want all Command columns in my GridViews to have a specific button image for, say, the "Delete" button. Sounds like a job for skins, but I cannot find the right syntax for that... ...

problem in getting cell value from grid view

I want to get the cell value from a grid view. I am using the following code but it produces an error. Code: cmd.Parameters.Add("@ProjectCode", SqlDbType.VarChar).Value = ((GridView)TeamMemberGrid.Rows[e.RowIndex].Cells[1].Controls[0]).ToString(); Note: @ProjectCode is one of the fields in the grid view. ...

Moving Selected rows Between Gridviews

Hi all, I currently have Gridview1 which gets it's data from a database and displays a list of people.I also have a Gridview2 which is initially blank. I would like to add the functionality of adding/removing rows to gridview2 from gridview1. I've added a checkbox column to gridview1 to allow users to select the records they'd like to ...