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.
Unfortunately, activation email could not send to your email. Please try again.

Limiting number of characters shown in a column

Thread ID:

Created:

Updated:

Platform:

Replies:

21152 Nov 3,2004 09:07 AM Nov 3,2004 11:52 AM Windows Forms 4
loading
Tags: GridControl
Ross Micheals
Asked On November 3, 2004 09:07 AM

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.

Ross Micheals
Replied On November 3, 2004 09:08 AM

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

Administrator [Syncfusion]
Replied On November 3, 2004 10:51 AM

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.

Ross Micheals
Replied On November 3, 2004 11:48 AM

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.

Ross Micheals
Replied On November 3, 2004 11:52 AM

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.

CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.

;