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 > august 2004

Filter by week: 1 2 3 4 5

Textbox Font and Fontsize in Edit Mode
Posted by RockNRoll at 8/31/2004 5:31:35 PM
How do I change the textbox font and fontsize in Edit Mode? Thanks, -Dave ...more >>


DataGrid and css
Posted by MA at 8/31/2004 3:24:49 PM
Hi all! I have set my CssClass property to gridstyle in my grid. It looks like this: ..gridstyle { border-style: solid; border-width: 1px; border-color: Black; } But nothing happends when I use this. What am I doíng wrong?? /Marre ...more >>

Paging problem in VS.Net - datagrid disappears
Posted by Alan at 8/31/2004 2:01:02 PM
I have a datagrid in VS.Net showing numeric paging and the first page of data is displayed. Clicking on any other of the page numbers results in the datagrid disappearing - no error message, but the entire datagrid is gone. I have tried putting "AddHandler DataGrid1.PageIndexChanged, AddressOf D...more >>

Dependent DropDownLists
Posted by stephen at 8/31/2004 6:35:34 AM
I am having a problem with my datagrid. I have 2 edit columns containing DropDownLists, one dependent on another. Both lists are being populated from a sql database. Essentially, the first DropDownList contains a list of colors (i.e. Red, Blue, Green, etc) with the second DropDownList c...more >>

DataGrid Column sizing - Help
Posted by -Alex at 8/30/2004 8:57:33 PM
I have snipped the following code from an example only to find that it apparently doesn't work with regard to comlun sizing. I have been wrestling with this to no avail. The dataset is filled with the expected data but the size is wrong. Whenever I run with the code below numeric fields have...more >>

Postback for DataGrid Columns Added in Code Behind not firing.
Posted by landerud.pete NO[at]SPAM students.uwlax.edu at 8/30/2004 11:49:25 AM
I am trying to build a web custom control that displays a datagrid, so first off I have no designer where I can drag and drop a datagrid and then set properties from the user interface. I have to do everything from the code behind. Most of the code follows below. The problem is after I creat...more >>

Conditional doPostBack on Datagrid
Posted by whlskinner NO[at]SPAM netscape.net at 8/30/2004 9:52:24 AM
I have a ButtonColumn on my datagrid that I would like to post back conditionally. What I would like to see is a JavaScript confirm message that only posts the page when they click the Yes or OK button. Is that possible? If so, how? Thank you much...more >>

Refresh and/or Reindex a datagrid
Posted by et at 8/29/2004 8:53:34 AM
How can I refresh a datagrid, or more precisely, insert a new row with a new index # and reorder the remaining rows. In ItemDataBound, if the value of the county column is different than the county in the previous row, I insert a new row with the County name. Get the current Index (e.Item.Data...more >>



how to configure a DataGrid so that only some columns are editable in Edit mode
Posted by cahoo44 NO[at]SPAM hotmail.com at 8/27/2004 1:57:03 PM
I have been following the MSDN walkthrough "Using a DataGrid Web Control to Read and Write Data" in order to display an editable DataGrid. This has been working great - I am pleased with how simple it all is. The only thing that I haven't been able to do is select which columns are editable ...more >>

Please Wait. Loading...."How to display this on DataGrid while it is getting populated, still not removing all other controls from the web page?"
Posted by NH at 8/27/2004 10:21:22 AM
I would like to display a little pop-up message, or something when the user of Web Page submits data to be populated on DataGrid and not to remove all the other controls from the web page. Thanks in Advance, NH ...more >>

adding rows
Posted by Perecli Manole at 8/26/2004 9:38:01 PM
In my DataGrid I need to have two rows of data for every bound record. I have successfully achieved this by adding datagrid items and cells through code in the "DataGrid.ItemDataBound" event. The problem is that on post back my added rows do not stay. Aparently one needs to recreate them each ...more >>

Long string ruining formatting
Posted by Cathie Hagen at 8/26/2004 7:30:18 PM
Hi All, I have a long string with no whitespace or break character and it is ruining the formatting of my datagrid. How can I get the text to wrap whether or not their are break characters in the string? Thanks in advance Cathie ...more >>

How to change the color of the modified fields in a Datagrid?
Posted by dmovva NO[at]SPAM hotmail.com at 8/26/2004 9:57:38 AM
I have a situation where in a user would like to see all the modified fields font red in color when a record has been updated in a Datagrid. Here is the situation: We use popup windows to updated a record. I have a datagrid and in each row of the grid I have a small update icon at the...more >>

CheckBox in a datagrid without postback
Posted by Carmen at 8/26/2004 9:14:25 AM
I have a datagrid with several records. The datagrid has several pages, one every 20 records. The first datagrid column is a template with a checkbox. This checkbox is used by the user to select the records he wants to be printed. I have a boolean field in a dataset to say if the records is sele...more >>

DataFormatString shows currency, but without commas
Posted by Don at 8/25/2004 7:00:57 PM
Hi,=20 How do I get the commas into my datafield if it is a currency. I am = dealing with hundred thousands, so it would really help out the user if = I had commas. Heres' what I am currently using in my BoundColumn: = DataFormatString=3D"${0:C}". Do...more >>

Splash Screen b4 DataGrid
Posted by Paul King at 8/25/2004 12:11:57 PM
Hi there, Can you create a Splash screen on the .aspx page before the DataGrid has compiled and loaded? All I want is a message to say Please wait while loading... Regards Paul ...more >>

How to find control dynamically added in the header
Posted by Amit Chudasama at 8/25/2004 10:32:13 AM
Pls any body tell me how can i find the control added in the following way : Protected Overrides Sub OnItemDataBound(ByVal e As System.Web.UI.WebControls.DataGridItemEventArgs) Dim i As Integer If e.Item.ItemType = WebControls.ListItemType.Header Then For i = 0 To e.Item.Cells.Count - 1...more >>

Sorting a Datagrid that gets data from an XML file
Posted by Don at 8/24/2004 5:40:30 PM
Hi: All the examples that I see for sorting are for tables that get data from tables. How do I sort my Datagrid that gets data from a dataset that gets its data from an XML file? This means that after reloading the xml into the dataset, I want to do a sort at the dataset level. Thanks, ...more >>

Looping through all rows and columns (to get sub-totals for each column and row)
Posted by Hartman_Ralph NO[at]SPAM Hotmail.com at 8/24/2004 3:34:55 PM
Is there a way to loop through all rows and columns in order to fill a sub-totaled columns and a sub-totaled row (footer). I thought about doing this through SQL transact but I will be using the rowfilter to filter out certain rows and the total number of rows or columns will never be constant....more >>

alpha paging and data grid??
Posted by bciarcia NO[at]SPAM pepehazard.com at 8/24/2004 11:59:21 AM
Can someone please tell me why this is not working??? I used a sample that I found and it works great with the pubs database, however, as soon as I change it to the live database, it dies.. I know that all the columns are there and are correct.. thanks in advance Source Error: Line 31: ...more >>

Binding XML to Datagrid
Posted by Do at 8/23/2004 11:36:53 PM
Hi, I tried to bind an XML similar to the following to a datagrid. <Idontwant> <Iwant> <Yes></Yes> <Yes></Yes> <Yes></Yes> <Yes></Yes> <Yes></Yes> </Iwant> </Idontwant> The datagrid comes up with nothing. When I remove the node 'Idontwant' and ...more >>

links
Posted by Ralf at 8/23/2004 10:38:09 PM
HANUTA - WAFFELN für Birte http://www.metabuilders.com/Tools/BoundBooleanColumn.aspx ...more >>

Dropdownlist in template column to fire a SelectedIndexChanged event?
Posted by murphy NO[at]SPAM murphysw.com at 8/23/2004 2:28:34 PM
I have a ddl in a template column of a data grid. The ddl displays fine. I'm having no luck though getting an event to fire when the user selects a new value in a row's ddl. I can put a button in the template and get the command event for the grid, but nothing for the ddl. I have the ddl s...more >>

Country of user
Posted by Arda Coskun at 8/23/2004 8:19:54 AM
Hi, Is that possible to understand which country is the user from his or her GSM operator in smartphones with .NET Compact Framework? Any help would be appriciated, -- Sarp Arda Coskun ...more >>

Pls Help: Datagrid the solution?
Posted by VB Programmer at 8/22/2004 12:13:17 AM
I have an ASP.NET form that allows people to answer survey questions. There could be from 5 to an unlimited amt of questions, depending on which questions the admin wants to users to answer (he sets it up previously). The questions are in a db. Is a datagrid the best way to display this data?...more >>

Sorting problem
Posted by Arda Coskun at 8/21/2004 9:10:36 AM
Hi, I did sorting on Datagrid control for integers. However, there is a problem; when I sort ascending it makes> 23, 3, 44, 5 . But I want 3, 5, 23, 44. How can I solve this? I'm loading XML data, how can I tell the datagrid that the score column is containing integers? DataSet...more >>

Ascending descending arrows without hyperlink
Posted by Andrew Jocelyn at 8/19/2004 3:04:15 PM
Hi Is there a neat way of adding arrow images to datagrid columns next to the column heading text but not part of the hyperlink? e.g. <a href="javascript:__dopostback...">Firstname</a> [up arrow image] Many thanks Andrew ...more >>

Urgent - DataGrid
Posted by Ed at 8/19/2004 12:13:01 PM
Hi, Is there anyway to add a command button at the end of each row and when i click on it, it can post one of the value into another field? e.g. SS# LastName FirstName 111111111 John Smith CommandButton 222222222 Mary...more >>

hidden datagrid columns
Posted by klj_mcsd NO[at]SPAM hotmail.com at 8/19/2004 11:14:12 AM
I have a hidden template column and when I try to access it through javascript(document.all[id of DIV in column]) it cannot find it. Is this normal or am I doing something wrong?...more >>

How to code JavaScript events from HyperLinkColumn
Posted by robert NO[at]SPAM 18greystones.co.uk at 8/19/2004 2:20:23 AM
Hi, I have defined a simple grid with a hyperlink column as follows: <asp:HyperLinkColumn HeaderText="Description" DataNavigateUrlField="BillTypeID" DataNavigateUrlFormatString="BillTypeDetail.aspx?BillTypeID={0}" DataTextFormatString="{0:c}" DataTextField="Description"></asp:HyperLinkColu...more >>

Update a datagrid without POSTBACK!!
Posted by Michael Persaud at 8/18/2004 3:48:38 PM
Is that possible?? MP ...more >>

Setting cell backcolor
Posted by Todd Q at 8/18/2004 3:45:30 PM
Does anyone know how to set the backcolor of an individual cell in a datagrid? I've tried using DataGridTableStyle and DataGridTextBoxColumn objects but I still cannot set the backcolor of a cell. Please help. Thanks, Todd Quattlebaum Todd.Quattlebaum@Pfizer.com ...more >>

Consolidating data
Posted by Steve W at 8/18/2004 12:24:20 PM
I am pulling data from three tables and consolidating them into one dataset, which I am displaying as a Datagrid on a web page. Each table is for a specific inventory activity. What I am getting is duplication of columns. For example, each table has a date column, so the datagrid ends up showing ...more >>

How do I find the index of a DG column with a specific name?
Posted by Aaron at 8/17/2004 9:22:56 AM
I have a column called "notes" which may change position in the datagrid. How do I find the index of this column based on its name? ...more >>

This is EASILY done in Excel:
Posted by Coleen at 8/17/2004 8:55:54 AM
Hi Alvin, and Thanks :-) I could really use some help here. I don't know C# and I am having trouble deciphering your code into VB. Would it be possible for you to give me an example in VB? I can NOT get this to work, and I have spent 4 days on it!!! This is ridiculous! I would REALLY appre...more >>

http://support.microsoft.com/default.aspx?scid=kb;en-us;317719
Posted by Julien LEMONNIER at 8/17/2004 1:32:26 AM
http://support.microsoft.com/default.aspx?scid=kb;en-us;317719...more >>

datagrid help
Posted by Mike at 8/16/2004 6:20:41 PM
on my web app, i need to have a input box to allow the user to set the number of rows they see in the grid,, Now i'm going against oracle so how can i do that? example: when the page loads I pull all rows back, but if the user only wants to see 10 or 5 I can I make that change to the grid an...more >>

Clickevent in datacell
Posted by MA at 8/16/2004 4:18:55 PM
Hi all! I have a datagrid that i fill up from a database. I create it with help of datatable and datarow. Then I creates a new dataview and binds it to the datatable. How do I get the clickevent on each cell with this? I want to click on a cell in my grid, get the cellID or some else in...more >>

Filling Datagrid
Posted by Aaron at 8/16/2004 3:31:44 PM
I am programmatically adding columns to my datagrid and that is working very well. I am using this code to add the column: Dim Activity_Notes As New BoundColumn() With Activity_Notes ..DataField = "Activity_Notes" ..HeaderText = "Notes" End With datagrid.columns.add(Activity_Notes) datagrid...more >>

Template column and Javascript
Posted by Sjaakie Helderhorst at 8/16/2004 10:31:42 AM
Hello all, I'm having some problems with data in a template column. The column... <asp:TemplateColumn HeaderText="Amount"> <HeaderStyle Width="75px"></HeaderStyle> <ItemStyle Font-Size="10px" HorizontalAlign="Left" BackColor="White"></ItemStyle> <ItemTemplate> <asp:TextBox ID="txtAmou...more >>

Problem with paging in datagrid
Posted by Martin Bischoff at 8/16/2004 8:58:05 AM
Hi, I have a datagrid, which I bind to an array of objects stored in the session. I'm using numeric paging on the datagrid, which works fine until the number of pages is higher than PageButtonCount. This is what happens, when I have 30 pages and PageButtonCount is set to 10: - Paging ...more >>

Reading data from Template Column
Posted by jcriv at 8/16/2004 6:03:03 AM
Hi, I have a datagrid on a webform and I also have an OK Button. I designed the datagrid in Visual Studio. The dg has 3 'databound' coulmns and 3 template columns. I used the drop down tool 'Edit Template' to 'Item Template' to a TextBox with an initial text value. When I run the progra...more >>

ItemCommand handler and DataBind on Postback
Posted by Joel Finkel at 8/15/2004 6:55:24 PM
Folks, I have a web application that displays rows from a database and, on each = row, displays three ImageButtons, each of which needs to execute a = different function. In order to improve performance, I have a Panel = with a 26 buttons (labeled 'A' thru 'Z'), which is used to limit the = ...more >>

Header Text disappears when setting SortExpression
Posted by Selden McCabe at 8/14/2004 4:13:29 PM
I have a datagrid that I want to set the column header text, column width, bound data field, and sortexpression in code at run time. This was working fine until I added the sortexpression, at which point the headers disappeared! Here is the code: Private Sub AddColumn(ByVal sHeader As Strin...more >>

_M
Posted by PiotrF at 8/14/2004 1:11:01 PM
I am testing ASP.NET 2.0 with MS SQL 2000. I get server error: "Exception Details: System.Data.SqlClient.SqlException: Must declare the variable '@KEY'" after record updating in GridView or DetailsView. I do not get this message when I use MS ACCESS. I do not get this message with MS SQL whe...more >>

Deleting a row in a datagrid
Posted by peashoe NO[at]SPAM yahoo.com at 8/13/2004 2:11:11 PM
Hey all, I've spent an hour reading posts to see how to delete a row in a datagrid but none of them work for me (most are VB.NET and I'm coding in C#). Specifically, I have a checkbox next to each row and a "Delete" button at the bottom. What I want is for each row that is checked to get delete...more >>

Unable to retrieve textbox value from datagrid
Posted by John Dalberg at 8/13/2004 10:56:00 AM
I have a datagrid plus a button to save the contents of the grid to the database. My code gets blanks in the textbox field. I am not sure why. Also I don't know why dgi.Cells[1].Controls[0] & dgi.Cells[1].Controls[2] are Literal Controls. The html shows only a textbox in the second table cell. ...more >>

Computing columns in dtagrids
Posted by Coleen at 8/13/2004 10:06:22 AM
Hi all :-) I'm having a BIG problem with getting a grand total in a data grid. I'm = sorry, this is sort-of a double-post, but I REALLY need some help = (please?) I need to get the grand total of a column in a data grid and use that = value to divide the data in the SAME column by the gran...more >>

problem sizing columns in datagrid
Posted by usenet_daughter NO[at]SPAM yahoo.com at 8/13/2004 9:02:43 AM
I have a datagrid that has a column that I would like to be the widest (say 60%) - however another column is populated with some data that is sometimes a rather long string, and it expands to take up most of the table width. I tried to force the column sizes to force the longer column to wrap bu...more >>

Any DataGrid Gurus out there?
Posted by wdewebserver at 8/13/2004 8:47:57 AM
Hi How can I force a DataGrid into Edit Mode from Page_Load? How can I call the ItemCommand from Page_Load? Can I have a hidden CommandButton and call it's click event programmatically? Please help - very urgent. ...more >>


DevelopmentNow Blog