datagrid item retrieval

  • Thread starter Thread starter mark
  • Start date Start date
M

mark

I want to be able to retrieve the data in my datagrid on a
postback but I can't find a way to do this. Can anyone
help?
 
It sounds like you want to capture the selected row on
postback? There's a property called
Datagrid1.SelectedItem that contains the selected row.
You can access it like so...

with Datagrid1
If .SelectedIndex <> -1 then
s = dtgPeriods.SelectedItem.Cells(3).Text()
End if
end With
 
You can get a cell's text with following expression:

DataGrid1.Items(RowNumber).Cells(ColumnNumber).Text

Luke

"Microsoft Security Announcement: Have you installed the patch for
Microsoft Security Bulletin MS03-026?? If not Microsoft strongly advises
you to review the information at the following link regarding Microsoft
Security Bulletin MS03-026
http://www.microsoft.com/security/security_bulletins/ms03-026.asp and/or to
visit Windows Update at http://windowsupdate.microsoft.com to install the
patch. Running the SCAN program from the Windows Update site will help to
insure you are current with all security patches, not just MS03-026."
 
Back
Top