Welcome Guest Search | Active Topics | Sign In | Register

Question about eo_TriggerServerEven? Options
Jack.Wu
Posted: Sunday, July 18, 2010 3:46:01 AM
Rank: Advanced Member
Groups: Member

Joined: 5/22/2009
Posts: 33
Hello Sir,

I need to fire an event back to server so that I can know which GridItem selected by user. I used the script code as:

function OnItemSelected(grid)
{
var item = grid.getSelectedItem();
var value = item.getCell(2).getValue();
var info;

if (chkCell.getValue() == 0)
{
info = "Selected Item Index: " + item.getIndex() + value;
}
else
{
info = "Selected Item Index: " + item.getIndex() + value;
}
var div = document.getElementById("divCurrentInfo");
div.innerHTML = info;
eo_TriggerServerEvent("gridMaster",
"any_value, this argument is not used",
info);

The Server side code is as following:
protected void gridMaster_Command(object sender, CommandEventArgs e)
{
string msg;

msg = e.CommandArgument.ToString();
}

After I run it, it has en error on client side as: Object doesn't support this property or method.
Then I go into the debug mode of client script, it is display the error is in the :

Object doesn't support this property or method eo_web.ashx?id=41fa4079-c07d-4021-b0da-a37f2945922d, line 6 character 23424

Please help to give me an workable example to trigger an event from client side to server side. Thank you very much.

}
eo_support
Posted: Monday, July 19, 2010 8:01:05 AM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,194
Hi,

eo_TriggerServerEvent works with ScriptEvent control, not Grid control. So the first argument should be the ID of a ScriptEvent control.

Thanks!


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.