Hi There,I am using a WebDataGrid in which there is a TemplateDataField.I have added a Link Button there and added "OnClick" event of a button in Code Behind (C#).The event is not triggered at any point of time.I have also put a break point to troubleshoot but the break point is not getting hit anyhow.I have added sample code here..ASPX Page<ig:WebDataGrid ID="Users" runat="server" Width="100%" AutoGenerateColumns="false"> <Columns> <ig:BoundDataField DataFieldName="NAME" Key="NAME" CssClass="name"> <Header Text="User Name" CssClass="name" Tooltip="User Name" /> </ig:BoundDataField> <ig:TemplateDataField Key="Edit" CssClass="edit" Width="6%"> <Header CssClass="edit" /> <ItemTemplate> <asp:LinkButton ID="btnEdit" runat="server" Text="Edit" CausesValidation="false" OnClick="edit_Click" CommandName="edit_Click"/> </ItemTemplate> </ig:TemplateDataField> </Columns> </ig:WebDataGrid>.CS Pageprotected void edit_Click(object sender, EventArgs e) { LinkButton edit = sender as LinkButton; try { //Do Something } catch (Exception ex) { throw; } }Is it needed to register the event anywhere in code?Please help.
Hi,
I've tested your code with 11.1 Version and it seems to work on my side. I am able to hit the edit_Click handler on the server when i press a link button. Can you test this with the 11.1 Version and see if it works.
Thanks,
Thanks for your quick reply.
I am using 11.1 version only but the code does not seem to be working anyhow.
I was asking whether do I need to register this event anywhere else in the code or not?
I have placed the WebDataGrid in a Content Page under an UpdatePanel content template.
Can you please upload the sample that you have created? It would be helpful for me I guess.
Thanks in advance.