hide columnn without losing structure

8 replies. Last post: September 2, 2009 11:34 PM by Gordon Tumewu
Tags :
  • (None)
  • New Discussion
  • New Question
  • New Product Feedback
koby shaboMember

hi i have a nested(With Child Table) web grid

when i try to hide columns after getting from db what columns should appear i lose the structure

in my remarks column i get the values of other columns

please tell me how to do this

<
ISWebGrid:WebGrid ID="WebGrid1" runat="server" Height="100%" DataMember="parent"

UseDefaultStyle="True" DefaultStyleMode="Elegant" Width="100%" OnInitializeDataSource="WebGrid1_InitializeDataSource" OnInitializeLayout="WebGrid1_InitializeLayout"

OnBatchUpdate="WebGrid1_BatchUpdate" OnInitializeRow="WebGrid1_InitializeRow">

<LayoutSettings AutoHeight="true" AutoFitColumns="false" AllowSelectColumns="Yes"

AllowExport="Yes" AllowFilter="Yes" AllowContextMenu="true" CellClickAction="CellSelect"

AllowBatchUpdate="true" Hierarchical="true" AllowEdit="Yes" AllowSorting="Yes">

<ClientSideEvents OnCellDblClick="MainGridDbClick()" OnAfterExitEditMode="CalcUsedBudget()"

OnEnterEditMode="SetPreTotalAmount" OnInitialize="ColumnPer();" />

</LayoutSettings>

<RootTable DataMember="parent" DataKeyField="exec_guid">

<ChildTables>

<ISWebGrid:WebGridTable DataMember="child" DataKeyField="exec_guid">

<Columns>

<ISWebGrid:WebGridColumn Caption="exec_guid" DataMember="exec_guid" Visible="false"

EditType="NoEdit" Name="exec_guid">

</ISWebGrid:WebGridColumn>

<ISWebGrid:WebGridColumn Caption="™ š™Œ…" DataMember="payment_name" EditType="NoEdit"

Name="payment_name">

</ISWebGrid:WebGridColumn>

<ISWebGrid:WebGridColumn Caption="‘‹… Œš™Œ…" DataMember="payment_value" DataType="System.Float"

EditType="NoEdit" Name="payment_value" DataFormatString="n">

</ISWebGrid:WebGridColumn>

<%
-- <ISWebGrid:WebGridColumn Caption="—‰… ”˜…ˆ ‡‰™…" ColumnType="CheckBox" DataMember="debug_enabled"

DataType="System.Bit" EditType="NoEdit" Name="debug_enabled">

</ISWebGrid:WebGridColumn>

<ISWebGrid:WebGridColumn Caption="‹š…š" DataMember="debug_url" EditType="NoEdit"

Name="debug_url">

</ISWebGrid:WebGridColumn>--%>

%>

</Columns>

</ISWebGrid:WebGridTable>

</ChildTables>

<Columns>

<ISWebGrid:WebGridColumn Caption="plan_exec_result_id" DataMember="plan_exec_result_id"

Visible="false" EditType="NoEdit" Name="plan_exec_result_id" Width="100px">

</ISWebGrid:WebGridColumn>

<ISWebGrid:WebGridColumn Caption="exec_guid" DataMember="exec_guid" Visible="false"

EditType="NoEdit" Name="exec_guid" Width="100px">

</ISWebGrid:WebGridColumn>

<ISWebGrid:WebGridColumn Caption="™" DataMember="person_name" ColumnType="Text"

EditType="NoEdit" Name="payment_name" Width="100px">

</ISWebGrid:WebGridColumn>

<ISWebGrid:WebGridColumn Caption='š"†' DataMember="person_pid_no" EditType="NoEdit"

Name="person_pid_no" Width="100px">

</ISWebGrid:WebGridColumn>

<ISWebGrid:WebGridColumn Caption="š”—‰ƒ" DataMember="person_position_name" EditType="NoEdit"

Name="person_position_name" Width="100px">

</ISWebGrid:WebGridColumn>

<ISWebGrid:WebGridColumn Caption="Ž‡Œ—„" DataMember="unit_name" EditType="NoEdit"

Name="unit_name" Width="100px">

</ISWebGrid:WebGridColumn>

<ISWebGrid:WebGridColumn Caption="š…‹‰š" DataMember="plan_name" EditType="NoEdit"

Name="plan_name" Width="100px">

</ISWebGrid:WebGridColumn>

<ISWebGrid:WebGridColumn Caption="š™Œ… ‘‰‘" DataMember="payment_value" DataType="System.Decimal"

DataFormatString="n" EditType="NoEdit" Name="payment_value" Width="100px">

</ISWebGrid:WebGridColumn>

<ISWebGrid:WebGridColumn Caption="„…‘”š €‡…†" DataMember="manager_per" DataType="System.Decimal"

DataFormatString="n" EditType="TextBox" Name="manager_per" DefaultText="0" Width="100px"

InputRequired="True" InputRequiredErrorText="Please enter a value" DefaultValue="0">

</ISWebGrid:WebGridColumn>

<ISWebGrid:WebGridColumn Caption="„…‘”š ’˜Š" DataMember="manager_quantity" DataType="System.Decimal"

DataFormatString="n" EditType="TextBox" Name="manager_quantity" Width="100px"

DefaultValue="0" DefaultText="0" InputRequired="True" InputRequiredErrorText="Please enter a value">

</ISWebGrid:WebGridColumn>

<ISWebGrid:WebGridColumn Caption='‘„"‹ Œš™Œ…' DataMember="manager_total_amount"

DataType="System.Decimal" DataFormatString="#.##" EditType="NoEdit" Name="manager_total_amount"

Width="100px">

</ISWebGrid:WebGridColumn>

<ISWebGrid:WebGridColumn Caption="„’˜…š" DataMember="manager_remarks" EditType="TextBox"

Name="manager_remarks" Width="100px">

</ISWebGrid:WebGridColumn>

<ISWebGrid:WebGridColumn Caption="URL" DataMember="debug_url" EditType="TextBox"

Visible="false" Name="debug_url" Width="100px">

</ISWebGrid:WebGridColumn>

</Columns>

</RootTable>

</ISWebGrid:WebGrid>

All times are GMT -5. The time now is 6:36 PM.
Previous Next