Dear All,
I am stuck up with one issue. For my application I am using ultrawebgrid. The parent ultrawebgrid contains two child webgrid.
When i add one record in the child grid, one calculated row is added after the first record. But when i add few more records to the child grid the location of the calculated row is always the second row. I just wanted it to be the last row of the grid whatever may be the number of rows added to the grid.
Regards,
Preet Sahani
I am not completely sure I understand the whole scenario in detail. Is UltraWebGrid1.DisplayLayout.ActiveRow.Index applicable in your case? Also, how are you adding row, is there some sample code and ASPX declaratation that we can use in order to reproduce that?
Here is the code for aspx declaration
<DisplayLayout AllowDeleteDefault="Yes" ColWidthDefault="" MergeStyles="False" AutoGenerateColumns="False"
AllowAddNewDefault="Yes" RowHeightDefault="20px" Version="4.00" ViewType="Hierarchical" ScrollBar="Never"
IndentationDefault="16" RowSelectorsDefault="No" Name="grd" CellClickActionDefault="Edit"
AllowUpdateDefault="Yes">
<ClientSideEvents BeforeEnterEditModeHandler="onBeforeEnterEditMode" AfterRowUpdateHandler="onRowChange"></ClientSideEvents>
<Pager>
</Pager>
<HeaderStyleDefault CssClass="header"></HeaderStyleDefault>
<FrameStyle Width="760px" CssClass="datagrid"></FrameStyle>
<SelectedHeaderStyleDefault CssClass="selected"></SelectedHeaderStyleDefault>
<EditCellStyleDefault BorderWidth="0px" BorderStyle="None"></EditCellStyleDefault>
<RowAlternateStyleDefault CssClass="alternate"></RowAlternateStyleDefault>
<RowStyleDefault CssClass="normal"></RowStyleDefault>
</DisplayLayout>
<Bands>
<igtbl:UltraGridBand AddButtonCaption="Total1" AllowUpdate="Yes" AllowAdd="Yes" SelectTypeRow="Single"
Key="SubTotals" CellClickAction="Edit" DataKeyField="Id">
<Columns>
<igtbl:UltraGridColumn HeaderText="Group" Key="Type" IsBound="True" Width="200px" BaseColumnName="TypeName"
AllowUpdate="Yes">
<Footer Key="Type"></Footer>
<Header Key="Type" Caption="Group"></Header>
</igtbl:UltraGridColumn>
<igtbl:UltraGridColumn HeaderText="Test1" Key="TestValue" FieldLen="30" IsBound="True" Width="80px"
Format="#.00E+00" BaseColumnName="Value">
<Footer Key="TestValue"></Footer>
<Header Key="TestValue" Caption="Test1"></Header>
<igtbl:UltraGridColumn HeaderText="Test2" Key="TestValue1" FieldLen="30" IsBound="True" Width="80px" Format="#.00E+00"
BaseColumnName="TestValue">
<Footer Key="TestValue1"></Footer>
<Header Key="TestValue1" Caption="Test2"></Header>
<igtbl:UltraGridColumn Key="AddActivity" Width="80px" Type="Button" BaseColumnName="" NullText="Add New Record">
<CellButtonStyle CssClass="button"></CellButtonStyle>
<CellStyle CssClass="button"></CellStyle>
<Footer Key="AddActivity"></Footer>
<Header Key="AddActivity"></Header>
<igtbl:UltraGridColumn Key="Delete" Width="80px" Type="Button" BaseColumnName="" NullText="Delete Group">
<Footer Key="Delete"></Footer>
<Header Key="Delete"></Header>
</Columns>
</igtbl:UltraGridBand>
<igtbl:UltraGridBand AddButtonCaption="Activities" AllowUpdate="Yes" AllowAdd="Yes" SelectTypeRow="Single"
Key="Activities" CellClickAction="Edit" AllowDelete="Yes" DataKeyField="Id">
<igtbl:UltraGridColumn HeaderText="Test1" Key="Test3" IsBound="True" Width="200px" BaseColumnName="Name1"
<Footer Key="Test3"></Footer>
<Header Key="Test3" Caption="Test1"></Header>
<igtbl:UltraGridColumn HeaderText="Test4" Key="ActivityValue" FieldLen="30" IsBound="True" Width="80px"
<Footer Key="ActivityValue"></Footer>
<Header Key="ActivityValue" Caption="Test4"></Header>
<igtbl:UltraGridColumn Key="DeleteActivity" Width="160px" Type="Button" BaseColumnName="" NullText="Delete Record">
<Footer Key="DeleteActivity"></Footer>
<Header Key="DeleteActivity"></Header>
</Bands>
</igtbl:ultrawebgrid>
Please check this declaration and let me know whether we have to set some properties of grid which in turn can add calculated row in the grid , which will be calculated from the value of some column in the grid.