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

RadDropDownlist Element List Text Autosize

4 Answers 20 Views
This is a migrated thread and some comments may be shown as answers.
ksj
Top achievements
Rank 1
ksj asked on 06 Sep 2018, 07:06 PM

Hello, 

RadDropdownlist element with same character length(55), element alignment is not uniform.

 

Thanks

Kunal

 

 

 

4 Answers, 1 is accepted

Sort by
0
Dimitar
Telerik team
answered on 07 Sep 2018, 08:56 AM
Hi Kunal,

If you want the text size to be the same you need to use a monospaced font (Consolas is such font). 

You can change the font of the items by using a the VisualListItemFormatting event:
Font consolas = new Font("Consolas", 9, FontStyle.Regular);
private void RadDropDownList1_VisualListItemFormatting(object sender, Telerik.WinControls.UI.VisualItemFormattingEventArgs args)
{
    args.VisualItem.Font = consolas;
}

I hope this will be useful. Let me know if you have additional questions.

Regards,
Dimitar
Progress Telerik
Get quickly onboard and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
0
ksj
Top achievements
Rank 1
answered on 07 Sep 2018, 02:20 PM

Hi Dimitar, 

Thanks for quick response.

text size are uniform now,  it does add duplicate list element to dropdownlist. can you help me on this.

Thanks

 

0
ksj
Top achievements
Rank 1
answered on 07 Sep 2018, 04:39 PM

I was able to fix it. 

Thank you for quick response

0
Dimitar
Telerik team
answered on 10 Sep 2018, 06:11 AM
Hello Kunal,

I am glad that you have found a solution to this. Do not hesitate to contact us if you have other questions.
 
Regards,
Dimitar
Progress Telerik
Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
Asked by
ksj
Top achievements
Rank 1
Answers by
Dimitar
Telerik team
ksj
Top achievements
Rank 1
Share this question
or