I have a checkbox column inside a TemplateDataField, I would like to have ItemCommand event to be fired when I check/uncheck the checkbox column. My code is as below, but the item command event does not fire.
<ig:WebDataGrid ID="grdAdditions" runat="server" Width="100%" EnableDataViewState="true" EnableAjax="false" EnableAjaxViewState="false" AutoGenerateColumns="false" DataKeyFields="AdditionID" ShowFooter="true" onitemcommand="grdAdditions_ItemCommand">
<Columns> <ig:TemplateDataField Key="Cleared" Header-Text="Clear"> <ItemTemplate> <asp:CheckBox runat="server" ID="chkCleared" AutoPostBack="true" Checked='<%# DataBinder.Eval(((Infragistics.Web.UI.TemplateContainer)Container).DataItem, "IsCleared") %>' /> </ItemTemplate> </ig:TemplateDataField>
</Columns>
</ig:WebDataGrid>
Hi Nagaraj, I'm glad that you have been able to resolve your issue according to my help.If there is anything else, regarding this issue, feel free to contact me.
Many thanks,
Understood your point and I solved the issue myselft.
Thanks
Nagaraj
Hello Nagaraj, I'm just following up to see whether you've managed to resolve your issue. Let me know if you still need assistance.
Hi Nagaraj,
Checkbox control doesn't fire the event. Only the Button, Linkbutton and ImageButton (might be a few more objects) fire the ItemCommand event. The Checkbox in fact doesn't even have the CommandName and CommandArgument properties. Please let me know what is your goal here, so I can suggest you a solution. I look forward to hearing from you.