Customizing Column Title Displayed in Popup Editor

2 Answers 220 Views
Editor Grid
chesk345
Top achievements
Rank 1
Iron
Iron
Iron
chesk345 asked on 16 Jul 2021, 02:27 PM | edited on 16 Jul 2021, 02:40 PM

Hello,

I have a grid with nested columns.  The column's "child header" Title is displayed in the label of its corresponding editor in the popup.  However, in my case, the child header titles are not unique without the "parent" header Titles.  Can I prepend the "parent header" Title in the labels in the popup?

A screenshot is attached.  Note the red and green label pairs are identical in the popup, so the user can't distinguish what the data attributes are.

 

Thanks again!

2 Answers, 1 is accepted

Sort by
1
Accepted
chesk345
Top achievements
Rank 1
Iron
Iron
Iron
answered on 19 Jul 2021, 03:25 PM | edited on 21 Jul 2021, 11:44 AM

PS - For my needs, I just discovered a simpler solution. With the HeaderTemplate, I can use the "full" name as the Title (which is used by the editor) while displaying the abbreviated text in the grid through the template. I don't need to define extra columns.

Sample and screenshot are now attached...

Marin Bratanov
Telerik team
commented on 19 Jul 2021, 07:12 PM

That's a neat idea, I converted this comment to an answer to improve its visibility. If you could post a small code snippet for everyone else to see, that would be grand! Thanks!

chesk345
Top achievements
Rank 1
Iron
Iron
Iron
commented on 21 Jul 2021, 11:39 AM | edited

I attached sample razor code and a screenshot.
Marin Bratanov
Telerik team
commented on 21 Jul 2021, 04:46 PM

Awesome, thanks!
1
Marin Bratanov
Telerik team
answered on 17 Jul 2021, 11:14 AM

Hi,

The grid popup editing uses the column titles for titles for their labels, so if you cannot make them unique in the column definitions (e.g., add some abbreviation or other info in brackets after the current titles), you can change them dynamically while in edit mode in a fashion similar to this.

 

Regards,
Marin Bratanov
Progress Telerik

Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.

chesk345
Top achievements
Rank 1
Iron
Iron
Iron
commented on 19 Jul 2021, 02:46 PM

For each of the model properties in question, I implemented two columns with opposing toggles on their visibility. Columns visible in normal mode have the normal Title, and no editor template, while those visible in edit mode have the customized Title and the editor template. Thanks for your assistance.
Tags
Editor Grid
Asked by
chesk345
Top achievements
Rank 1
Iron
Iron
Iron
Answers by
chesk345
Top achievements
Rank 1
Iron
Iron
Iron
Marin Bratanov
Telerik team
Share this question
or