Allow users the ability to edit the column header text

5 posts, 0 answers
  1. Mark Stevens
    Mark Stevens avatar
    11 posts
    Member since:
    Dec 2007

    Posted 22 Mar 2018 Link to this post

    I have a scenario where I need to allow users to edit the header text of the columns in my GridView. I'm not sure if this can be done but it would be nice to have the header text change to a text box when the user double clicks on the header.
  2. Dimitar
    Admin
    Dimitar avatar
    2949 posts

    Posted 23 Mar 2018 Link to this post

    Hello Mark,

    I am afraid that this is not possible. I would recommend you to show a separate form and fill the header text there.

    Please let me know if there is something else I can help you with. 

    Regards,
    Dimitar
    Progress Telerik
    Try our brand new, jQuery-free Angular components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
  3. Mark Stevens
    Mark Stevens avatar
    11 posts
    Member since:
    Dec 2007

    Posted 25 Mar 2018 in reply to Dimitar Link to this post

    Thanks Dimitrar,

    I've found a workaround by creating a custom header(GridHeaderCellElement) and implemented a radTextboxElement to override the existing header.

    That way a user clicks on the header and can change the header text.

  4. Mark Stevens
    Mark Stevens avatar
    11 posts
    Member since:
    Dec 2007

    Posted 25 Mar 2018 Link to this post

    So I have the header using a RadTextBoxElement but I'm not sure how to update the Column.HeaderText property when I change the text in the RadTextBoxElement, any ideas?

     

  5. Dimitar
    Admin
    Dimitar avatar
    2949 posts

    Posted 26 Mar 2018 Link to this post

    Hi Mark,

    Can you share your implementation so I can examine and test it locally? 

    In general, you can use the TextChanged event and update the text like this:
    private void Textbox_TextChanged(object sender, EventArgs e)
    {
        this.ColumnInfo.HeaderText = textbox.Text;
    }

    I am looking forward to your reply.
     
    Regards,
    Dimitar
    Progress Telerik
    Try our brand new, jQuery-free Angular components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Back to Top