Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
240
EnableClientRendering not producing the expected template
posted

I have a grid with the definition below.  I would like to use client binding given the page's requirements, but I am currently having multiple issues.

  1. When I bind this grid on the server, the rows have the padding and background color as desired from my ItemCssClass and AltItemCssClass attributes.  When I enable client binding and bind on the client to an array of objects retrieved via web service, my rows aren't decorated with those css classes that I have specified.  The header has the proper css class, but the rows have none.
  2. When binding on the client, the first column, which contains a field of type DateTime is completely empty, as if the client binding is skipping that column.  When binding on server side I was not having an issue with this column.
  3. When binding on the client, the last column which is specified as Hidden="True" is completely visible.  Are hidden columns not supported for client binding?  And if so, how should I get my row's key values otherwise?

Thanks!

 

<ig:WebDataGrid ID="wdgPlanningAddIncreases" runat="server" AutoGenerateColumns="False" EnableClientRendering="true"
    AltItemCssClass="rowAlternateGrid" EnableTheming="False" ItemCssClass="rowStyleGrid"
    DataKeyFields="IncreaseInst" BorderColor="Gray" BorderStyle="None" DefaultColumnWidth="100px"
    BorderWidth="1px" CellSpacing="1" HeaderCaptionCssClass="headerGrid"
    ClientIDMode="Static" Height="125px" CssClass="ui-widget-content">
    <Columns>
        <ig:BoundDataField DataFieldName="IncreaseDate" DataFormatString="{0:d}" DataType="System.DateTime"
            Key="IncreaseDate" CssClass="gridCenterAlign">
            <Header Text="Increase Date" CssClass="gridCenterAlign" />
        </ig:BoundDataField>
        <ig:BoundDataField DataFieldName="IncreaseTypeText" DataType="System.String"
            Key="IncreaseTypeText" CssClass="gridCenterAlign">
            <Header Text="Increase Type" CssClass="gridCenterAlign" />
        </ig:BoundDataField>
        <ig:BoundDataField DataFieldName="IncreaseAmount" DataType="System.String" CssClass="gridRightAlign"
            Key="IncreaseAmount">
            <Header Text="Increase Amount" CssClass="gridRightAlign" />
        </ig:BoundDataField>
        <ig:BoundDataField DataFieldName="IncreaseFrequencyTypeText" DataType="System.String"  CssClass="gridCenterAlign"
            Key="IncreaseFrequencyTypeText">
            <Header Text="Frequency" CssClass="gridCenterAlign" />
        </ig:BoundDataField>
        <ig:BoundDataField DataFieldName="NewScheduledAmount" DataType="System.Decimal" DataFormatString="{0:C2}" CssClass="gridRightAlign"
            Key="NewScheduledAmount" Width="150px">
            <Header Text="Amount" CssClass="gridRightAlign" />
        </ig:BoundDataField>
        <ig:BoundDataField DataFieldName="IncreaseInst" DataType="System.Int32"
            Hidden="True" Key="IncreaseInst">
            <Header Text="IncreaseInst" />
        </ig:BoundDataField>
    </Columns>
    <Behaviors>
        <ig:Selection CellClickAction="Row" CellSelectType="Single" RowSelectType="Single"
            SelectedCellCssClass="rowSelectedGrid">
            <SelectionClientEvents RowSelectionChanged="wdgPlanningAddIncreases_RowSelectionChanged" />
        </ig:Selection>
        <ig:EditingCore Enabled="true">
        </ig:EditingCore>
    </Behaviors>
</ig:WebDataGrid>

Parents Reply Children
No Data