By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
448,527 Members | 945 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 448,527 IT Pros & Developers. It's quick & easy.

Grid on ColumnHeader click making the grid row to edit mode

P: n/a
I saw that in Windows Forms DataGrid with new row
creation set to true, if I have added a new row earlier
which was empty and deleted the row and shifted the focus
to any other control and then clicking on the column
header of the grid is making the grid to go to edit mode
which is causing the first row to be ready for allowing
user input. Does anybody of you know how to stop this
behaviour, i.e., new row should not be put into edit mode
if I click on the column header. Please help me if you can
stop that.

Steps to Reproduce :

1) Create a grid with column sorting set to false in the
2) Set a DataTable with no rows to the grid such that grid
allows new row creation
3) Start editing the first row on the grid and delete the
row, now only one row with * mark on row header exists
4) Now shift focus to anyother control, then shift focus
to grid by clicking on any column header.
5) Now see that the first row (only row) in the grid is
turned to edit mode, no more '*' in the row header but the
triangle appears.

I want to stop that, even if they click on the column
header the '*' row should be there, it should turn to
current row. It should allow for editing only when I click
on a cell or the row header.
Anybody plz help

Thanks in Advance,
Nov 15 '05 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.