Hi to all,
in my szenario i have a RadGrid with RadComboBoxes for every DataRow.
I have 12 DataRows and hide 10 of them, because of an Filter-Event by the user.
For the remaining 2 DataRows i change the values of the combo boxes on clientside.
Until here everything works.
But now i do a postback and would like to find the remaining 2 Datarow.
This does not work! Because i have no indicator.
The Indicator i needed i would like to set on clientside. The Indicator can be to set the datarow to selected or to check a checkbox in a GridTemplateColumn
| <telerik:GridTemplateColumn> |
| <ItemTemplate> |
| <asp:CheckBox ID="chkbSelected" runat="server" /> |
| </ItemTemplate> |
| </telerik:GridTemplateColumn> |
In this the JavaScript Code in which i try to set the Datarow to selected. But on the ParentObject this doesn´t work.
| //global DOM ID registry. filled up by scripts rendered from templates. |
| var registeredElements = []; |
| //looks for an element that has been registered with the global array |
| //requires that we emit a registration script block for each server control |
| function GetRegisteredServerElement(serverID) { |
| var clientID = ""; |
| for (var i = 0; i < registeredElements.length; i++) { |
| clientID = registeredElements[i]; |
| var combo = $find(clientID); |
| //Get the parent object, because this object has the visible attribute we need |
| var ParentObject = $find(combo.get_parent().get_id()); |
| //Check whether the value exists in the RadComboBox |
| var IsObject = combo.findItemByText(ColumnDecisonCombo.get_text()); |
| //declare a the dom elements to change the backgroundColor |
| var inputArea = combo.get_inputDomElement(); |
| //Only if the parent object is visible true and the RadComboBox contains the value |
| if (ParentObject.get_visible() && (IsObject != null)) { |
| /////HERE i NEED HELP |
| ParentObject.set_selected(); |
| combo.set_value(ColumnDecisonCombo.get_value()); |
| combo.set_text(ColumnDecisonCombo.get_text()); |
| inputArea.style.backgroundColor = "green" |
| } |
| else { |
| inputArea.style.backgroundColor = "red" |
| } |
| } |
| } |
Thanks