C# Datagrid Newbie:

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

C# Datagrid Newbie:

Hello,
I am trying to get the value the user selected from a Datagrid. Here’s what
I got:
Update_SKU_Status = DataGrid_Update_SKU_Status.SelectedIndex.ToString();
It returns the index. Which is not very user friendly.

I have tried:
Update_SKU_Status = DataGrid_Update_SKU_Status.SelectedItem.ToString();
But returns an error msg.

I’m sure there’s an easy way to do this & I’m just blinded!!!

Your assistance is much appreciated!!
 
Thank you Amal that worked well.



--
Thanks!
Nigel


AMALORPAVANATHAN YAGULASAMY(AMAL)MCP said:
Use the following statement
DataGrid_Update_SKU_Status.SelectedItem.Cells[0].Text
--
Regards,
Amal [MCP, MCS]
http://geocities.com/techsharing


Nigel said:
C# Datagrid Newbie:

Hello,
I am trying to get the value the user selected from a Datagrid. Here’s what
I got:
Update_SKU_Status = DataGrid_Update_SKU_Status.SelectedIndex.ToString();
It returns the index. Which is not very user friendly.

I have tried:
Update_SKU_Status = DataGrid_Update_SKU_Status.SelectedItem.ToString();
But returns an error msg.

I’m sure there’s an easy way to do this & I’m just blinded!!!

Your assistance is much appreciated!!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top