Hello all,
I'm using Infragistic : WebDataGrid Control. I've added one Command button displayed in each row. What i want to do is when i click on any command button for a particular row the individual fields in that particular row should display in controls like TextBoxes. Major prob is I'm not getting how to get a "Button's Click" event inside WebDataGrid control. Pls Check the Code for Gid :
<ig:WebDataGrid ID="grdData" AutoGenerateColumns="False" EnableAjax="False" CssClass="WebDataGridStyle" autopostback="false" runat="server" Height="350px" Width="990px" EnableViewState="False"> <Behaviors> <ig:Selection CellClickAction="Row" RowSelectType="Single" SelectedCellCssClass="WebDataGridSelectedRow"> </ig:Selection> <ig:Activation ActiveRowCssClass="WebDataGridSelectedRow"> </ig:Activation> <ig:ColumnResizing Enabled="true" /> </Behaviors> <Columns> <ig:BoundDataField DataFieldName="ID" Key="Id" HtmlEncode="true" Hidden="true" CssClass="WebDataGridItemStyle"> <Header Text="ID" /> </ig:BoundDataField> <ig:BoundDataField DataFieldName="AppName" Key="AppName" HtmlEncode="true" Width="200px" CssClass="WebDataGridItemStyle"> <Header Text="Application Name" /> </ig:BoundDataField> <ig:BoundDataField DataFieldName="ModuleName" Key="ModuleName" HtmlEncode="true" Width="220px" CssClass="WebDataGridItemStyle"> <Header Text="Module Name" /> </ig:BoundDataField> <ig:BoundDataField DataFieldName="WorkTime" Key="WorkTime" HtmlEncode="true" Width="100px" CssClass="WebDataGridItemStyle"> <Header Text="Work Time" /> </ig:BoundDataField> <ig:BoundDataField DataFieldName="Notes" Key="Notes" HtmlEncode="true" Width="100%" CssClass="WebDataGridItemStyle"> <Header Text="Notes" /> </ig:BoundDataField> <ig:BoundDataField DataFieldName="isLocked" Key="isLocked" HtmlEncode="true" Hidden="true" Width="15px" CssClass="WebDataGridItemStyle"> <Header Text="Locked" /> </ig:BoundDataField> <ig:BoundDataField DataFieldName="isMailSent" Key="isMailSent" HtmlEncode="true" Hidden="true" Width="100%" CssClass="WebDataGridItemStyle"> <Header Text="Mail Sent" /> </ig:BoundDataField> <ig:TemplateDataField Key="Edit" Width="18px"> <ItemTemplate> <asp:Button ID="btnEditReport" runat="server" Text="Edit" CommandName="EditRpt" CommandArgument="EditReport" /> </ItemTemplate> <Header Text="Edit" /> </ig:TemplateDataField> </Columns> <EmptyRowsTemplate> <div style="text-align:center;"> <br /> <br/> <img src="App_Themes/Mrecord-Default/Images/exclamation.png" align="absmiddle" alt=""/> No records found. </div> </EmptyRowsTemplate> </ig:WebDataGrid>
Hello ash , I have seen your code and hope this helps .
you can add events on server side after webdatagrid like i did in the example below
<ig:WebDataGrid ID="grdData" AutoGenerateColumns="False" EnableAjax="False" CssClass="WebDataGridStyle" autopostback="false" runat="server" Height="350px" Width="990px" EnableViewState="False" ondatabound="Your Function">
or you can add client events <ClientEvents-Click> in the web webdatagrid too ... Hope that helped you
<ClientEvents-Click> in the web webdatagrid too ... Hope that helped you
did you find the solution the above