Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
35
ASP.NET - WebDataGrid - Button in column - click event is not firing
posted

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;
            }
        }