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. (Last updated on : Nov 16th 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Underline CurrencyCell

Thread ID:

Created:

Updated:

Platform:

Replies:

14401 May 26,2004 02:14 PM UTC May 26,2004 04:43 PM UTC WinForms 4
loading
Tags: GridControl
Cole Shelton
Asked On May 26, 2004 02:14 PM UTC

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 02:19 PM UTC

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 03:20 PM UTC

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 04:00 PM UTC

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 04:43 PM UTC

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

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.

Warning Icon 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.Close Icon

;