Datagrid Help

  • Thread starter Thread starter Brian Conway
  • Start date Start date
B

Brian Conway

Does anyone know how to access a field in a row on a datagrid? I need to be
able to pull out a typed in value from the grid, so that I can take that
value and use it as a look up on the click event of a button on that row.

Example. They will type in a UserName, click a button, this will pass that
user name into a lookup to pull back a First Name and Last Name from a LDAP
system.
 
Can you give me an example of how to access it directly? I have tried this,
but it does not work

string dgCUIDFind = e.Item.Cells[5].Text;



William Ryan eMVP said:
You can just reference the grid's properties directly [0,1] for instance, or
you can use .CurrentCell or CurrentRowIndex and use that to reference the
underlying datatable.

--

W.G. Ryan, eMVP

Have an opinion on the effectiveness of Microsoft Embedded newsgroups?
Let Microsoft know!
https://www.windowsembeddedeval.com/community/newsgroups
Brian Conway said:
Does anyone know how to access a field in a row on a datagrid? I need
to
be
able to pull out a typed in value from the grid, so that I can take that
value and use it as a look up on the click event of a button on that row.

Example. They will type in a UserName, click a button, this will pass that
user name into a lookup to pull back a First Name and Last Name from a LDAP
system.
 
Back
Top