RadGrid - - Insert template - how to not show the column header?

1 Answer 102 Views
Grid
Scott
Top achievements
Rank 1
Iron
Iron
Scott asked on 21 Sep 2023, 02:48 PM

How can I have full control of the Insert Template (e.g. I would like to create my own label and formatting for the label) inside the Template?

For example, the insert automatically shows the column header, but when I convert the field to a template it still shows the column header in addition to whatever additional stuff I put in the Insert template.

   - Item 1 on the attached image comes from the column header.  I'd like to get rid of that.

Mainly interested in a Detail Insert Template if it makes any difference on how to do this.

While we are at it... how do I change the Save/Cancel Icons in the Insert Item for a Detail?

  - item 2 on the attached image is what I'd like to change

1 Answer, 1 is accepted

Sort by
0
Doncho
Telerik team
answered on 26 Sep 2023, 11:19 AM

Hi Scott,

Based on the provided information I would assume that you are using GridTemplateColumn and its InsertItemTemplate. Please let me know if my assumption is wrong.

Looking at the desired outcome I would suggest you review the Custom Edit Forms functionality of the Grid. By utilizing FormTemplate or WebUserControl option for the EditFormType property of the GridTableView (Master or Detail table) you can have full control over the content of the whole edit form and shape it as per your requirements.

<EditFormSettings EditFormType="Template">
  <FormTemplate>You can use traditional data binding<br/>Which require you to handle the updates yourself<br/>
    <asp:TextBox ID="TextBox1" runat="server" Text='<%# DataBinder.Eval( Container, "DataItem.Country" ) %>'/>
    <br/>When using automatic updates, you can use the Bind method<br/> 
    <asp:TextBoxID="TextBox2" runat="server" Text='<%# Bind("Country") %>' />  
  </FormTemplate>
<EditFormSettings>     

Check out the following resources to get a better idea of how to use the Custom Edit Forms:

I hope this will prove helpful.

Kind regards,
Doncho
Progress Telerik

Stay tuned by visiting our public roadmap and feedback portal pages! Or perhaps, if you are new to our Telerik family, check out our getting started resources
Scott
Top achievements
Rank 1
Iron
Iron
commented on 26 Sep 2023, 06:57 PM

Ah... ok  

That is weird how both the Insert and Edit use the same template.

I'll have to play around with it.

Thanks

Tags
Grid
Asked by
Scott
Top achievements
Rank 1
Iron
Iron
Answers by
Doncho
Telerik team
Share this question
or