Snitz Forums 2000
Snitz Forums 2000
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Community Forums
 Code Support: ASP.NET (Non-Forum Related)
 Datagrid question
 New Topic  Topic Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

Steve D.
Average Member

USA
640 Posts

Posted - 24 September 2004 :  22:58:20  Show Profile  Visit Steve D.'s Homepage  Send Steve D. a Yahoo! Message
I've got a datagrid that has the following columns of data:
ID, Name, Dir, Order plus an edit button and a delete button.

When I click the edit button, I can edit the data and update the database/datagrid.

The problem I'm having is trying to figure out how to update all the other records in the datagrid... That is say the item that was edited had and Order of 4 and was changed to 6, then I would need to update the items with order 5&6 too...

Any ideas, am I making sense?

Swing Dancing Video Clips - It's All Swing! Forum

Nathan
Help Moderator

USA
7664 Posts

Posted - 25 September 2004 :  05:16:06  Show Profile  Visit Nathan's Homepage
In your handeler function you need to itterate over the DataGridItems

foreach(DataGridItem item in myDataGrid){
((TextBox)(item.FindControl["order"])).Text = whatever;
}

Nathan Bales
CoreBoard | Active Users Download
Go to Top of Page

Steve D.
Average Member

USA
640 Posts

Posted - 29 September 2004 :  10:26:15  Show Profile  Visit Steve D.'s Homepage  Send Steve D. a Yahoo! Message
Thanks, I actually found a different approach to solve my problem, but this is still good to know!

Swing Dancing Video Clips - It's All Swing! Forum
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Topic Locked
 Printer Friendly
Jump To:
Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 0.12 seconds. Powered By: Snitz Forums 2000 Version 3.4.07