-
December 4th, 2013, 07:22 AM
#1
[RESOLVED] How to restrict a user to enter particular DataGridView Column?
Hi, I wish to restrict columns for user entries. While the users click or enters into Column_1 or Column_2, I wish to focus to a cell in same row & column_3.So I tried by the following ways, it's not succeeded...
It's giving "Re-Entrant call to a SetCurrentCellAddress Core function", error...
Note : May be Column-3 is DataGridViewComboBox Column....
Thanks for the helps
private: System::Void MyDataGrid1_CellEnter(System::Object^ Sender, System::Windows::Forms:ataGridViewCellEventArgs^ e) {
if (e->RowIndex>0 && (e->ColumnIndex==1 || e->ColumnIndex==2)) {
myDataGrid1->ClearSelection();
myDataGrid1->Rows[myDataGrid1->CurrentCell->RowIndex]->Cells[3]->Selected = true;
myDataGrid1->SelectionMode = DataGridViewSelectionMode::CellSelect;
myDataGrid1->MultiSelect = false;
}
}
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|