RadDropDownlist Element List Text Autosize

5 posts, 0 answers
  1. ksj
    ksj avatar
    3 posts
    Member since:
    Mar 2018

    Posted 06 Sep 2018 Link to this post

    Hello, 

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

     

    Thanks

    Kunal

     

     

     

  2. Dimitar
    Admin
    Dimitar avatar
    2902 posts

    Posted 07 Sep 2018 Link to this post

    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.
  3. ksj
    ksj avatar
    3 posts
    Member since:
    Mar 2018

    Posted 07 Sep 2018 Link to this post

    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

     

  4. ksj
    ksj avatar
    3 posts
    Member since:
    Mar 2018

    Posted 07 Sep 2018 Link to this post

    I was able to fix it. 

    Thank you for quick response

  5. Dimitar
    Admin
    Dimitar avatar
    2902 posts

    Posted 10 Sep 2018 Link to this post

    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.
Back to Top