select new row in sorted datagrid

  • Thread starter Thread starter Hugh Mungo
  • Start date Start date
H

Hugh Mungo

Hi,

I have a datagrid that is bound to a dataview.
How can I select make sure that when a new row is added it is selected -
even if the datagrid is sorted.
I am using C# in a Windows Forms application.

Thanks
 
Hi Hugh,

Hugh Mungo said:
Hi,

I have a datagrid that is bound to a dataview.
How can I select make sure that when a new row is added it is selected -
even if the datagrid is sorted.
I am using C# in a Windows Forms application.

Thanks

Get the index of the row added, and set the SelectedRowIndex property of the
DataGrid. After that call Select on the DataGrid.

Try microsoft.public.dotnet.framework.windowsforms for windows forms
specific questions.

Hope this helps,
Tom T.
 
How do I get the index of the row added?


Get the index of the row added, and set the SelectedRowIndex property of the
DataGrid. After that call Select on the DataGrid.

Try microsoft.public.dotnet.framework.windowsforms for windows forms
specific questions.

Hope this helps,
Tom T.
 

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