By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,041 Members | 1,793 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,041 IT Pros & Developers. It's quick & easy.

Update selected records on datagrid

daniel aristidou
100+
P: 491
Hi can anyone help me with the logic of updating records that are selected in a datagrid. Just wanna be sure before i code it all, since its first time im doing this and making sure the logic is right will greatly reduce the debugging i presume im gonna be facing.
I came up with :

Move first
Do while not last record in grid
if record is selected then
bindingsource.update
end if
movenext
loop

However im not sure wheather i should be just changing it in th datagrid. I.e

Move first
Do while not last record in grid
if record is selected then
datgridrow = date
end if
movenext
loop

Also it would be greatly appreciated if someone could help me create the update code using LINQ. I just need to update the records "Last Seen" field to the current date.
Jan 20 '08 #1
Share this Question
Share on Google+
2 Replies


daniel aristidou
100+
P: 491
Move first
Do while not last record in grid
if record is selected then
datgridrow = date
end if
movenext
loop
i tried htis way and i couldnt get it too work. only one out of the selected is getting updated
Jan 20 '08 #2

daniel aristidou
100+
P: 491
i tried htis way and i couldnt get it too work. only one out of the selected is getting updated
Ok in the end i did get it to work............ used i to 0 instead of loop and if.....
Jan 21 '08 #3

Post your reply

Sign in to post your reply or Sign up for a free account.