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

masterTable.fireCommand

1 Answer 72 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Winston Ware
Top achievements
Rank 1
Winston Ware asked on 17 Sep 2009, 05:44 PM
Hey,

I have a javascript function (below) that calls the RadGrid1_ItemCommand.  In all instances in which there is any data currently in my radgrid the firecommand works perfectly.  However, if there is no data in the grid yet the firecommand never reaches the RadGrid1_ItemCommand method.  Can someone explain why this is the case?  Any suggestions on how to make the fireCommand fire in instances in which there is not yet data in the grid?

Thanks for any insight!  Winston

 

function Insert()

 

{

 

var masterTable = $find("<%= RadGrid1.ClientID %>").get_masterTableView();

 

masterTable.fireCommand(

"Insert","");

 

}


1 Answer, 1 is accepted

Sort by
0
Schlurk
Top achievements
Rank 2
answered on 18 Sep 2009, 04:57 PM
The reason the ItemCommand() is never reached is because there are no items in the Grid. For cases where there are no items in the grid I would recommend using fireCommand("InitInsert", "")
Tags
Grid
Asked by
Winston Ware
Top achievements
Rank 1
Answers by
Schlurk
Top achievements
Rank 2
Share this question
or