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

Converter

2 Answers 48 Views
Grid
This is a migrated thread and some comments may be shown as answers.
fran
Top achievements
Rank 2
fran asked on 24 May 2008, 08:59 AM
Hi!

How to converter this line <asp:Button ID="btnUpdate" Text='<%# IIf((TypeOf(Container) is GridEditFormInsertItem), "Insert", "Update") %>'
to C#???

I always use VB.net but non C#... please help me..

Thanks!

2 Answers, 1 is accepted

Sort by
0
Konstantin Petkov
Telerik team
answered on 26 May 2008, 06:03 AM
Hello fran,

You may need to specify CommandName as well so better switch from two buttons like in the demo below:

 
            <asp:button id="btnUpdate" text="Update" runat="server" CommandName="Update" Visible='<%# !(DataItem is Telerik.Web.UI.GridInsertionObject) %>'></asp:button> 
            <asp:button id="btnInsert" text="Insert" runat="server" CommandName="PerformInsert" Visible='<%# DataItem is Telerik.Web.UI.GridInsertionObject %>'></asp:button> 

http://www.telerik.com/DEMOS/ASPNET/Prometheus/Grid/Examples/DataEditing/UserControlEditForm/DefaultCS.aspx

You can also use a couple of online converters when needed.

Kind regards,
Konstantin Petkov
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
Shinu
Top achievements
Rank 2
answered on 26 May 2008, 07:42 AM
Hi Fran,

You can also have a look at the following link.
Code Converter

Shinu.
Tags
Grid
Asked by
fran
Top achievements
Rank 2
Answers by
Konstantin Petkov
Telerik team
Shinu
Top achievements
Rank 2
Share this question
or