User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the ASP.NET section within the Web Development category of DaniWeb, a massive community of 402,401 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 2,935 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our ASP.NET advertiser: Lunarpages ASP Web Hosting
Views: 6763 | Replies: 3
Reply
Join Date: Jul 2004
Posts: 8
Reputation: snufse is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
snufse snufse is offline Offline
Newbie Poster

Use of DataGrid

  #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.
AddThis Social Bookmark Button
Reply With Quote  
Join Date: Jul 2003
Location: Bamberg, Germany
Posts: 117
Reputation: Iron_Cross is an unknown quantity at this point 
Rep Power: 6
Solved Threads: 2
Iron_Cross's Avatar
Iron_Cross Iron_Cross is offline Offline
Junior Poster

Re: Use of DataGrid

  #2  
Aug 4th, 2004
DataTable dt = dataGrid.Table["People"];
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  
Join Date: Jul 2004
Posts: 8
Reputation: snufse is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
snufse snufse is offline Offline
Newbie Poster

Re: Use of DataGrid

  #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  
Join Date: Jul 2003
Location: Bamberg, Germany
Posts: 117
Reputation: Iron_Cross is an unknown quantity at this point 
Rep Power: 6
Solved Threads: 2
Iron_Cross's Avatar
Iron_Cross Iron_Cross is offline Offline
Junior Poster

Re: Use of DataGrid

  #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  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

DaniWeb ASP.NET Marketplace
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

Thread Tools Display Modes

Similar Threads
Other Threads in the ASP.NET Forum

All times are GMT -4. The time now is 1:35 pm.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC