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

wrapping radgrid cell text

2 Answers 208 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Anjali
Top achievements
Rank 1
Anjali asked on 03 Oct 2011, 11:15 PM
Hi All,

  I have a cell text with a comma  delimited line so I have
Report_date, report_due, Report_Severity, report_order, Report_work_center. I can wrap the text of the grid cell by setting the tableLayout="fixed" and setting the style property like below
.itemNameColumn span
{
    display: block;
    width: 500px; 
  
    word-wrap: break-word; 
  
}

 

My problem is the line that is displayed is chopped off in between  so I get Report_date, report_due, report_sev on one line of the cell and then I get erity, report_order on another line. Is it possible that chopping off occurs at comma rather than in the middle of the text. Below is my radgrid. I am trying to display this huge comma delimited line "Select List" grid template column.

<telerik:RadGrid ID="RadGrid_LoadQuery" Width="100%" AllowSorting="false" AllowPaging="false"
      AllowMultiRowSelection="True" runat="server" GridLines="Both" ExportSettings-ExportOnlyData="true">
      <MasterTableView RetrieveAllDataFields="true" AutoGenerateColumns="false" TableLayout="Fixed">
          <Columns>
              <telerik:GridTemplateColumn HeaderText="Export Name">
                  <ItemTemplate>
                      <asp:Label ID="lblExportName" runat="server" Text='<%#Bind("ExportName") %>'></asp:Label>
                  </ItemTemplate>
              </telerik:GridTemplateColumn>
              <telerik:GridTemplateColumn HeaderText="Select List" ItemStyle-CssClass="itemNameColumn"
                  ItemStyle-Width="1000px">
                  <ItemTemplate>
                      <asp:Label ID="lblSelect" runat="server" Text='<%#Bind("SelectColumnList") %>'></asp:Label>
                  </ItemTemplate>
              </telerik:GridTemplateColumn>
              </telerik:GridTemplateColumn>
          </Columns>
      </MasterTableView>
  </telerik:RadGrid>

Any help will be greatly appreciated.

2 Answers, 1 is accepted

Sort by
0
Accepted
Shinu
Top achievements
Rank 1
answered on 04 Oct 2011, 06:17 AM
Hello Anjali,

One approach is try the following approach in the forum thread.
Grid Column No Wrap + Ellipsis.

Thanks,
Shinu,
0
Anjali
Top achievements
Rank 1
answered on 04 Oct 2011, 03:54 PM
Thanks Shinu!! This solves my problem.
Tags
Grid
Asked by
Anjali
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 1
Anjali
Top achievements
Rank 1
Share this question
or