Processing event on the server with
ContainerGrid g = (ContainerGrid) sender ; int b = (int)g.Rows.Count;
from here :
a. How to scan efficiently through every row, seems like foreach not working
b. If I need to find particular row in the grid, by using known value of keyfield is any other way then scanning through every row.
thanks
Hi mcseidel,
When you are trying to get the rows count? Can you post the grid's markup?
Thank you
1. RowUpdating
2.
<ig:WebScriptManager ID="igwsm" runat="server"> </ig:WebScriptManager> <ig:WebHierarchicalDataGrid ID="whdg" runat="server" AutoGenerateColumns="False" DataKeyFields="idMaster" Height="373px" Key="idMaster" Width="1040px" onrowislandspopulating="whdg_RowIslandsPopulating" oncalculatecustomsummary="whdg_CalculateCustomSummary" onrowupdating="whdg_RowUpdating"> <Columns> <ig:BoundDataField DataFieldName="idMaster" DataType="System.Int32" Key="idMaster"> <Header Text="idMaster" /> </ig:BoundDataField> <ig:BoundDataField DataFieldName="Account" DataType="System.String" Key="Account"> <Header Text="Account" /> </ig:BoundDataField> <ig:BoundDataField DataFieldName="Description" Key="Description"> <Header Text="Description" /> </ig:BoundDataField> <ig:BoundDataField DataFieldName="Amount" DataType="System.Int64" Key="Amount"> <Header Text="Amount" /> </ig:BoundDataField> </Columns> <Behaviors> <ig:EditingCore EnableInheritance="true" AutoCRUD="False"> <Behaviors> <ig:CellEditing EnableInheritance="true"> <EditModeActions MouseClick="Single" /> </ig:CellEditing> </Behaviors> </ig:EditingCore> <ig:SummaryRow AnimationEnabled="True" EmptyFooterText="-No- " FormatString="Overall Balance : ${1}" ShowSummariesButtons="False" SummariesCssClass="Summary01" EnableInheritance="True" > <ColumnSummaries> <ig:ColumnSummaryInfo ColumnKey="Amount"> <Summaries> <ig:Summary CustomSummaryName="Cust01" SummaryType="Custom" /> </Summaries> </ig:ColumnSummaryInfo> </ColumnSummaries> <%-- <ColumnSettings> <ig:SummaryRowSetting ColumnKey="Amount" ShowSummaryButton="False" FormatString="AUX : {1}" EnableColumnSummaryOptions="False"> <SummarySettings> <ig:SummarySetting CustomSummaryName="Alibaba" SummaryType="Sum" /> </SummarySettings> </ig:SummaryRowSetting> </ColumnSettings>--%> </ig:SummaryRow> <ig:Activation> </ig:Activation> </Behaviors> </ig:WebHierarchicalDataGrid>