Archived Months
June 2003
July 2003
August 2003
September 2003
October 2003
November 2003
December 2003
January 2004
February 2004
March 2004
April 2004
May 2004
June 2004
July 2004
August 2004
September 2004
October 2004
November 2004
December 2004
January 2005
February 2005
March 2005
April 2005
May 2005
June 2005
July 2005
August 2005
September 2005
October 2005
November 2005
December 2005
January 2006
February 2006
March 2006
April 2006
May 2006
June 2006
July 2006
August 2006
September 2006
October 2006
November 2006
December 2006
January 2007
February 2007
March 2007
April 2007
May 2007
June 2007
July 2007
August 2007
September 2007
October 2007
November 2007
December 2007
January 2008
February 2008
March 2008
April 2008
all groups > asp.net datagrid control > november 2006

Persistence DataGrid
Posted by Andrus at 11/24/2006 10:14:51 PM
I have a C# .NET 1.1 Winforms application. My users can customize its datagrids: change column width, height, font, colors etc. I want that DataGrid automatically saves and restores changed settings to/from isolated storage when form is running next time. Where to find sample code whi...more >>


Auto Scroll DataGrid?
Posted by Kenny at 11/23/2006 7:57:15 AM
i have a datagrid within div tags. the datagrid displays details about appointments past and present for current calendar month ordered by date. (worst case - a couple of hundred rows) The datagrid scrolls properly to show the rows that aren't on screen but i would also like to auto scroll the d...more >>

Formatting result from a database query
Posted by Mathias at 11/21/2006 7:40:42 PM
From my database query I get the following: Text Number Albert 12 Albert 14 Albert 16 Brian 20 Brian 21 Brian 22 Now I'd like to represent the data as: Albert 12 14 16 Brian 20 21 22 I've looked at repeaters, data sets, data readers but I can't figure out how to go about it. Pref...more >>

Hiding a column
Posted by dev648237923 at 11/17/2006 12:06:09 PM
I do my updating in the code-behind (long story). I need an ID field in my DtatGrid to pass to my Stored Proceedure but I do not want that column to show up on the screen. If I set the GridView column to Visible="false" then in the code behind when I need to retrieve the ID the below gives a...more >>

Which button was clicked and on which row?
Posted by Yossi at 11/17/2006 10:47:25 AM
I have GridView with several text columns and 2 buttons. How do I determine which button on which row was clicked. I am able to detect a button clicked if I set the CommandText to "Select". All I have to do is write an event handler for the SelectedIndexChanged event and I get to know on whic...more >>

Alert to confirm deletes in the new GridView control
Posted by dev648237923 at 11/17/2006 10:39:13 AM
I want to have an alert to confirm deletes in the GridView. I have seen posting for doing it in DataGrid but I can not get it to work in the new GridView. I tried in GridView1_RowCommand I tried something like: ((LinkButton)GridView1.SelectedRow.FindControl("lbDelete")).Attributes.Add( "onC...more >>

RowCancelingEdit and RowEditing take two mouse-clicks to work?
Posted by dev648237923 at 11/15/2006 10:29:49 AM
I have a simple GridView. I need to do the Select and Edit in the code behind because I have to change schema prefix in the sql statement depending on the current user. I have the data grid and I have event handlers for edit and cancel but an odd thing happes: I have to click the Edit link ...more >>

Determine Cell Index from Column Name
Posted by dev648237923 at 11/14/2006 2:21:28 PM
I have a gridview and I call RowDataBound to change the backcolor of a cell in the Status colomn based on the contents of a field. I do that below by specifying the column's index by number (4 on my grid) -- but I'd like to specify it by using the column's name ("Status" in my grid). How can ...more >>



Unwanted data injected into datagrid textbox
Posted by kingflux at 11/13/2006 6:48:48 AM
Hello, and thank you in advance for any help you can provide. Each line in our the datagrid control contains a product number, description, and a textbox for the user to enter a quantity-to-order. Users enter quantities (not necessarily on every line), click the Next button, and continue. S...more >>

how to get selectedvalue of radiobuttonlist in Javascript?
Posted by Arnold at 11/12/2006 1:16:03 PM
Hi, I need the SelectedValue of a radiobuttonlist in a Javascript variable. The radiobuttonlist is only used in a form for inputting data into a database. Before sending it to the database, i check the inputted values in Javascript. (By the way there is also a dropdownlist in the form, and...more >>

Sorting with datasource ArrayList
Posted by Martin Gregersen at 11/10/2006 11:49:04 AM
Hi everybody I have a GridView control where my datasource is an ArrayList, I would = like to be able to sort the grid, therefore I set the AllowSorting to = true, so far so good. The ArrayList consist of a collection of = Customer-objects, where the "Title" (a string) is the name of the = Cu...more >>

Programmatically cancel an update
Posted by dev648237923 at 11/6/2006 12:31:18 PM
Hi -- I have two gridviews -- one dependent on the other (ehen I select from GridView1 then GridView2 populates). Scenario: -Select a row in GridView1 -GridView2 populates with child rows -hit Edit in GridView2 -- GridView2 goes into Editing mode --so far OK -instead of hitting Update I j...more >>

asp:Label - how can I get the Text property?
Posted by Steve Hershoff at 11/3/2006 3:59:57 PM
I'm using VS 2003, and need to extract the text from an asp label in my code-behind file. The label is part of a DataList's ItemTemplate. I've noticed that in my ascx file (we're using User Controls here) I can't set the Text property in the opening tag when writing out the <asp:Label....<...more >>


DevelopmentNow Blog