blah blah blah is here! blah blah » Close

up0down
link

hi this is harish
in my page iam using datagrid,how to get rowindex of selected row of datagrid
can any body know sol ,please help me

last answered 2 years ago

1 answers

up0down
link

Unless I'm missing something here, it's just:
int rowIndex = DataGrid1.SelectIndex;
If rowIndex is -1, then no row is selected.

up0down
link

Sorry, that should have been:
int rowIndex = DataGrid1.Select<b>ed</b>Index;

up0down
link

tahnk you for giving this response

up0down
link

for every row it gives only rowindex=-1,

This post was imported from csharpfriends, if you have a similiar question please ask it again.

All previous members have been migrated, hope you enjoy the new platform!

Feedback