Data being truncated in grid

12 posts, 0 answers
  1. Matt
    Matt avatar
    39 posts
    Member since:
    Oct 2006

    Posted 12 May 2008 Link to this post

    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
  2. Vlad
    Admin
    Vlad avatar
    11100 posts

    Posted 13 May 2008 Link to this post

    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
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Matt
    Matt avatar
    39 posts
    Member since:
    Oct 2006

    Posted 14 May 2008 Link to this post

    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
  5. Shinu
    Shinu avatar
    17764 posts
    Member since:
    Mar 2007

    Posted 14 May 2008 Link to this post

    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.
  6. Matt
    Matt avatar
    39 posts
    Member since:
    Oct 2006

    Posted 14 May 2008 Link to this post

    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.
  7. Pavel
    Admin
    Pavel avatar
    904 posts

    Posted 17 May 2008 Link to this post

    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
  8. Bobby Pack
    Bobby Pack avatar
    2 posts
    Member since:
    May 2008

    Posted 26 Jun 2008 Link to this post

    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?
  9. Pavel
    Admin
    Pavel avatar
    904 posts

    Posted 27 Jun 2008 Link to this post

    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
  10. Susan
    Susan avatar
    137 posts
    Member since:
    Jul 2007

    Posted 21 Oct 2008 Link to this post

    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
  11. Pavel
    Admin
    Pavel avatar
    904 posts

    Posted 24 Oct 2008 Link to this post

    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.
  12. Susan
    Susan avatar
    137 posts
    Member since:
    Jul 2007

    Posted 26 Oct 2008 Link to this post

    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>

     

     

     

     

  13. Dimo
    Admin
    Dimo avatar
    8330 posts

    Posted 27 Oct 2008 Link to this post

    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.
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017