or
e.Item.GroupSettings.ExpandDirection = ExpandDirection.Downe.Item.GroupSettings.OffsetX = "-476"childItem = New RadMenuItem()childItem.CssClass="MenuSlide"e.item.Items.Add(childItem)Dim uc_Products As products = DirectCast(LoadControl("~/includes/products/products.ascx"), products)childItem.Controls.Add(uc_Products)<telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" Skin="Default" /><telerik:RadAjaxPanel ID="RadAjaxPanel1" runat="server" Width="600px" EnableAJAX="true"LoadingPanelID="RadAjaxLoadingPanel1" EnablePageHeadUpdate="True"HorizontalAlign="NotSet"><asp:Button Text="productlines" id="btn_productlines" runat=server /><asp:Repeater id="rpt_Footer" runat="server" OnItemCommand="UpdateProductGroups"> <HeaderTemplate><ul class="ProductFooter"></HeaderTemplate><ItemTemplate><li style="float:left;"><asp:Literal runat=server id="ltl_rewrite" Text='<%# Container.DataItem("rewrite") %>' /><asp:ImageButtonImageUrl='<%#FormatThumbnail(Container.DataItem("foto"))%>' Tooltip='<%#Container.DataItem("description")%>' id="btn_Type" runat="server" /></li></ItemTemplate><FooterTemplate></ul></FooterTemplate></asp:Repeater><asp:Label runat=server id="aa" Text="aaa" /></telerik:RadAjaxPanel>Sub UpdateProductGroups(ByVal Sender As Object, ByVal e As RepeaterCommandEventArgs)aa.Text = "bbb"End Sub var curLiEl = args.get_row();<br> var firstInput = curLiEl.getElementsByTagName("input")[0]; <br> var table = document.createElement("table"); <br><br> <br> //A new row for a Description field <br> row = table.insertRow(-1);<br> cell = row.insertCell(-1);<br> input = CreateInput("Desc", "text"); <br> label = CreateLabel("Description", input.id);<br> cell.appendChild(label);<br> cell = row.insertCell(-1);<br> cell.appendChild(input);<br><br> //Add a File label in front of the file input<br> var fileInputSpan = curLiEl.getElementsByTagName("span")[0];<br> var firstNode = curLiEl.childNodes[0];<br> label = CreateLabel("File", radUpload.getID());<br> curLiEl.insertBefore(label, firstNode);<br> curLiEl.insertBefore(table, label);<br> }<br><br> function CreateLabel(text, associatedControlId) {<br> var label = document.createElement("label");<br> label.innerHTML = text;<br> label.setAttribute("for", associatedControlId);<br> label.style.fontSize = 12;<br> return label;<br> }<br><br> function CreateInput(inputName, type) {<br> var input = document.createElement("input");<br> input.type = type;<br> input.name = inputName;<br> input.style.height = "18px";<br> input.style.width = "130px";<br> input.style.fontSize = "12px";<br> input.style.fontFamily = "Calibri"; <br> return input;<br> }
<P>protected void radgridSearchResults_SelectedIndexChanged(object sender, EventArgs e)<BR> {<BR> //get the Selected Row and populate the Details...<BR> try<BR> {<BR> if (radgridSearchResults.SelectedValue != null)<BR> {<BR> //GridDataItem dataItem = (GridDataItem)radgridSearchResults.SelectedItems[radgridSearchResults.SelectedItems.Count - 1];<BR> //int selectedIndex = int.Parse(ViewState["CurrentRowIndex"].ToString());<BR> //GridDataItem dataItem = (GridDataItem)radgridSearchResults.SelectedItems[selectedIndex];<BR> //var scriptId = dataItem.GetDataKeyValue("id").ToString();</P> <P> var scriptId = radgridSearchResults.SelectedValue.ToString();</P> <P> ViewState[Globals.CurrentScriptId] = scriptId;<BR> //Pass Id to another function...
setDetails(int.Parse(scriptId.ToString()));<BR> }<BR> }<BR> catch (System.Exception ex)<BR> {<BR> //Error code removed....
return;<BR> }<BR> }</P> function addOption(selectbox, text, value) {
var optn = document.createElement("OPTION");
optn.text = text;
optn.value = value;
selectbox.options.add(optn);
}
And I am looping and adding options to combobox.
for (var i = 0; i < strArray.length; i++) {
addOption($find("<%= SavedPresetMenu.ClientID %>"), strArray1[i], strArray[i]);
}
Here SavedPresetMenu is rad combobox Id.In the above function I am getting one javascript error.
selectbox.options is undefined.And if I clear options array also getting same error.
$find("<%= SavedPresetMenu.ClientID %>").options.length = 0;
In this line also getting same error. How to use rad combobox in this situation.
Any ideas, suggestions would be greatly appreciated.
Thanks,
Bhagath.
protected void RCB1_Selectedindexchanged(object sender, RadComboBoxSelectedIndexChangedEventArgs e) { RadComboBox rcb = (RadComboBox)sender; // combobox that fires event string hi = rcb.SelectedValue; // combobox value, always old value string ha = rcb.Text; // combobox text, always text from newly selected item string hu = e.OldValue; // working correctly always value of previously selected item string ho = e.OldText; //working correctly always text of previously selected item string he = e.Value; // not working as one would expect it to work, always OLD value string hy = e.Text; // working as expected always NEW text string hiy = rcb.SelectedItem.Value; // Always old value string hyi = rcb.SelectedItem.Text; // always old value DataView dv = (DataView)SqlDataSource2.Select(new DataSourceSelectArguments()); string huu; // correct value after looping through intire datasource, would like to avoid this foreach (DataRowView row in dv) { if (row["Naambedrtot"].ToString() == rcb.Text) { huu = row["klantnummer"].ToString(); } } if (e.OldValue != e.Value) // always the same so selected value never gets changed { rcb.SelectedValue = e.Value; } }