Click here to Skip to main content
15,938,218 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have a datagrid with a button column and boundcolumns And templatecolumns.When clicked on the button column firing datagrid selectedindex change event and do the functions. Its working. But when I am adding the onItemcommand event SelectedIndex is not firing

<ERP:DFDataGrid ID="dgProducts"  runat="server" AdjustFilterX="0" AdjustFilterY="0"
                                                          AutoGenerateColumns="False" CssClass="Listing"
                                                      EnableExcel="No" EnableFilter="Yes" EnablePaging="Yes" EnablePdf="No"
                                                      EnablePrint="No" EnableRowClickEvent="False" EnableWord="No"
                                                      FilterStatus="OffMode" OnApplyFilterClick=""
                                                       VisibleHeader="No"  onitemcommand="dgProducts_ItemCommand" PageSize="2"
                                                          AllowPaging="True"
                                                          DataKeyField="InvP_SeqNo"
                                                           önselectedindexchanged="dgProducts_SelectedIndexChanged"><alternatingitemstyle>
                                                      CssClass="GridAlterItem" />
                                          <columns>
                                              <asp:BoundColumn DataField="InvP_SeqNo" HeaderText="SeqNo">
                                              <asp:ButtonColumn  HeaderText="Select Product"
                                                  Text="Select Product">
                                                  <asp:BoundColumn DataField="InvP_ProdID" HeaderText="ProdID"
                                                  Visible="False">
                                              <asp:BoundColumn DataField="InvP_ID" HeaderText="InvpId" Visible="False">

                                              <asp:BoundColumn DataField="InvP_UnitId" HeaderText="UnitId" Visible="False">

                                              <asp:BoundColumn DataField="Invp_LineNo" HeaderText="Line No">
                                              <asp:BoundColumn DataField="InvP_ProdAlias" HeaderText="Alias">

                                              <asp:BoundColumn DataField="InvP_ProdName" HeaderText="Product Name">

                                              <asp:BoundColumn DataField="UOM_Name" HeaderText="Unit">
                                              <asp:BoundColumn DataField="BalanceQty" HeaderText="Balance Quantity">

                                              <asp:BoundColumn DataField="InvP_Qty" HeaderText="Quantity ">
                                              <asp:BoundColumn DataField="InvP_Rate" HeaderText="Rate">
                                              <asp:BoundColumn DataField="InvP_Amount" HeaderText="Amount">
                                              <asp:BoundColumn DataField="InvP_GrossWeight" HeaderText="Gross Weight">

                                              <asp:BoundColumn DataField="InvP_NetWeight" HeaderText="Net Weight">

                                              <asp:BoundColumn DataField="InvP_ProdDesc" HeaderText="Description "
                                                  Visible="False">
                                              <asp:BoundColumn DataField="InvP_ProdDesc1" HeaderText="Description 1"
                                                  Visible="False">
                                              <asp:BoundColumn DataField="InvP_ProdDesc2" HeaderText="Description 2"
                                                  Visible="False">
                                              <asp:BoundColumn DataField="InvP_HSCode" HeaderText="HSCode">
                                                <asp:TemplateColumn>
                          <itemtemplate>
                          <ERP:Button ID="btnView0"  runat="server" ButtonType="Icon_View" CausesValidation="false"
                                                          CommandArgument='<%#DataBinder.Eval(Container.DataItem,"Invp_SeqNo")%>'
                                                          CommandName="Viewing" KeyValues="Find" Text="" ToolTip="View" /><ERP:Button
                                                          ID="btnEdit0"  runat="server" ButtonType="Icon_Edit" CausesValidation="false"
                                                          CommandArgument='<%#DataBinder.Eval(Container.DataItem,"Invp_SeqNo")%>'
                                                          CommandName="editing" KeyValues="Save" Text="" ToolTip="Edit" /><%--<ERP:Button
                                                          ID="btnDisable0"  runat="server" ButtonType="Icon_Delete"
                                                          CausesValidation="false"
                                                          CommandArgument='<%#DataBinder.Eval(Container.DataItem,"Invp_SeqNo")%>'
                                                          CommandName="deleting" ConfirmationMessage="Are you sure to delete this?"
                                                          IsConfirmationButton="True" KeyValues="Save" Text="" ToolTip="Delete" />--%>

                                                  </itemtemplate>


                                                  </columns>
                                                  <HeaderStyle CssClass="GridHeader" />
                                                  <itemstyle cssclass="GridItem" />
                                                  <SelectedItemStyle CssClass="GridSelectedItem" />
                                                  </alternatingitemstyle>
Posted
Updated 11-Sep-13 23:08pm
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month


CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900