This is a migrated thread and some comments may be shown as answers.

Grid page size changed

5 Answers 198 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Roman Krsko
Top achievements
Rank 1
Roman Krsko asked on 20 May 2011, 07:17 AM
Hi,

I have a Telerik RadGrid and when I change page size from 10 to 20 next 10 rows are not formated (see attachment - grid-result-page.jpg, grid-page.jpg). I use client-side databinding. Where I do mistake?
Thanks for answer.

My grid code
<telerik:RadGrid ID="grdResult" runat="server" AllowPaging="True"
            AllowSorting="True" AutoGenerateColumns="False" GridLines="None"
            PageSize="20" Width="100%" BorderStyle="None" EnableEmbeddedSkins="False"
            EnableViewState="true" Culture="de-DE" ShowFooter="True" ShowGroupPanel="True">
            <ClientSettings AllowDragToGroup="True" EnableRowHoverStyle="true" DataBinding-CountPropertyName="CountProduct" DataBinding-DataPropertyName="DataProduct">
                <Selecting AllowRowSelect="true" />
                <DataBinding Location="WebServiceProduct.asmx" SelectMethod="GetDataAndCount" EnableCaching="false"/>
                <ClientEvents OnDataBinding="grdResult_DataBinding" OnDataBound="grdResult_DataBound"/>
            </ClientSettings>
            <HeaderStyle Wrap="False" />
            <MasterTableView GroupLoadMode="Client">
                <GroupByExpressions>
                    <telerik:GridGroupByExpression>
                        <SelectFields>
                            <telerik:GridGroupByField FieldAlias="USER_Profile" FieldName="USER_Profile"></telerik:GridGroupByField>
                        </SelectFields>
                        <GroupByFields>
                            <telerik:GridGroupByField FieldName="USER_Profile"></telerik:GridGroupByField>
                        </GroupByFields>
                    </telerik:GridGroupByExpression>
                </GroupByExpressions>
                <Columns>
                    <telerik:GridBoundColumn DataField="GroupIcon" HeaderText="Group" UniqueName="colResultGroup" ItemStyle-CssClass="grid_td_line"></telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="Text1" HeaderText="Typ Caption" UniqueName="colResultText1" ItemStyle-CssClass="grid_td_line"></telerik:GridBoundColumn>
             <telerik:GridBoundColumn DataField="USER_Profile" HeaderText="USER_Profile" UniqueName="USER_Profile" ItemStyle-CssClass="grid_td_line"></telerik:GridBoundColumn>
                    ...
                </Columns>
          </MasterTableView>
          <PagerStyle Mode="NextPrevAndNumeric" PageButtonCount="10" />
          <GroupingSettings ShowUnGroupButton="true" />
</telerik:RadGrid>



Best regards
Roman

5 Answers, 1 is accepted

Sort by
0
Pavlina
Telerik team
answered on 20 May 2011, 11:02 AM
Hi Roman,

This behavior is due to the fact that RadGrid serialize its ItemStyle on client. Thus the style will be applied only for the rows that are initially rendered from server.
You can handle RowDataBound client event and apply the style for all desired table cells for current item that is being bound in order to workaround this behavior.

http://www.telerik.com/help/aspnet-ajax/client-side-binding.html
http://www.telerik.com/help/aspnet-ajax/client-side-binding-specifics.html

I hope this helps.

Best wishes,
Pavlina
the Telerik team

Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.

0
Roman Krsko
Top achievements
Rank 1
answered on 26 May 2011, 02:11 PM
Hi Pavlina,
thanks for your answer, I will see it.
Roman
0
Pavlina
Telerik team
answered on 26 May 2011, 03:33 PM
Hi Roman,

Give this suggestion a try and let me know if it works for you or you need additional assistance.

Kind regards,
Pavlina
the Telerik team

Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.

0
Roman Krsko
Top achievements
Rank 1
answered on 31 May 2011, 08:47 PM
Hi Pavlina,

is possible set css class for cell with client side.

Something as
args.get_item().get_cell("collumnName").CssClass = "classname";

Thanks for answer.

R.
0
Roman Krsko
Top achievements
Rank 1
answered on 31 May 2011, 09:21 PM
Hi,

I solved it, I used
args.get_item().get_cell("colName").className ...

Roman
Tags
Grid
Asked by
Roman Krsko
Top achievements
Rank 1
Answers by
Pavlina
Telerik team
Roman Krsko
Top achievements
Rank 1
Share this question
or