We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
close icon

Limiting number of characters shown in a column

I was wondering if there was a way to limit the number of characters *shown* (not bound) in a column of a GridDataBoundGrid. I thought I format string might do the trick, but I can''t seem to get one that works.

4 Replies

RM Ross Micheals November 3, 2004 02:08 PM UTC

In my specific application, I want to show the first letter of a person''s first name, and not the entire name itself.


AD Administrator Syncfusion Team November 3, 2004 03:51 PM UTC

One way you might be able to do this is to handle the DrawCellDisplayText event. In your handler, set e.DisplayText to what you want to see in teh cell. This will not affect anything else except what is shown in the cell.


RM Ross Micheals November 3, 2004 04:48 PM UTC

Okay, but how do I determine what column / row I''m in? >One way you might be able to do this is to handle the DrawCellDisplayText event. In your handler, set e.DisplayText to what you want to see in teh cell. This will not affect anything else except what is shown in the cell.


RM Ross Micheals November 3, 2004 04:52 PM UTC

Never mind! You can get to it through .Style >Okay, but how do I determine what column / row I''m in? > >>One way you might be able to do this is to handle the DrawCellDisplayText event. In your handler, set e.DisplayText to what you want to see in teh cell. This will not affect anything else except what is shown in the cell.

Loader.
Live Chat Icon For mobile
Up arrow icon