I have a RadListView that has an ItemTemplate that contains a RadComboBox. As such, the IDs of the combo boxes are dynamically generated, so this will not work for me:
. What I'm trying to do is apply some business logic to what can and cannot be selected. I'm having trouble targetting the items in the listbox. When a check box is selected, I need to use jQuery to select all items in the combobox, then check the value of an attribute that is part of the object loaded into the datasource on page load called "type". If this type is equal to, say, "person", then I need to disable all items in the combobox other whos type is "group". I've started with something like this:
I'm stuck on where to go from here. I seem to be unable to access any sort of item client id in order to create an asp object that allows me to manipulate the telerik object. For instance, if I were to just grab the item like:
it would return null for that field. And if i try to get the id of the parent above that, I also get null.
Any ideas?
Or at the very least, how do I obtain the RadComboBox item starting at the checkbox OnClick event. For instance
The from there, how do i iterate through the item collection. is there a method like rcb.get_items().each(...); ??
var
rcbAssigneeObject = $find(
"<%=rcbAssignee.ClientID %>"
);
. What I'm trying to do is apply some business logic to what can and cannot be selected. I'm having trouble targetting the items in the listbox. When a check box is selected, I need to use jQuery to select all items in the combobox, then check the value of an attribute that is part of the object loaded into the datasource on page load called "type". If this type is equal to, say, "person", then I need to disable all items in the combobox other whos type is "group". I've started with something like this:
$(
".AssigneeTag"
).find(
":checkbox"
).click(
function
() {
var
allItems = $(
this
).closest(
".rcbList"
).find(
".rcbItem"
);
//check item types here
});
I'm stuck on where to go from here. I seem to be unable to access any sort of item client id in order to create an asp object that allows me to manipulate the telerik object. For instance, if I were to just grab the item like:
var
myItem = $(
this
).closest(
".rcbItem"
).attr(
"id"
);
it would return null for that field. And if i try to get the id of the parent above that, I also get null.
Any ideas?
Or at the very least, how do I obtain the RadComboBox item starting at the checkbox OnClick event. For instance
var rcb = $(this).pathToRadComboBoxControl().Get();
The from there, how do i iterate through the item collection. is there a method like rcb.get_items().each(...); ??