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

Data being truncated in grid

11 Answers 275 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Matt
Top achievements
Rank 1
Matt asked on 12 May 2008, 03:59 PM
I'm working on converting all my grids that used the older ASP.Net grid control to the new AJAX control, and am having a problem with data being truncated in the grid.

Previously, I had scrolling grids set up like this:

<

telerik:RadGrid ID="radGrdClaimsAdmin" runat="server" Skin="WebBlue" AllowPaging="True" Visible="false" Width="950px" GridLines="None" OnItemCommand="radGrdClaims_ItemCommand" OnNeedDataSource="radGrdClaimsAdmin_NeedDataSource" OnItemDataBound="radGrdClaimsAdmin_ItemDataBound" >

<ClientSettings><Scrolling AllowScroll="True" UseStaticHeaders="True"></Scrolling></ClientSettings>

With a column like this:

<

telerik:GridBoundColumn DataField="Name" HeaderText="Business Unit" SortExpression="Name" UniqueName="Name" >
<ItemStyle Wrap="False" />
</telerik:GridBoundColumn>

This ensured that no matter how long the field, it would be fully displayed on a single line.

Now, when I use the new grid, my columns all appear the same width, and only the first few characters of the data are shown, followed by "...". No horizontal scrollbar ever shows up. I've noticed that this only seems to happen on grids that have a detail table. What do I need to change?

Bill

11 Answers, 1 is accepted

Sort by
0
Vlad
Telerik team
answered on 13 May 2008, 07:39 AM
Hello Bill,

Please set MasterTableView TableLayout to "Auto" and let me know how it goes.

Best wishes,
Vlad
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
Matt
Top achievements
Rank 1
answered on 14 May 2008, 07:48 AM
It had no effect - the grid has a width of 950px, TableLayout on MasterTableView is set to auto, but I still can't get a horizontal scrollbar and the data is truncated. I tried setting each of the DetailTables to Auto TableLayout, but no effect.

Bill
0
Shinu
Top achievements
Rank 2
answered on 14 May 2008, 10:08 AM
Hi,

In order to display horizontal scroll for navigation, you need to make sure that the total width of the columns (either auto-generated or declaratively set) exceeds the width of the grid. Go through the following demo link to get more details about Scrolling.
Basic scrolling

Thanks
Shinu.
0
Matt
Top achievements
Rank 1
answered on 14 May 2008, 10:12 AM
It DOES exceed the total width, otherwise it wouldn't be truncating data... If I take the detail tables out, I get my scrollbar and everything works fine. Put them in, and all columns are the same narrow width with most of the data truncated.

Is there a way to escalate this thread to a support request, or do I need to just open one up?

Thanks.
0
Pavel
Telerik team
answered on 17 May 2008, 07:34 AM
Hello Bill,

Indeed I think it will be best if you open a support ticket and attach to it a small runnable sample in which the problem you face can be observed. Thus we will do our best to help you resolve it.

Looking forward to hearing from you.

Greetings,
Pavel
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
Bobby Pack
Top achievements
Rank 1
answered on 26 Jun 2008, 06:01 PM
I'm having a similar issue. when I add a detail table to the master  all column widths shrink and the horizontal scrollbar disappears.

Is there a resolution?
0
Pavel
Telerik team
answered on 27 Jun 2008, 11:01 AM
Hi Bobby,

We have not received a sample that illustrates the problem so that we can give you feedback on how to resolve it. If you open a support ticket and attach to it the problematic page, we will do our best to assist you.

Sincerely yours,
Pavel
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
Susan
Top achievements
Rank 1
answered on 21 Oct 2008, 01:54 PM
Was this ever resolved? I too, have used the horizontal scrolling with success. However, on one of my grids, I use a detail table as well. It does the exact same thing. All the columns are a fixed width, with the data being truncated followed by the ....

Thanks,
Susan
0
Pavel
Telerik team
answered on 24 Oct 2008, 11:17 AM
Hi Susan,

We are still not sure of the exact scenario which reproduces this issue, and no one has submitted a sample to illustrate it. If you do so we will gladly assist you in resolving the problem.

Regards,
Pavel
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
Susan
Top achievements
Rank 1
answered on 26 Oct 2008, 11:28 PM
here is how my radgrid is defined. Note the playername has wrap=false. instead of putting in the horizontal scrollbar, the columns stay a fixed width and the players name get the '...' after them if they are too long for the width of the column. no horizontal scrollbar appears. if the detail table is removed, the horizontal scroll bar appears and the players name is not 'scrunched' and cutoff.

let me know if you need more information.

 

 

<

table id="Table4" cellpadding="0" cellspacing="0" runat="server" style="table-layout:fixed">

 

 

 

 

<tr><td width="100%">

 

 

 

 

<telerik:RadGrid ID="grdBuildTeams" Skin="Web20" runat="server" GridLines=Vertical Width="925px">

 

 

 

 

<ClientSettings EnableRowHoverStyle="true">

 

 

 

 

<Scrolling AllowScroll="True" UseStaticHeaders="True" SaveScrollPosition="true" />

 

 

 

 

</ClientSettings>

 

 

 

 

 

<MasterTableView AutoGenerateColumns="false" DataKeyNames="RegistrantToLeagueKey" TableLayout="Auto" DataMember="Level1" HierarchyLoadMode="ServerBind">

 

 

 

 

<DetailTables>

 

 

 

 

<telerik:GridTableView TableLayout="auto" AutoGenerateColumns="False" runat="server" Name="CustomQuestions" DataKeyNames="RegistrantToLeagueOptionKey">

 

 

 

 

<ParentTableRelation>

 

 

 

 

<telerik:GridRelationFields DetailKeyField="RegistrantToLeagueKey" MasterKeyField="RegistrantToLeagueKey" />

 

 

 

 

</ParentTableRelation>

 

 

 

 

<Columns>

 

 

 

 

<telerik:GridBoundColumn DataField="CustomQuestion" HeaderText="Question"/>

 

 

 

 

<telerik:GridBoundColumn DataField="Answer" HeaderText="Answer"/>

 

 

 

 

</Columns>

 

 

 

 

 

</telerik:GridTableView>

 

 

 

 

</DetailTables>

 

 

 

 

 

<Columns>

 

 

 

 

<telerik:GridTemplateColumn HeaderText="Select" ItemStyle-HorizontalAlign="center" HeaderStyle-HorizontalAlign="center">

 

 

 

 

<ItemTemplate>

 

 

 

 

<asp:CheckBox runat="server" Id="chkSelect"/>

 

 

 

 

</ItemTemplate>

 

 

 

 

</telerik:GridTemplateColumn>

 

 

 

 

<telerik:GridBoundColumn DataField="PlayerName" HeaderText="Player" ItemStyle-Wrap="false" />

 

 

 

 

<telerik:GridBoundColumn DataField="TeamAssigned" HeaderText="Assigned Team" ItemStyle-Wrap="false" />

 

 

 

 

<telerik:GridBoundColumn DataField="PreviousCoach" HeaderText="Last Yr Coach" ItemStyle-Wrap="false" />

 

 

 

 

<telerik:GridBoundColumn DataField="PreviousTeam" HeaderText="Last Yr Team" ItemStyle-Wrap="false" />

 

 

 

 

<telerik:GridBoundColumn DataField="RequestedTeamName" HeaderText="Rqsted Team" ItemStyle-Wrap="false" />

 

 

 

 

<telerik:GridBoundColumn DataField="RequestedCoach" HeaderText="Rqsted Coach" ItemStyle-Wrap="false" />

 

 

 

 

<telerik:GridBoundColumn DataField="WaiverCoach" HeaderText="Waiver Coach" ItemStyle-Wrap="false" />

 

 

 

 

<telerik:GridBoundColumn DataField="SchoolAttending" HeaderText="School" ItemStyle-Wrap="false" />

 

 

 

 

<telerik:GridBoundColumn DataField="VolunteerCapacity" HeaderText="Volunteer" ItemStyle-Wrap="false" />

 

 

 

 

<telerik:GridTemplateColumn HeaderText="Delete" ItemStyle-HorizontalAlign=center ItemStyle-Wrap="false" >

 

 

 

 

<ItemTemplate>

 

 

 

 

<asp:ImageButton CommandName="DeleteRecord" TabIndex=-1 id="ibDelete" imageUrl="../images/delete.png" CausesValidation="False" runat="server" />

 

 

 

 

</ItemTemplate>

 

 

 

 

</telerik:GridTemplateColumn>

 

 

 

 

<telerik:GridBoundColumn DataField="RegistrantToLeagueKey" Visible="false"/>

 

 

 

 

<telerik:GridBoundColumn DataField="PlayerStatus" Visible="false"/>

 

 

 

 

</Columns>

 

 

 

 

 

 

</MasterTableView>

 

 

 

 

</telerik:RadGrid></td></tr></table>

 

 

 

 

0
Dimo
Telerik team
answered on 27 Oct 2008, 08:25 AM
Hello Susan,

The observed behavior is expected with this RadGrid configuration. Please, either set a larger width for the MasterTableView, or set widths for the columns, which you require to be able to display longer strings.

Sincerely yours,
Dimo
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Tags
Grid
Asked by
Matt
Top achievements
Rank 1
Answers by
Vlad
Telerik team
Matt
Top achievements
Rank 1
Shinu
Top achievements
Rank 2
Pavel
Telerik team
Bobby Pack
Top achievements
Rank 1
Susan
Top achievements
Rank 1
Dimo
Telerik team
Share this question
or