Use of DataGrid

Please support our ASP.NET advertiser: Intel Parallel Studio Home
Reply

Join Date: Jul 2004
Posts: 8
Reputation: snufse is an unknown quantity at this point 
Solved Threads: 0
snufse snufse is offline Offline
Newbie Poster

Use of DataGrid

 
0
  #1
Aug 4th, 2004
I am new to ASP. I have populated a DataGrid with rows but cannot find any property setting (like Readonly=False or True) that let's me update rows directly in the grid. Is such a function not supported in ASP ? If this is the case how would I design a routine where I have a grid and where user can select rows to be update ?? Thanks.
Reply With Quote Quick reply to this message  
Join Date: Jul 2003
Posts: 117
Reputation: Iron_Cross is an unknown quantity at this point 
Solved Threads: 2
Iron_Cross's Avatar
Iron_Cross Iron_Cross is offline Offline
Junior Poster

Re: Use of DataGrid

 
0
  #2
Aug 4th, 2004
  1. DataTable dt = dataGrid.Table["People"];
  2. dt.Rows[4]["Colum 4"].Text = "BLAH!";
That is asuming you have a datagrid with a table named "People" and in that table you have a column named "Column 4". That would change the text in that particular cell. (Row 4, Column 4)
elitehackers.info
Today's Penny-Arcade!
Pain is weakness leaving the body!
Reply With Quote Quick reply to this message  
Join Date: Jul 2004
Posts: 8
Reputation: snufse is an unknown quantity at this point 
Solved Threads: 0
snufse snufse is offline Offline
Newbie Poster

Re: Use of DataGrid

 
0
  #3
Aug 4th, 2004
Programatically I believe this can be done. But what about user changed values (updateing, inserting and deleting) rows. Is this possible in ASP ?? Thanks.
Reply With Quote Quick reply to this message  
Join Date: Jul 2003
Posts: 117
Reputation: Iron_Cross is an unknown quantity at this point 
Solved Threads: 2
Iron_Cross's Avatar
Iron_Cross Iron_Cross is offline Offline
Junior Poster

Re: Use of DataGrid

 
0
  #4
Aug 4th, 2004
Yeah, use DataBind() you may have to read up on it. But bind to a certain source, say an ArrayList, then just update the ArrayList, after that just do dataGrid.DataBind() and you rows and columns will be updated.
elitehackers.info
Today's Penny-Arcade!
Pain is weakness leaving the body!
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



Tag cloud for ASP.NET
About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC