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

OnCommand RaiseCommand on client side and retrive rows values

1 Answer 76 Views
Grid
This is a migrated thread and some comments may be shown as answers.
John
Top achievements
Rank 1
John asked on 29 Sep 2008, 05:34 PM
Hi,
I am using <ClientEvents OnCommand="RaiseCommand" ... />.

When user clicks on Update/Insert command on RadGrid, I need to validate the user entered values of each column of that row. All my controls on the grid or GridComboBoxes. Could you please provide any sample code how to access the column values of the current inserted/updated row on CLIEN SIDE using Java Script.  I found the below code, but not able to retrive column values using Java Script on Client.

Appreciate if you could get back to me ASAP.

<ClientEvents OnCommand="RaiseCommand" ... />

JavaScript

function RaiseCommand(sender, args)
{
    //retrieve the current commandName and commandArgument
    var result = String.format("CommandName: {0}, CommandArgument: {1}", args.get_commandName(), args.get_commandArgument());

    if (<some_custom_condition_not_met>)
    {
        args.set_cancel(true); //cancel the command
    }
}

Many Thanks,
John

1 Answer, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 2
answered on 30 Sep 2008, 04:06 AM
Hi John,

Here is a Code Library submission which explains how to access grid editor values on the client side.
Retrieving grid editor value client side

You can also refer the following help article which explains how to access controls in a Grid template on the client side.
Accessing server controls in a grid template on the client

Shinu.


Tags
Grid
Asked by
John
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
Share this question
or