CSS Class :-
How to use in RadGrid.
How To Use In Label.
By above example you can able to break the RadGrid's column or any Label if their text width exceed the 120px.
Note : It worked on both cases is space is available (in text/content) or not.
.breakWord120 { max-width: 120px !important; word-break: break-all !important; word-wrap: break-word !important; vertical-align: top; line-height: 15px; }
How to use in RadGrid.
<telerik:GridBoundColumn DataField="Name" HeaderText="Name" UniqueName="Name" ItemStyle-CssClass="breakWord120"></telerik:GridBoundColumn>
<asp:Label ID="Label1" runat="server" CssClass="breakWord120"></asp:Label>
Note : It worked on both cases is space is available (in text/content) or not.
it doesn't work
ReplyDeleteCan you please provide your code? So, I will try to resolve your issue.
ReplyDeleteHi this works great, thanks for the Post.
ReplyDeletetelerik:GridTemplateColumn Display="true" UniqueName="Activity" HeaderText="Indicate F if Financial Activity">
ReplyDelete.clsActivityHeader
{
max-width:2px !important;
word-break: break-all !important;
word-wrap: break-word !important;
vertical-align: top;
line-height: 5px;
}
im not getting a line break in the header ..what must i do?
HeaderStyle CssClass="clsActivityHeader" Font-Bold="true"
DeletetemStyle CssClass="clsActivity"
I have added like this...please give me some inputs
Please try with the below code snippet.
DeleteHeaderStyle CssClass="clsActivityHeader" Width="2px"
Thanks Jayesh, its working fine.
ReplyDeleteThanks Jayesh, its working fine for me.
ReplyDeleteThanks Jayesh, worked for me!!
ReplyDeleteExcelent, it's working!
ReplyDeleteGreat workaround Jayesh, appreciate your efforts in blogging such tricks. Very helpful.
ReplyDeleteIt worked. Thank you Jayesh for sharing.
ReplyDeleteGreat it worked!!!Thanks a lot...
ReplyDeleteThanks. its works
ReplyDeletePerfect. It resolved my issue. Thanks for posting
ReplyDelete