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

Grid : Edit

2 Answers 30 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Janaki
Top achievements
Rank 1
Janaki asked on 17 May 2012, 08:12 AM
Hi all,

The edit form of my grid is type template.I added a textbox and dropdownlist to the form template.I want to show only asp:textbox when I add new record and only asp:dropdownlist while editing.
Please help.
Thanks in advance.

2 Answers, 1 is accepted

Sort by
0
Accepted
Shinu
Top achievements
Rank 2
answered on 17 May 2012, 08:33 AM
Hi Janaki,

Please try the following code snippet to show the TextBox in insert mode and DropDownlist in edit mode.

ASPX:
<EditFormSettings >
  <FormTemplate>
    <asp:TextBox ID="TextBox1" runat="server" Visible='<%#(Container is GridEditFormInsertItem)? true : false %>'></asp:TextBox>
    <asp:DropDownList ID="<asp:DropDownList1" runat="server" Visible='<%#(Container is GridEditFormInsertItem)? false : true %>'></asp:DropDownList>
  </FormTemplate>
</EditFormSettings>

Hope this helps.

Thanks,
Shinu.
0
Janaki
Top achievements
Rank 1
answered on 18 May 2012, 05:48 AM
Thank you Shinu..
Tags
Grid
Asked by
Janaki
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
Janaki
Top achievements
Rank 1
Share this question
or