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.

Underline CurrencyCell

Thread ID:





14401 May 26,2004 10:14 AM May 26,2004 12:43 PM Windows Forms 4
Tags: GridControl
Cole Shelton
Asked On May 26, 2004 10:14 AM

Hi all, I''m trying to underline the text in a currencycell but setting GridStyleInfo.Font.Underline = true is not working. When you click on the cell to edit it, it will show it as underlined, but when focus leaves that cell the text is no longer underlined. Is there a way to fix this? TIA, Cole

Administrator [Syncfusion]
Replied On May 26, 2004 10:19 AM

Try setting it dynamically in PrepareViewStyleInfo.
private void gridDataBoundGrid1_PrepareViewStyleInfo(object sender, GridPrepareViewStyleInfoEventArgs e)
	GridCurrentCell cc = this.gridDataBoundGrid1.CurrentCell;
	if(e.RowIndex == cc.RowIndex && e.ColIndex == cc.ColIndex)
		e.Style.Font.Underline = true;

Cole Shelton
Replied On May 26, 2004 11:20 AM

Clay, I had tried this before, but tried at again at your suggestion. Still does not work though. Cole

Administrator [Syncfusion]
Replied On May 26, 2004 12:00 PM

I am sorry, I misread, thinking you wanted to underline the CurrentCell instead of a CurrencyCell. In the CellTypes\Currency sample, I added style.Font.Underline = true. On first appearance, it does look like the underline is not being shown on statically drawn cells. But if you drag the row heights a little larger, I do in fact see the underline. So, is this what is happening in your case? If so, will slightly enlarging the rowheights work for you? Adding this line in that sample makes the underline should up for me. private void Form1_Load(object sender, System.EventArgs e) { this.gridControl1.DefaultRowHeight += 1; }

Cole Shelton
Replied On May 26, 2004 12:43 PM

Clay, That fixed my problem, Thanks a million. Cole


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.