R
Randy
Hello,
Can someone tell me how you de-select (un select) the currently selected
cell in a datagrid?
Thanks
Can someone tell me how you de-select (un select) the currently selected
cell in a datagrid?
Thanks
Randy said:Thanks Jeffrey,
There must be some other Window thing going on...I've tried both of these
and no luck...the same cell stays selected. I'll keep plugging along. Thanks
for your help.
"Jeffrey Tan[MSFT]" said:Hi Randy,
Thanks for posting in this group.
If you want to de-select current selected row, you can use UnSelect method:
private void button1_Click(object sender, System.EventArgs e)
{
MessageBox.Show(dataGrid1.CurrentRowIndex.ToString());
dataGrid1.UnSelect(dataGrid1.CurrentRowIndex);
}
If you want to change the current cursor focus to another cell, you can set
DataGrid's CurrentCell property.
Best regards,
Jeffrey Tan
Microsoft Online Partner Support
Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.