The Syncfusion native Blazor components library offers 70+ UI and Data Viz web controls that are responsive and lightweight for building modern web apps.
.NET PDF framework is a high-performance and comprehensive library used to create, read, merge, split, secure, edit, view, and review PDF files in C#/VB.NET.
In OnQueryCellInfo(), some cells are set :
e.style.font.underline = true
In OnCurrentCellShowingDropDown(), the combobox cell list is populated at the runtime, however, all the item list was underlined. Is possible to remove those underline for the list items in the combo box?
Thanks
Hui
ADAdministrator Syncfusion Team April 24, 2006 07:11 AM UTC
Hi Hui,
Yes, it is possible to avoid underline for the list items by setting the font style to the cr.ListBoxPart.Font in the CurrentCellShowingDropDown. Below is a code snippet.
GridCurrentCell cc = grid.CurrentCell;
GridComboBoxCellRenderer cr = cc.Renderer as GridComboBoxCellRenderer;
cr.ListBoxPart.Font = new System.Drawing.Font(cr.ListBoxPart.Font, System.Drawing.FontStyle.Regular);
cr.ListBoxPart.DataSource = this.sourceList;
Regards,
Calvin.
HZHui ZhongApril 24, 2006 01:59 PM UTC
Thanks very much Calvin. It worked.
However, after the item is selected from the combobox list, and the dropdown is disappear, I hope the font of the selected item is shown as underlined. how to do that?
Hui
>Hi Hui,
>
>Yes, it is possible to avoid underline for the list items by setting the font style to the cr.ListBoxPart.Font in the CurrentCellShowingDropDown. Below is a code snippet.
>
>GridCurrentCell cc = grid.CurrentCell;
>GridComboBoxCellRenderer cr = cc.Renderer as GridComboBoxCellRenderer;
>
>cr.ListBoxPart.Font = new System.Drawing.Font(cr.ListBoxPart.Font, System.Drawing.FontStyle.Regular);
>cr.ListBoxPart.DataSource = this.sourceList;
>
>
>Regards,
>Calvin.
HZHui ZhongApril 24, 2006 02:05 PM UTC
I already figured it out.
Thanks
Hui
>Thanks very much Calvin. It worked.
>However, after the item is selected from the combobox list, and the dropdown is disappear, I hope the font of the selected item is shown as underlined. how to do that?
>
>Hui
>
>>Hi Hui,
>>
>>Yes, it is possible to avoid underline for the list items by setting the font style to the cr.ListBoxPart.Font in the CurrentCellShowingDropDown. Below is a code snippet.
>>
>>GridCurrentCell cc = grid.CurrentCell;
>>GridComboBoxCellRenderer cr = cc.Renderer as GridComboBoxCellRenderer;
>>
>>cr.ListBoxPart.Font = new System.Drawing.Font(cr.ListBoxPart.Font, System.Drawing.FontStyle.Regular);
>>cr.ListBoxPart.DataSource = this.sourceList;
>>
>>
>>Regards,
>>Calvin.