This is a migrated thread and some comments may be shown as answers.

Allow users the ability to edit the column header text

4 Answers 11 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Mark Stevens
Top achievements
Rank 1
Mark Stevens asked on 22 Mar 2018, 10:21 PM
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.

4 Answers, 1 is accepted

Sort by
0
Dimitar
Telerik team
answered on 23 Mar 2018, 12:21 PM
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.
0
Mark Stevens
Top achievements
Rank 1
answered on 25 Mar 2018, 06:16 PM

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.

0
Mark Stevens
Top achievements
Rank 1
answered on 25 Mar 2018, 08:40 PM

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?

 

0
Dimitar
Telerik team
answered on 26 Mar 2018, 10:02 AM
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.
Tags
GridView
Asked by
Mark Stevens
Top achievements
Rank 1
Answers by
Dimitar
Telerik team
Mark Stevens
Top achievements
Rank 1
Share this question
or