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
May 2008
June 2008
all groups > asp.net datagrid control > march 2006

Filter by week: 1 2 3 4 5

checkbox bind with 0 = checked?
Posted by Maarten at 3/31/2006 11:05:42 PM
I have a bound-checkbox. The database value = 0 but the checkbox got checked? Why is that? What value should be in the database for being not checked then? tia ...more >>


Rebind data source in GridView
Posted by Andrei Varanovich at 3/31/2006 8:38:25 PM
Hello all! I have a button on a form alongside a GridView with ObjectDataSource, and the effect of the button need to be the modifying the underlying database (it changes some cells' values in the objects being displayed by the GridView). How can I rebind the data in code? For now I see ...more >>

datagrid sort string (is representation of date) as a DATE
Posted by cindy at 3/30/2006 4:51:01 PM
I have a datatable with column datetime datatype from sql I c# datagrid on webform with bound column to display values I need to sort on values. I sql the field value is a string so I make it pass the is string a valid date test before I dump it into dc = new DataColumn("reviseddate",Type.Ge...more >>

datagrid and checkbox inasp.net
Posted by Jason at 3/29/2006 6:22:26 PM
Hi, all, I have an asp.net web page, which has a datagrid to present data to users, also has checkbox in each row in the datagrid. Here is my question: when user checked a checkbox, or several checkboxes in the datagrid, then they click 'save' button. the page refreshed, and they want selected...more >>

Extending Gridview to handle grouping.
Posted by andrew at 3/29/2006 3:17:06 PM
I've been working on a new control that inherits gridview. The properties are extended to take a grouping parameter. When the gridview binds it is suppose to sort on the grouped field name and add rows whenever the value of this field changes giving the apperance of grouping. What i have works...more >>

how to specify data binding in code behind
Posted by alexis.rzewski NO[at]SPAM gmail.com at 3/29/2006 8:45:19 AM
I would like to do without the HTML Text='<%# DataBinder.Eval(Container.DataItem, "Count") %>' and specify the data binding in C# or VB code. Is there a way to do this ? ...more >>

Datagrid within a datagrid?
Posted by et at 3/26/2006 9:51:17 AM
Does anyone know how to do a datagrid within a datagrid? I would think you could put one in a template column, just like you would a label or textbox, but I get an entirely blank grid. Thank you for your help. ...more >>

Adding Dynamic Controls to a DataGrid for use with the built in DataGrid Edit/Update functionality
Posted by davidjgonzalez NO[at]SPAM gmail.com at 3/24/2006 2:11:25 PM
(VS 2003, .NET 1.1) I am trying to add dynamic controls to the cells of an Edit Row in a DataGrid and am having a terrible time. I cannot for the life of me get the values from the dynamic controls after the page posts back on the DataGrid UpdateRow event. When I create a dynamic control (the...more >>



GridView and paging
Posted by David at 3/24/2006 11:50:21 AM
How can I recognize when only clicking a page number on the footer of a GridView? I have an ASP.Net 2.0 page that is used to search for records. The search textbox is at the top and I enter text to search for. I have VB code at the beginning of the aspx page that sets the SELECT statement base...more >>

Problem with editing datagrid <EditItemTemplate>
Posted by tjonsek NO[at]SPAM phenom-biz.com at 3/24/2006 6:51:49 AM
I am working on code that will allow users to update data within the datagrid. I have come across a few problems, some of them I have been able to work out, but this last one is giving me trouble. When a user clicks the edit button, I get an error 'Specified Cast Not Valid'. The code that gen...more >>

Format Time in DataGrid
Posted by crjunk NO[at]SPAM earthlink.net at 3/22/2006 11:54:11 AM
I'm working with a table that has a field that stores time values as a string. The time values are in military time (such as 13:30). How can I have 13:30 displayed as 01:30 PM in my datagrid? Can I use DataFormatString to achieve this? Thanks, CR Junk ...more >>

Displaying &L in a datagrid
Posted by md at 3/22/2006 9:55:54 AM
Hi all - I have a VS.Net 2003 web app that is used at my employer to gain accesss to a password database. When the password page is loaded a server is selected in a listbox and the passwords for that server are displayed in a datagrid. Recently someone entered a password of D&Lxxxxx. When...more >>

Programmatically databinding textboxes to a datagrid
Posted by Scott McNair at 3/22/2006 9:54:21 AM
Hi, I've got a dataset that I'm generating through a webservice. I would like to instantiate one of the tables in the set as a grid. Some of the columns in that grid should be editable via a textbox control, and I'd also like to have a checkbox to mark rows for delete, and some button con...more >>

Nested Datagrids Events Question
Posted by seal at 3/22/2006 8:47:30 AM
I was struggling with a nested control event not firing and I found the culprit to be the following line in my code behind, e.Item.Cells[2].Controls.Add(MyNewDatagrid); Is there a way to add a datagrid this way, and still get the events? Thanks ...more >>

Format datagrid
Posted by Peter Afonin at 3/21/2006 6:44:49 PM
Hello, I have a datagrid with 17 columns - too many for one page. Is there a way to format the datagrid so the columns are located in two rows instead of one, or something like this? I would appreciate your advice. Thank you, -- Peter Afonin ...more >>

replace a value with a graphic/icon in a datagrid population??
Posted by simon at 3/21/2006 12:26:06 AM
hello, i am displaying a dataset in a datagrid, for one of the values being displayed it either comes back as a 1 or a 0, which is currently bound to a column in the datagrid what i'd like to do is that if the value equals 1, replace that value with a small icon image. if it equals 0 then have ...more >>

How to get rid of horizontal and vertical lines in DataGrid
Posted by zhivago at 3/20/2006 7:39:47 AM
Does anyone know how to get rid of horzontal and vertical lines in DataGrid? Normally you would code ShowGridlLines ="None" in the asp web control, but that doesn't work for me. Thanks, Razza ...more >>

DropDownList in DataGrid ItemTemplate
Posted by Elroyskimms at 3/19/2006 10:33:27 PM
I've been searching for an example of this and I've seen several postings pointing to other web pages, but all of those web pages have since been removed... or they post pages and pages of sample code and my eyes can't take it any more... or you could just call me lazy; what ever works for you, ...more >>

Format Date in DataGrid
Posted by crjunk NO[at]SPAM earthlink.net at 3/17/2006 9:34:07 AM
In my table, I have a filed named Out_Date that has its DataType set to STRING. When data for this field is displayed in the DataGrid, I need it to be in the following format: MM/dd/yyyy I have tried using the following, but it did not work. <asp:BoundColumn DataField="Out_Date" HeaderText="OU...more >>

Custom paging in GridView
Posted by Dr.Gigabit at 3/17/2006 2:27:06 AM
Hello all, I try to implement custom paging for GridView and have the following problem. I use TextBox field to display the current page. <PagerTemplate> ..... <asp:TextBox ID="CurrentPageNumber" Width="15px" runat="server" /> of <%= GridView1.PageCount %> ...more >>

Update button
Posted by Deepa Kesavalu at 3/16/2006 6:50:13 PM
I have a template column in the datagrid. And then dynamically creating a checkbox in the itemcreated event of the datagrid in that template column only when the row is in the edit mode. The checkbox is created based on a certain conditon. Now, when the user clicks on 'Update' button , i wa...more >>

Access Rows of a datagrid
Posted by scott.loomis NO[at]SPAM gmail.com at 3/16/2006 1:01:01 PM
I am not sure if this is the best place to post this. I have an ASP.NET Datagrid control that I am using. I have been trying to figure out if it is possible to select a row client side on page load, i know about the datagrid selectedindex, but that does not provide me with the functionality I...more >>

Can't use datagrid pager with javascript onbeforeupdate event
Posted by James at 3/14/2006 5:04:18 PM
Hi The standard datagrid pager is rendered as a hyperlink e.g. <a href="javascript:__doPostBack('...', '...')"> Apparently use of this javascript pseudo-protocol is bad practice, and it was introduced to allow people to generate pages using javascript. So of course it is all over ASP.Net an...more >>

GridView and DDL
Posted by Mike Robbins at 3/14/2006 12:20:42 PM
I'm trying to find an article that will help me use a dropdownlist in a GridView and have the selecteditem set appropriately in the ddl. <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" DataSourceID="odsRooms"> <Columns> <as...more >>

URGENT: Template Control always show empty value
Posted by Antonio at 3/14/2006 12:00:00 AM
Hi, I have been spending two full days to get this problem resolved but failed. After successfully finding the label control, the Label.Text is always having an empty string. But when the DataGrid finish rendered, all the values are there, why??? Please refer to my code below: Private Su...more >>

Cant get user-entered values in GridView
Posted by Arthur Dent at 3/13/2006 2:41:58 PM
Okay, this should be really simple, and maybe im just missing something totally obvious, but i cannot figure this out. I did this all the time in ASP.NET 1.1 with no problems. I have a GridView which has a column that is a template column, and has a textbox in the itemtemplate. There is one...more >>

button in footer doesnt work?
Posted by Arthur Dent at 3/13/2006 12:49:57 PM
I have a datagrid, with a save button in the footer. I gave the footer a commandname and expected i could use the grid_RowCommand event to trap this button click. However, while the page does actually post back, the RowCommand event never gets called. Not only that, but clicking the button t...more >>

DataGrid And Positioning
Posted by Shaqman at 3/12/2006 2:44:13 PM
Simple problem. I have a datagrid positioned one below another. Problem is this first grid rows when populated runs into the second grid. Is the way to position the 2nd grid so that it position is dynamic from the first grid.. Thanks ...more >>

Change Control Property in Header
Posted by SEGACO at 3/10/2006 1:16:31 PM
Hi, I have a datagrid with a checkbox control in it's header, but I need to change it from runtime (to check or uncheck it). It's that possible. Thanks....more >>

Custom Paging in asp.net Datgrid Using Sql
Posted by Dev Geek Raj at 3/9/2006 11:25:16 PM
All you devgeeks on .net, Can you please help me on this. I have a table ( tbl_emp).I allow users to search the record on this table. I have three filter conditions Fname,Lname,Title.When user enters these values into Textboxes on Asp.net page and click on search Button. I Show the results...more >>

GridView, DataSource, RowUpdating, e.OldValues and e.NewValues collections
Posted by Andrew Robinson at 3/9/2006 9:06:03 PM
A friend asked me to help him out on this and frankly it has me completely stumped as well. I have a GridView control and use old style manual binding with a DataSource property and invoke the DataBind() method. If you don't use one of the Data Source controls, you are required to handle th...more >>

Editing a data row
Posted by David Thielen at 3/9/2006 4:26:26 PM
Hi; I have a table where the data in each row has several columns where depending in if column A is 0 or 1, then they need to fill out columns A, B, C, & D or X, Y, and Z. And for A-D, they actually need to fill out B & C or D. Can this be handled by DetailsView? If so, how (not specifi...more >>

How to create a row in the database?
Posted by David Thielen at 3/9/2006 4:25:27 PM
Hi; The video at http://msdn.microsoft.com/asp.net/learning/learn/newtodevelopment/default.aspx shows how to view, edit, & delete rows in a dataset. But it doesn't show how to create a row. I have a form that the user fills out to create a row. Do I still have to access the database th...more >>

1 row many columns is gridview best choice?
Posted by Brenda Pasquarello at 3/7/2006 10:36:36 AM
I have 1 record with many fields of data per User id. I want to display the data down the page in two-three columns w/ labels. Is the Gridview the best choice for this? Or is that just best choice when dealing with multiple records? Is there another control I should consider, or just cu...more >>

Getting Data from a Row
Posted by Joe Reiss at 3/7/2006 8:20:03 AM
Hi All, Using VS2005, C# I'm sure this has been asked a million times. How does one get data from a selected row in a gridview. The following only seems to get me the datakey data: myView.SelectedRow.Cells[x].Text; I want the actual data in the cell. This would seem tobe a trivial...more >>

Confusion regarding nested datagrid - classic problem of persistence
Posted by strangeboy at 3/7/2006 8:17:01 AM
All: Let me first say that I've researched my problem, but I have spent way too much time (~1.5 weeks), and finally am reaching out to the community for help. Here's the problem: I successfully have a nested datagrid showing (typical master/detail arrangement) using a dynamically created da...more >>

Client callbacks
Posted by Papanii Okai at 3/6/2006 11:09:30 PM
Hi Guys Quick question. Is it possible to use Asp.net 2.0 client callbacks to refresh/update a datalist/repeater data control without a complete page postback? --Papanii ...more >>

Cache or Session state throwing out of Memory Exception when using datagrid
Posted by Marisha at 3/2/2006 11:04:29 AM
Hi Guys, I have a question,what is the best way to preserve dataset in web application and how to use it correctly for web application. (Cache object,Session or Application state) I tested Session and Cache and both giving me out of memory exception when I'm dealing with datagrid with 900-9...more >>

Template Column...
Posted by Mike Andrews at 3/2/2006 10:33:39 AM
Guys, I've got a problem with a ASP.NET 1.1 Datagrid that I wanted to see if any of you had any suggestions or advice on how to correct. My original problem with the datagrid was that I had 4 pre-defined columns. However, due to a feature restriction I needed to make the first column invisi...more >>

Cache vs Session, Application state for datagrid
Posted by marina.sukhnev NO[at]SPAM thinknet.com at 3/2/2006 7:26:43 AM
Hi Guys, I have a question,what is the best way to preserve dataset in web application: Cache object,Session or Application state. >From perfomance,scalability point of view? Any ideas? Thanks, Marina ...more >>

ButtonColumn as Image?
Posted by TheDude5B at 3/2/2006 5:28:26 AM
I am using a ButtonColumn which is used to delete an item from the datagrid. Is it possible to use an image instead of just text for this ButtonControl? If this is not possible, then how would i change the code for this ButtonControl to work with an ASP reapeater instead. for example j...more >>

Custom DataGRidComboBoxStyle DataSource Problems
Posted by Richard Ryerson at 3/1/2006 8:15:43 PM
I have a general DataGridComboBoxColumn that I built using the Example in the .NET 2003 Combined Collection help file (that was a data time picker). I am able to assign a data source and display / value members so the ComboBox is data bound and that works, to a point. What generally works is t...more >>

Web Matrix 0.6 and GridView .NET 2.0
Posted by Yong Chen at 3/1/2006 6:04:59 PM
Hello, I use Web Matrix 0.6 with .NET 1.1 ( MxDataGrid ). How/can I use GridView control (.NET 2.0 ) ? TIA, MM ...more >>


DevelopmentNow Blog