Hi,
I am using a web datagrid for the aspx page. I have a update panel in the page. The web data grid is inside the content template of the update panel. There is a link button in a item tempate of the grid. The item command event of the link button is not firing. If I remove the update panel the event is firing.
I have used the ayschronous trigger but that is not working. Also I tried adding the item command event on the pre_int and page load event of the page but to no use.
The strange part here is that in the header templateof the grid there is a imagebutton for sorting. And when i click the image button of the grid the event is fired.
I am missing something basic? Do i have to set any properties for this to work.
Any help will be greatly appreciated.
Hello ssheri,
Can you provide the aspx for the UpdatePanel with the WebDataGrid inside? I am also not clear what you have included in the page's pre_int or load events.
Thank you
Hi ,
I have attached the aspx for the update panel . I added the event handler for the itemcommand event in the pre_int and load events as the event was not firing . I have removed the same as they made no difference. Below is the statement which I wrote :
WebDataGridNursingHomeResults.ItemCommand +=new Infragistics.Web.UI.GridControls.ItemCommandEventHandler(this.WebDataGridNursingHomeResults_OnItemCommand).
Please have a look at the aspx and let me know if i am missing something.
Thanks
Hi ssheri,
As far as I understood, the function "lnkAddtoFavorites_Command" specified in "OnCommand" event handler of the linkbutton does not fire, correct?
This might be a problem of event bubbling in the webdatagrid. I am not sure of the exact reason, but you can try adding a small piece of code to manually enable bubbling for the OnCommand event. I don't see the event handler in what you supplied, but basically you have to add in the end of it the following code:
RaiseBubbleEvent(this, e);
Also remove the event from page_load or init.
This was a helpful article: http://msdn.microsoft.com/en-us/library/aa719644%28VS.71%29.aspx
Let me know if it helped.
Deni
Hi Deni,
The issue is that the itemcommand event of the data grid is not firing. The oncommand and onclick event were just implemented to check if these events are firing. I want the itemcommand event to fire and not the oncommand.
I have already removed the event fromt the page_load and init. Are you suggesting me to add the bubble event code in the itemcommad?
One more strange point I want to bring to your notice is that the itemcommand event is firing from a image button which is in the header template of the datagrid. But it is not firing from a link button which is inside the itemtemplate of the datagrid. Is there any property which I am missing?
I have again attached the aspx page after removing a lot of code which is not related to this issue. This will help you understand the code better.
Thanks for your help. Awaiting your reply.
I think the ItemCommand event is supposed to fire in the case of sorting since it is an AJAX control and normally sorting is done via partial postback.
I would have two suggestions for you at this point:
1) check the function signature for the ItemCommand event handler. Should be something like this:
protected void WebDataGridNursingHomeResults_OnItemCommand(object sender, Infragistics.Web.UI.GridControls.HandleCommandEventArgs e) { .. }
2) try setting EnableViewState="true" and EnableDataViewState="true" to the grid
3) check if ItemCommand fires now :)
Let me know if any of that helped
I am also facing the same issue can you please share solution if any ?
Thanks,
Santosh.
You can try to disable AJAX on the grid since the updatePanel uses it too and there might be some conflict.
I was not able to reproduce your problem with my sample project.
However I can see that you are using NetAdvantage 2008 v8.3 for CLR 3.5. I would recommend you to update to the latest release (2011.1) which will most probably be also a solution to your problem.
Sincerely,
The function signature of the itemcommand event handler is the same as you have suggested. I tried setting the EnableViewState="true" and EnableDataViewState="true" but to no effect.
The itemcommand event is not firing even after making these events true. Can you let me know what might be the issue?
Waiting for your further suggestions.