开发者

RadComboBox using templates

开发者 https://www.devze.com 2023-03-18 15:24 出处:网络
I have a RadComboBox usinga checkbox and a label... Now you know how it shows the items being checked at the top, how it separates them by commas .. i.e

I have a RadComboBox using a checkbox and a label... Now you know how it shows the items being checked at the top, how it separates them by commas .. i.e

If the values are

[ ]Car
[ ]Bicyle
[ ]Trucks

As I select or check each.. it starts adding them like this.. Car,Bicycle,Trucks otherwise if nothing is picked it shows "All Types开发者_如何学编程".

Well this is working fine but I am stuck when coming back to the page. When I come back to the page from some other page the RadComboBox has the items checked.. but the line where it is supposed to have

Car, Bicycle, Trucks does not show, it defaults to the first item "Car" and it does not show the whole string. This is pulling the values from a database and it is bringing the correct values as well as marking them check but.. How do I make it so that when I comeback that string is there in the combo box?

See examples at the telerik page for more info.

http://demos.telerik.com/aspnet-ajax/combobox/examples/functionality/templates/defaultcs.aspx


Figured it out, Just added a ddl.SelectedItem.Text = mystringVal;

and that was it.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号