PDA

View Full Version : [CLOSED] DirectEvent not firing with the latest SVN update



sailendra
May 11, 2012, 4:35 AM
DirectEvent not firing with the latest SVN update

Daniil
May 11, 2012, 1:48 PM
Hi,

Thanks for the report. We are investigating.

Daniil
May 11, 2012, 3:24 PM
Please update and re-test.

nagesh
Jun 18, 2012, 8:42 AM
Hai this is Nagesh

1. In Ext 2.0 is not working some controls, Fileupload, gripanel cell selection, and DirectEvents in gridpanel...
2. Not firing direct event of button in Desktop concept ext 2.0, i have written like this

<ext:Button ID="btnDelete" runat="server" Text="Delete" Icon="Exclamation">
<DirectEvents>
<Click OnEvent="Delete">
<%--<EventMask ShowMask="true" Msg="Deleting..." MinDelay="1000" />--%>
</Click>
</DirectEvents>
</ext:Button>
3. And directevent command also not working ext 2.0, i have written like this command

<DirectEvents>
<Command OnEvent="Command">
<EventMask ShowMask="true">
</EventMask>
<ExtraParams>
<ext:Parameter Name="id" Value="record.data.id" Mode="Raw"></ext:Parameter>
<ext:Parameter Name="command" Value="command" Mode="Raw" ></ext:Parameter>
</ExtraParams>
</Command>
</DirectEvents>
when iam trying to run this i am getting error like
"Object reference not set to an instance of an object"

anybody help me how to solve this...........

Daniil
Jun 18, 2012, 10:56 AM
Hi @nagesh,

Please start a new forum thread. Preferably, a separate one for each issue. If you feel some threads are related, please feel free to cross link between the two.

nagesh
Jun 18, 2012, 11:34 AM
Hai Daniil Thanks for Responce,
when am selecting a row in gridpanel (ext.net 2.0), am getting error like "Object reference not set to an instance of an object."
i have written code like

<SelectionModel>
<ext:RowSelectionModel ID="RowslectionModel1" runat="server">
<DirectEvents><Select OnEvent="click"></Select></DirectEvents>
</ext:RowSelectionModel>
</SelectionModel>
.CS File
----------

Label1.Text=RowSelectionModel1.SelectedRecordID;

nagesh
Jun 18, 2012, 11:57 AM
Hai Daniil
Am using the GridCommands Delete and Edit, here also not firing the Direct event, am getting error like "Object reference not set to an instance of an object."
i have written the aspx code like this

<ext:CommandColumn ID="CommandColumn1" runat="server" Width="60">
<Commands>
<ext:GridCommand Icon="Delete" CommandName="Delete">
<ToolTip Text="Delete" />
</ext:GridCommand>
<ext:GridCommand Icon="NoteEdit" CommandName="Edit">
<ToolTip Text="Edit" />
</ext:GridCommand>
</Commands>
<DirectEvents>
<Command OnEvent="Command">
<EventMask ShowMask="true">
</EventMask>
<ExtraParams>
<ext:Parameter Name="id" Value="record.data.id" Mode="Raw"></ext:Parameter>
<ext:Parameter Name="command" Value="command" Mode="Raw" ></ext:Parameter>
</ExtraParams>
</Command>
</DirectEvents>
</ext:CommandColumn>
and .CS File is
------------------

protected void Command(object sender, DirectEventArgs e)
{
int id = int.Parse(e.ExtraParams["id"]);
string commandName = e.ExtraParams["command"];
switch (commandName)
{
case "Delete":
delete(id);
break;
case "Edit":
edit(id);
break;
}
}
public void delete(int id)
{
cn.Open();
SqlCommand cmd = new SqlCommand("delete from users where id=" + id + "", cn);
cmd.ExecuteNonQuery();
cn.Close();
Response.Redirect("GridwithCommand.aspx");
}
public void edit(int id)
{ }
Can You Help Me about this...