Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
70
Make UltraWinGrid Column Header Editable when Double click and rename the Header Text
posted

Hi there, 

I am using Infragistics Control v2020.2 (Licensed) and I need to make the header editable if the user double clicks on it, so the user can rename the header text. I have found a event "DoubleClickHeader" and tried a couple of things with it but cant really achieve it. Is there a way of achieving this ?

Regards, 

Muhammad Mujtaba

Parents
  • 1700
    Offline posted

    Hello Muhammad,

    In order to edit the headers of the UltraGrid, what can I suggest you is using the AllowEdditing property on the column headers and setting it to AllowHeaderEditing.OnDoubleClick. it could be achieved by looping through all the columns and setting the property similar to the code below:

    for (int i = 0; i < ultraGrid1.DisplayLayout.Bands[0].Columns.Count; i++)

                {

                    ultraGrid1.DisplayLayout.Bands[0].Columns[i].Header.AllowEditing = AllowHeaderEditing.OnDoubleClick;

                }

    Please let me know if you have any questions.

    Regards,
    Ivan Kitanov

Reply Children