This is a migrated thread and some comments may be shown as answers.

DrawItem event issues

2 Answers 24 Views
DropDownList
This is a migrated thread and some comments may be shown as answers.
AME Group
Top achievements
Rank 1
AME Group asked on 13 Feb 2014, 06:42 AM
Hi,

I am upgrading all controls of my C# winform app to Telerik. I couldn't find drawitem event in RadDropDownList.

Here is the code of combobox drawitem event:

private void cbMyCompanyList_DrawItem(object sender, DrawItemEventArgs e)
{
 
e.DrawBackground();

DataRowView drv = (DataRowView)(cbMyCompanyList.Items[e.Index]);

int CoID = (int)(drv["CompanyID"]);
string CoNum = (string)(drv["CompanyName"].ToString());

...........

using (SolidBrush sb = new SolidBrush(e.ForeColor))
 {
      e.Graphics.DrawString(..., e.Font, ..., ...);
 }
}

How could I translate this to Telerik?

Thanks in advance!!

2 Answers, 1 is accepted

Sort by
0
AME Group
Top achievements
Rank 1
answered on 17 Feb 2014, 05:01 AM
Anyone could help this?
0
George
Telerik team
answered on 17 Feb 2014, 12:40 PM
Hello Daniel,

Thank you for contacting us.

Since our controls are built on top of TPF it is not necessary to use graphics directly. You can read how to customize RadDropDownList in the following help article: Customizing Items | UI for WinForms Documentation.

I hope this helps.

Regards,
George
Telerik

Check out the new Telerik Platform - the only modular platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native apps. Register for the free online keynote and webinar to learn more about the Platform on Wednesday, February 12, 2014 at 11:00 a.m. ET (8:00 a.m. PT).

Tags
DropDownList
Asked by
AME Group
Top achievements
Rank 1
Answers by
AME Group
Top achievements
Rank 1
George
Telerik team
Share this question
or