Hello,
I have WebDataGrid with TemplateDataField, which is a Button with OnClick event .
But after clicking button in grid the event is not firing. I've tried to set the breakpoint in the event code but it looks like program doesn't get into the code.
Please tell me - what am I missing ? I've tried to set EnableAjax property "on" and "off", and many other things - no effect.
One more thing - after clicking the button in column rows in the grid are disappear , there is only a header row.
(Visual Studio 2010, Infragistics 2012)
My ASPX code :
<ig:WebDataGrid ID="uwgProdukcje" runat="server" AutoGenerateColumns="False" BackColor="Info" BorderColor="InactiveCaption" BorderStyle="Solid" BorderWidth="1px" Height="95%" Width="100%" >
<Columns> <ig:TemplateDataField Key="editbutton" Width="45px"> <ItemTemplate> <asp:Button ID="SelectLink" runat="server" onclick="SelectLink_Click" Text="Edit" /> </ItemTemplate> <Header Text="Edycja" /> </ig:TemplateDataField> <ig:BoundDataField DataFieldName="nr_edycji" DataType="System.String" Key="jdestatus" Width="34px"> <Header Text="JDE Status" /> </ig:BoundDataField>
</Columns> </ig:WebDataGrid>
CS code :
protected void SelectLink_Click(object sender, EventArgs e) { try { int a = 1; } catch (Exception ex) { throw; } }
Thank you for contacting us.
This is truly very strange, I don't see nothing strange or incorrect in your code in fact I've created a sample based on it and everything looks okay.
Could you please try the sample and tell me is the click event hitting now?
Also could you please provide me with more details for example what is your exact product version. The sample that I am sending to you now use version 13.2.20132.2077.
It will be highly appreciated if you could try to reproduce the issue in the attached sample.
Looking forward to hearing from you.
I am just following up to see what is the status of this issue.
Hi,
is tehre any solution? I have the same problem and tried all the things from other posts but nothing worked for me.
<ig:TemplateDataField Key="pdfbutton" Header-Text="update2"> <ItemTemplate> <asp:LinkButton class="gridRowColumnShowPDF" ID="pdfTest" runat="server" OnClick="pdfTest_Click" CommandName="pdfTest_Click" CausesValidation="false" /> </ItemTemplate> </ig:TemplateDataField>
protected void pdfTest_Click(object sender, EventArgs e) { }
On the grid I set EnableDataViewState="true" EnableAjax="false" which many other guys also said. But for me the event in code behind is never firing.
Any ideas?
Alex