PDA

View Full Version : [CLOSED] Dynamic checkboxselectionmodel direct event



speedstepmem4
Jun 17, 2014, 11:16 AM
In dynamic checkboxSelectionModel creation direct event not getting fired.
From grid when select the checkbox following error occurs
-> checkBox1 is not found




RowSelectionModel chksRowSelect = null;
chksRowSelect = new CheckboxSelectionModel { CheckOnly = true, ID = "checkBox1" };
chksRowSelect.Mode = SelectionMode.Multi;
chksRowSelect.DirectEvents.Select.ShowWarningOnFai lure = false;
chksRowSelect.DirectEvents.Select.Event += new ComponentDirectEvent.DirectEventHandler(GetSelecte dOrder);


protected void GetSelectedOrder(object sender, DirectEventArgs e)
{
try
{
string strJSON = e.ExtraParams["SelectedOrder"];
string strindex = e.ExtraParams["SelectedOrderIndex"];
string currentPageIndex = e.ExtraParams["CurrentPageIndex"];
}
catch (Exception)
{

}
}

Daniil
Jun 17, 2014, 11:45 AM
Hi @speedstepmem4,

It probably means that you don't recreate the CheckboxSelectionModel on each request, therefore Ext.NET cannot find it.

A DirectEvent requires a control on server.