Re: How to rename DataGridView Header by double click
Thanks for your inputs. To rename yo have implemented a new form.
But I dont think they will accept in my project to add a new form for renaming.
I have attached the code of mine. In that frmPsetSignalsEditor.cs is my main form.
In that you can see a blue colored icon with symbol '+', its for adding the new signal or pset in my case. It will display a new form once yo click that and that form is frmAddNewNspcp.cs. ( In that form if we enter the signal name and press ok it will start to display in the grid).
Since I already have a form, i would like to use the same form for renaming also.
I don't know whether this is possible or not, but why I am saying is, after adding the signal
I want to update the name in many things( like in driver and sheet, in our project we have a
current driver and also excel sheet in which we add the entered signal ) So if in the same form
I try to rename means, that ok button becomes same to both cases and once i rename the signal
name, the changes will happen everywhere.
Also if yo see, we will validate the name in such a way that, the same name should not exist
anywhere in our sheet and you can see that code in btnNewPSetOrSignal_Click in frmPsetSignalsEditor.cs.
That function will do all validation and also updates the name every place where it is neccessary.
dgvParametersEdit_CellDoubleClick is the event which is called when that header is double clicked.
In that place they would have mentioned ( if e.RowIndex < 0, return ). So I think we need to add our code. In place of return which will rename the header and it should update every where as like what the
function btnNewPSetOrSignal_Click does.
* The Best Reasons to Target Windows 8
Learn some of the best reasons why you should seriously consider bringing your Android mobile development expertise to bear on the Windows 8 platform.