Hi, In the ItemDataBound event i use the following code to change the height of the items:
But with filtered items the height gets reset.
I've searched over the internet for an event or property
but couldn't find how to keep the height unchanged.
Please help.
Thank you.
args.NewItem.Height = 35
But with filtered items the height gets reset.
I've searched over the internet for an event or property
but couldn't find how to keep the height unchanged.
Please help.
Thank you.
4 Answers, 1 is accepted
0

Emanuel Varga
Top achievements
Rank 1
answered on 20 May 2011, 10:35 AM
Hello AhNa,
May i suggest using html formatting for this? Please take a look in the Demos application under, DropDown & List => Item Formatting.
You can either use the link from the online docs system or the demos app to achieve the desired functionality.
And for the future if you may require some other kind of formatting you could subscribe to the VisualListItemFormatting event and handle that based on your needs, as described here.
If you have any more questions please just let me know, and if the question has been solved, please mark the all of the helpfull posts as answers, so that others can find the answers to their questions faster.
Best Regards,
Emanuel Varga
Telerik WinForms MVP
May i suggest using html formatting for this? Please take a look in the Demos application under, DropDown & List => Item Formatting.
You can either use the link from the online docs system or the demos app to achieve the desired functionality.
And for the future if you may require some other kind of formatting you could subscribe to the VisualListItemFormatting event and handle that based on your needs, as described here.
If you have any more questions please just let me know, and if the question has been solved, please mark the all of the helpfull posts as answers, so that others can find the answers to their questions faster.
Best Regards,
Emanuel Varga
Telerik WinForms MVP
0

AhNa
Top achievements
Rank 1
answered on 21 May 2011, 11:23 AM
Thank you replying, I used the ViusalItemFormatting event on the filtered items and used the <size> tag
that increased the font size which is a thing I need but the texts are interleaving with each other.
How can I increase the spacing between filtered items? it seems there are no tags to achieve this.
that increased the font size which is a thing I need but the texts are interleaving with each other.
How can I increase the spacing between filtered items? it seems there are no tags to achieve this.
0

Emanuel Varga
Top achievements
Rank 1
answered on 21 May 2011, 11:26 AM
Hello again,
At point 2 of this help article, you can find your answer to this:
Basically just set:
Hope this helps, if you have any other questions or comments, please let me know,
Best Regards,
Emanuel Varga
Telerik WinForms MVP
At point 2 of this help article, you can find your answer to this:
Basically just set:
[C#] Setting AutoSizeItems
this
.radListControl1.AutoSizeItems =
true
;
[VB.NET] Setting AutoSizeItems
Me.radListControl1.AutoSizeItems = True
Hope this helps, if you have any other questions or comments, please let me know,
Best Regards,
Emanuel Varga
Telerik WinForms MVP
0
Hi AhNa,
Richard, thank you for this solution. There is alternative - you can set the ItemHeight property for RadDropDownListElement:
The following help article contains details on how to customize the DropDownItem with the help of VisualListItemFormatting event.
All the best,
Peter
the Telerik team
Richard, thank you for this solution. There is alternative - you can set the ItemHeight property for RadDropDownListElement:
this
.radDropDownList2.DropDownListElement.ItemHeight = 35;
The following help article contains details on how to customize the DropDownItem with the help of VisualListItemFormatting event.
All the best,
Peter
the Telerik team