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

Radgrid height changing on sorting

1 Answer 64 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Ram
Top achievements
Rank 1
Ram asked on 08 Nov 2011, 03:29 PM
Hi
I have a radgrid.
When I'm sorting the fields the grid height is changing and  headertext also changing like if headertext is in two words
after click the column words showing one on another.
I have to display time into two line, so I hardcoded the headertext width.
When grid load initially its showing date correctly, but if I do soting its not showing date correctly as I expected.
Like this if I sort one column other getting affected.
.I have this problem in two grid.
here is my code.
Please help me as soon as possible
<telerik:RadAjaxPanel ID="callogRadPnl" runat="server">
       <telerik:RadGrid  ID="callogGrd" style="border:0; margin-top:-20px;" runat="server" AllowSorting="true"   PageSize="5" AllowPaging="true" Width="99%"  
                                CssClass="gridView1" AutoGenerateColumns="false"  
                    onitemcommand="callogGrd_ItemCommand1" onitemcreated="callogGrd_ItemCreated" AllowFilteringByColumn="true" 
                                        onneeddatasource="callogGrd_NeedDataSource" 
                                oninit="callogGrd_Init">
       <MasterTableView>
       <HeaderStyle HorizontalAlign="Left" Height="10px" />
       <ItemStyle Font-Names="Arial" Font-Size="12px" ForeColor="#000000"/>      
       <AlternatingItemStyle Font-Names="Arial" Font-Size="12px" ForeColor="#000000"/>
       <PagerStyle Mode="NumericPages"/>
       <Columns>
       <telerik:GridBoundColumn DataField="BeginTime" HeaderText="Begin" SortExpression="BeginTime" HeaderStyle-Width="150px" FilterControlWidth="55px"/>
       <telerik:GridBoundColumn DataField="EndTime" HeaderText="EndTime" SortExpression="EndTime" HeaderStyle-Width="180px" AllowFiltering="false" />
       <telerik:GridBoundColumn DataField="DispatcherName" HeaderText="Dispatcher" SortExpression="DispatcherName" FilterControlWidth="55px"/>
       <telerik:GridBoundColumn DataField="ConsoleName" HeaderText="Console" SortExpression="ConsoleName" FilterControlWidth="55px" AllowFiltering="true"/>
       <telerik:GridBoundColumn DataField="EndpointName" HeaderText="Endpoint" SortExpression="EndpointName" FilterControlWidth="55px"/>
       <telerik:GridBoundColumn DataField="CallType" HeaderText="CallType" SortExpression="CallType" FilterControlWidth="55px"  HeaderStyle-Width="130px" />
       <telerik:GridBoundColumn DataField="CallData" HeaderText="CallData" SortExpression="CallData" AllowFiltering="false"/>
       <telerik:GridBoundColumn DataField="TimeToAnswer" HeaderText="AnswerTime" SortExpression="TimeToAnswer" AllowFiltering="false" />
       <telerik:GridBoundColumn DataField="CallDuration" HeaderText="Duration" SortExpression="CallDuration" UniqueName="calDuration" AllowFiltering="false"/>
       </Columns>
       </MasterTableView>
       <ExportSettings Csv-FileExtension="Csv" Csv-RowDelimiter="NewLine">
       </ExportSettings>
       </telerik:RadGrid>
      </telerik:RadAjaxPanel>

1 Answer, 1 is accepted

Sort by
0
Accepted
Pavlina
Telerik team
answered on 09 Nov 2011, 02:05 PM
Hi Ram,

Try to disable text wrapping in the RadGrid header and items and let me know how it goes. I am also attaching a sample project following your scenario. Give it a try and see if it works for you or if I am missing something out.

Greetings,
Pavlina
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now
Tags
Grid
Asked by
Ram
Top achievements
Rank 1
Answers by
Pavlina
Telerik team
Share this question
or