asp.net - Javascript : Check if RadGrid item is in Edit mode - Stack Overflow

Iam using a telerik RadGrid and I want to check if GridDataItem is in edit mode Using javascript .I can

Iam using a telerik RadGrid and I want to check if GridDataItem is in edit mode

Using javascript .

I can handle this using VB but I want to do it on Client Side.

If anyone can tell me also how to loop through all Items in the Grid and get selected item

using JavaScript.

I'm stuck Here .. Any Help Please ... I will be grateful.

2) I have a problem with OnCommand function in Javascript

I have a mandItemTemplate in radgrid.

and I add a client event: <ClientEvents OnCommand="OnCommand" />

Function: function OnCommand(sender, args) { if (args.get_mandName() == 'EditSelected') { ....}

The OnCommand doesn't fire on any of the mands in the CommandItemTemplate , on the other hand , it fires on other mands like (Edit,Update,Delete,...).

I don't know why?? I need Help Please.

Iam using a telerik RadGrid and I want to check if GridDataItem is in edit mode

Using javascript .

I can handle this using VB but I want to do it on Client Side.

If anyone can tell me also how to loop through all Items in the Grid and get selected item

using JavaScript.

I'm stuck Here .. Any Help Please ... I will be grateful.

2) I have a problem with OnCommand function in Javascript

I have a mandItemTemplate in radgrid.

and I add a client event: <ClientEvents OnCommand="OnCommand" />

Function: function OnCommand(sender, args) { if (args.get_mandName() == 'EditSelected') { ....}

The OnCommand doesn't fire on any of the mands in the CommandItemTemplate , on the other hand , it fires on other mands like (Edit,Update,Delete,...).

I don't know why?? I need Help Please.

Share Improve this question edited Jan 11, 2012 at 18:28 booody asked Jan 11, 2012 at 16:28 booodybooody 794 silver badges14 bronze badges 2
  • have you converted this object to js? or is that done and you're wondering how to loop through it? – Matt K Commented Jan 11, 2012 at 16:32
  • Can you help me in the second problem I mentioned.. – booody Commented Jan 11, 2012 at 18:32
Add a ment  | 

1 Answer 1

Reset to default 5

Have you looked at the documentation? Using get_editItems() should do the trick

function getTableViewEditedItems() {
    var masterTable = $find("<%= RadGrid1.ClientID %>").get_masterTableView();
    //get all edited GridDataItems from the current table view that are in edit mode
    var editedItemsArray = masterTable.get_editItems();
}

发布者:admin,转转请注明出处:http://www.yc00.com/questions/1745298613a4621298.html

相关推荐

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信