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

convert c# to js

1 Answer 126 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Mohamadreza
Top achievements
Rank 1
Mohamadreza asked on 10 Jul 2013, 06:39 PM
hi everybody
i need to run this server code in client side.
protected void RadGrid1_ItemCommand(object sender, GridCommandEventArgs e)
{
    if (e.Item is GridDataItem)
    {
        GridDataItem data = (GridDataItem)e.Item;
        if (e.CommandName == "Command1")
        {
            data["OrderID"].Text = "300";
        }
        else if (e.CommandName == "Command2")
        {
            data["OrderID"].Text = "600";
        }
    }
}
can anybody help me to convert this code to java script?

1 Answer, 1 is accepted

Sort by
0
Accepted
Andrey
Telerik team
answered on 15 Jul 2013, 12:23 PM
Hi,

In order to achieve your goal you may use the OnCommand client-side event of RadGrid. There you could transfer your logic with minor modifications.

Regards,
Andrey
Telerik
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to the blog feed now.
Tags
Grid
Asked by
Mohamadreza
Top achievements
Rank 1
Answers by
Andrey
Telerik team
Share this question
or