To select first n characters without truncating a word.
In the Select query select the number of characters required.
while displaying in the datagrid.. use this
<%# DataBinder.Eval(Container.DataItem, "Article").substring(0,DataBinder.Eval(Container.DataItem, "Article").lastIndexOf(" ")+1)%>

0 Comments:
Post a Comment
<< Home