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

update/insert button

1 Answer 59 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Catalina
Top achievements
Rank 1
Catalina asked on 18 Jun 2012, 11:41 AM
I have this on my RagGrid Edit FormTemplate:              

       <telerik:RadButton ID="RadBtnUpdate" runat="server" Text="Update" CommandName="Update"
                            Visible='<%# !(DataItem is Telerik.Web.UI.GridInsertionObject) %>' CssClass="ComandButton">
                        </telerik:RadButton>
                       
       <telerik:RadButton ID="RadBtnInsert" runat="server" Text="Insert" CommandName="PerformInsert"
                            Visible='<%# DataItem is Telerik.Web.UI.GridInsertionObject %>' CssClass="ComandButton">
                        </telerik:RadButton>

When i "press" insert my "update button" is visible, not "insert button". (on edit appears update button, which is ok)
Any ideea why this?

1 Answer, 1 is accepted

Sort by
0
Accepted
Shinu
Top achievements
Rank 2
answered on 18 Jun 2012, 12:01 PM
Hello Catalina,

Try modifying your code as shown below.
aspx:
<FormTemplate>
    <telerik:RadButton ID="RadBtnUpdate" runat="server" Text="Update" CommandName="Update" Visible='<%# !(Container is Telerik.Web.UI.GridEditFormInsertItem) %>' CssClass="ComandButton"></telerik:RadButton>
      <telerik:RadButton ID="RadBtnInsert" runat="server" Text="Insert" CommandName="PerformInsert" Visible='<%# Container is Telerik.Web.UI.GridEditFormInsertItem %>' CssClass="ComandButton"></telerik:RadButton>
</FormTemplate>

Thanks,
Shinu.
Tags
Grid
Asked by
Catalina
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
Share this question
or