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
325
Enable client rendering messes up the grid
posted

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

<ig:WebDataGrid ID="BaseAccountingGrid" runat="server" Height="200px" Width

="1160px"

 

 

 

CssClass="vms-template-grid" AutoGenerateColumns="false" DataKeyFields

="RateID"

 

 

 

EnableDataViewState="true" EnableViewState="true" EnableClientRendering

="true">

 

 

 

<Columns

>

 

 

 

<ig:BoundDataField Key="RateID" DataFieldName="RateID" Header-Text="RateID" Hidden

="true">

 

 

 

</ig:BoundDataField

>

 

 

 

<ig:TemplateDataField Key="Delete" Header-Text="" Width="30px" CssClass

="control-column"

 

 

 

Header-CssClass

="control-column-header">

 

 

 

<HeaderTemplate

>

 

 

 

<asp:ImageButton ID="btnHeaderDelete" runat="server" OnClientClick

="DeleteRow();return false;"

 

 

 

ToolTip="delete" AlternateText="" ImageUrl="images/cross.png"

/>

 

 

 

</HeaderTemplate

>

 

 

 

<ItemTemplate

>

 

 

 

<asp:ImageButton ID="deleteBtn" runat="server" OnClientClick

="DeleteRow();return false;"

 

 

 

ToolTip="delete" AlternateText="" ImageUrl="images/cross.png"

/>

 

 

 

</ItemTemplate

>

 

 

 

</ig:TemplateDataField

>

 

 

 

<ig:BoundDataField Key="RateCode" DataFieldName="RateCode" Header-Text

="Rate Code"

 

 

 

Width

="430px">

 

 

 

</ig:BoundDataField

>

 

 

 

<ig:BoundDataField Key="Name" DataFieldName="RateCode" Header-Text="Name" Hidden

="true">

 

 

 

</ig:BoundDataField

>

 

 

 

<ig:BoundDataField Key="Category" DataFieldName="Category" Header-Text

="Category/UOM">

 

 

 

</ig:BoundDataField

>

 

 

 

<ig:BoundDataField Key="RateType" DataFieldName="RateType" Header-Text

="Rate Type"

 

 

 

Hidden

="true">

 

 

 

</ig:BoundDataField

>

 

 

 

<ig:TemplateDataField Header-Text="Calc" Key="calcCheck" Width

="30px">

 

 

 

<ItemTemplate

>

 

 

 

<asp:CheckBox ID="calcCheck" runat="server" onclick="calcRates(this);" EnableViewState

="true">

 

 

 

</asp:CheckBox

>

 

 

 

</ItemTemplate

>

 

 

 

</ig:TemplateDataField

>

 

 

 

<ig:BoundDataField Key="Rates" DataFieldName="Rates" Header-Text="Rates" Width

="140px">

 

 

 

</ig:BoundDataField

>

 

 

 

<ig:BoundDataField Header-Text="Min" Key="MinRate" Width="140px" DataFieldName

="MinRate"

 

 

 

CssClass="editable-cell number-column" Header-CssClass

="number-column-header"

 

 

 

DataFormatString="{0:F}" HtmlEncode="false" DataType

="System.Double">

 

 

 

</ig:BoundDataField

>

 

 

 

<ig:BoundDataField Header-Text="Max" Key="MaxRate" Width="140px" DataFieldName

="MaxRate"

 

 

 

CssClass="editable-cell number-column" Header-CssClass

="number-column-header"

 

 

 

DataFormatString="{0:F}" HtmlEncode="false" DataType

="System.Double">

 

 

 

</ig:BoundDataField

>

 

 

 

<ig:BoundDataField Key="HoursPerDay" DataFieldName="HoursPerDay" Hidden

="true">

 

 

 

</ig:BoundDataField

>

 

 

 

<ig:BoundDataField Key="HoursPerWeek" DataFieldName="HoursPerWeek" Hidden

="true">

 

 

 

</ig:BoundDataField

>

 

 

 

<ig:BoundDataField Key="RateCodeId" DataFieldName="RateCodeId" Hidden

="true">

 

 

 

</ig:BoundDataField

>

 

 

 

</Columns

>

 

 

 

<Behaviors

>

 

 

 

<ig:Selection CellClickAction="Row" RowSelectType

="Single">

 

 

 

</ig:Selection

>

 

 

 

<ig:Activation Enabled

="true">

 

 

 

</ig:Activation

>

 

 

 

<ig:EditingCore Enabled

="true">

 

 

 

<Behaviors

>

 

 

 

<ig:RowAdding Enabled="true"></ig:RowAdding

>

 

 

 

<ig:RowDeleting Enabled="true"

/>

 

 

 

<ig:CellEditing

>

 

 

 

<ColumnSettings

>

 

 

 

<ig:EditingColumnSetting ColumnKey="RateCode" ReadOnly="true"

/>

 

 

 

<ig:EditingColumnSetting ColumnKey="Name" ReadOnly="true"

/>

 

 

 

<ig:EditingColumnSetting ColumnKey="Category" ReadOnly="true"

/>

 

 

 

<ig:EditingColumnSetting ColumnKey="RateType" ReadOnly="true"

/>

 

 

 

<ig:EditingColumnSetting ColumnKey="Rates" ReadOnly="true"

/>

 

 

 

</ColumnSettings

>

 

 

 

</ig:CellEditing

>

 

 

 

</Behaviors

>

 

 

 

</ig:EditingCore

>

 

 

 

</Behaviors

>

 

 

 

</ig:WebDataGrid

>

My grid looks as given above.

1.After i enabled client rendering on grid i am getting Sys.FormatException as i have set DataFormatString to certain columns in my grid.

How can i fix this?

2.

grid.get_columns().get_column(0).set_hidden(

 

true);

I tried hiding certain columns in the grid as given above.

But this just hides the column header and not the cells in the column.

So i tried hiding the cells by

$(grid.get_rows().get_row(i).get_cell(0).get_element()).hide();

This messes up the CSS applied to the grid and the widths of the columns are totally messed up.

Can you please suggest me methods to get over this problems.

Thanks,

Divya

Parents Reply Children