or
<telerik:RadGrid ID="rgMyGrid" runat="server" Skin="Office2007" AutoGenerateColumns="false"> <MasterTableView CommandItemDisplay="Top" ShowHeader="true"> <CommandItemTemplate> <div style="padding: 5px;"> Below is a listing of programs for the selected client. You can add this user to one or more programs by expanding the program node and selecting a localization. You must select at least one program/localization. </div> </CommandItemTemplate> <Columns> <telerik:GridBoundColumn DataField="ProgramName" HeaderText="Programs" /> <telerik:GridButtonColumn CommandName="Delete" Text="Remove" UniqueName="RemoveColumn" ButtonType="PushButton" /> </Columns> <NestedViewTemplate> <div style="width: 100%; padding-left: 10px;"> <asp:RadioButtonList runat="server" ID="rdoLocals"/> </div> </NestedViewTemplate> </MasterTableView> </telerik:RadGrid> <telerik:RadTreeView ID="rtvProgramsLocals" runat="server" Skin="Outlook" Visible="false"> </telerik:RadTreeView> If Not IsPostBack Then rgMyGrid.DataSource = LoadPrograms(100) rgMyGrid.DataBind() End If Private Function LoadPrograms(ByVal ClientId As Integer) As DataTable 'Dim p360programs As Programs = Nothing Dim programsDT As New DataTable("Programs") Dim localsDT As New DataTable("Locals") Dim userLocalDT As New DataTable("UserLocal") Dim localOptions As RadioButtonList 'p360programs = New Programs(ConfigurationManager.ConnectionStrings("P360ConnectionString").ConnectionString) Dim i As Integer Dim j As Integer Dim programNode As RadTreeNode Dim localNode As RadTreeNode programsDT.Columns.Add("ProgramID", GetType(Int32)) programsDT.Columns.Add("ClientID", GetType(Int32)) programsDT.Columns.Add("UserID", GetType(Int32)) programsDT.Columns.Add("ProgramName", GetType([String])) programsDT.PrimaryKey = New DataColumn() {programsDT.Columns("ProgramID")} programsDT.Rows.Add(New Object() {100, 100, 7628, "Internal Administration"}) programsDT.Rows.Add(New Object() {106, 100, 7628, "TestProgram"}) programsDT.Rows.Add(New Object() {107, 100, 7628, "TestProgram1"}) programsDT.AcceptChanges() localsDT.Columns.Add("LocalizationID", GetType(Int32)) localsDT.Columns.Add("ProgramID", GetType(Int32)) localsDT.Columns.Add("LocalizationName", GetType([String])) localsDT.PrimaryKey = New DataColumn() {localsDT.Columns("LocalizationID")} localsDT.Rows.Add(New Object() {100, 100, "Setup Tool"}) localsDT.Rows.Add(New Object() {105, 106, "MyLocal"}) localsDT.Rows.Add(New Object() {106, 106, "MyLocal2"}) localsDT.Rows.Add(New Object() {107, 107, "Local1a"}) localsDT.AcceptChanges() userLocalDT.Columns.Add("LocalizationID", GetType(Int32)) userLocalDT.Columns.Add("LocalizationName", GetType([String])) userLocalDT.PrimaryKey = New DataColumn() {userLocalDT.Columns("LocalizationID")} userLocalDT.Rows.Add(New Object() {100, "Setup Tool"}) userLocalDT.Rows.Add(New Object() {105, "MyLocal From the secondary Table"}) userLocalDT.AcceptChanges() 'programsDT = p360programs.GetPrograms(ClientId) If programsDT.Rows.Count > 0 Then For i = 0 To programsDT.Rows.Count - 1 If localsDT.Rows.Count > 0 Then localsDT.Merge(userLocalDT, False, MissingSchemaAction.Ignore) localOptions = New RadioButtonList Dim gridRow As GridDataItem For Each gridRow In rgMyGrid.MasterTableView.Items localOptions = CType(gridRow.ChildItem.FindControl("rdoLocals"), RadioButtonList) For j = 0 To userLocalDT.Rows.Count - 1 localOptions.Items.Add(New ListItem(localsDT(j)("LocalizationName"), localsDT(j)("LocalizationID"))) Next ' add the radio button to the localization radtree node localNode = New RadTreeNode() localNode.Controls.Add(localOptions) ' add the localization node to the program node programNode = New RadTreeNode(programsDT.Rows(i)("ProgramName")) programNode.Nodes.Add(localNode) ' add the program node to the tree view control rtvProgramsLocals.Nodes.Add(programNode) Next End If Next End If Return programsDT End FunctionHello Telerik,
I have a problem when dealing with RadComboBox.
if the comboBox is disabled, and I want to select an item it doesn't work
the following not working:
ComboBoxTitle.disable(); ComboBoxTitle.findItemByValue("2").select();if (!ComboBoxTitle.get_enabled()) { ComboBoxTitle.enable(); ComboBoxTitle.findItemByValue(ContactData.TitleId).select(); ComboBoxTitle.disable(); } else { ComboBoxTitle.findItemByValue(ContactData.TitleId).select(); }Hi Team
I've desing in my web application as....
<tr> <td> <asp:Panel runat="server" ID="uxJumpPanel"> <telerik:RadListView ID="feeldChoices" runat="server"> <ItemTemplate> <table cellpadding="0" cellspacing="0"> <tr> <td> <telerik:RadTextBox runat="server" Text='<%# Eval("Text") %>' onkeyup="SyncListToCheckbox(this)" ID="uxItemText" Width="260"> </telerik:RadTextBox> <telerik:RadComboBox runat="server" ID="uxSelectPage1" ></telerik:RadComboBox> </td> <td> <img id="imageAdd" style="cursor: pointer" runat="server" onclick="InitiateAjaxRequest('1,3,add|' + this.id + ',' + selectedDockId); SetUnsaved();" alt="Add field choice" border="0" src="Images/Add.png" /> </td> <td> <img id="imageDelete" style="cursor: pointer" runat="server" onclick="InitiateAjaxRequest('1,3,remove|' + this.id + ',' + selectedDockId); SetUnsaved();" alt="Delete field choice" border="0" src="Images/Delete.png" /> </td> </tr> </table> </ItemTemplate> </telerik:RadListView> </asp:Panel> </td> </tr>
actually am not able to bind the data to "uxSelectPage1" radcombobox. It always shows empty.
Where am doing wrong?
<script type="text/javascript"> var prototype = Telerik.Web.UI.RadComboBox.prototype; var set_text = prototype.set_text; var propertyChange = prototype._onInputPropertyChange; prototype.set_text = function (value) { this._skipEvent = 0; set_text.call(this, value); }; prototype._onInputPropertyChange = function () { if (!event.propertyName) event = event.rawEvent; if (event.propertyName == "value") { this._skipEvent++; if (this._skipEvent == 2) return; propertyChange.call(this); } };</script><script type="text/javascript"> var prototype = RadComboBox.prototype; var set_text = prototype.SetText; var propertyChange = prototype.OnInputPropertyChange; prototype.SetText = function (value) { this._skipEvent = 0; set_text.call(this, value); }; prototype.OnInputPropertyChange = function () { if (!event.propertyName) event = event.rawEvent; if (event.propertyName == "value") { this._skipEvent++; if (this._skipEvent == 2) return; propertyChange.call(this); } };</script>