I have a gridview using <asp:BoundField DataField="Comments" HeaderText="COMMENTS" />, I would like to only show the first 20 characters in the Commemnt column when the gridview gets populated. Is there way to accomplish this in VB? Thank you.
I have a gridview using <asp:BoundField DataField=Comments HeaderText=COMMENTS /> , I would like to
Share
One way is using the
RowDataBoundevent in codebehind:Note that you can access the text on this way only with
BoundFields. WithTemplateFieldsyou need to useFindControlto get a reference of your controls(f.e. aTextBox).If you would use a
TemplateFieldyou could also limit the text on the aspx markup: