<telerik:RadGrid ID="RadGrid1" runat="server" CellSpacing="0" GridLines="None" AllowMultiRowEdit="True" AutoGenerateColumns="False" AllowAutomaticInserts="False" AllowAutomaticUpdates="False" OnNeedDataSource="GridNeedDataSource" OnPreRender="GridPreRender"> <MasterTableView AllowSorting="True" EditMode="Batch"> <Columns> <telerik:GridBoundColumn DataField="Id" HeaderText="Id" UniqueName="IdColumn" Display="False" ReadOnly="True"> </telerik:GridBoundColumn> <telerik:GridTemplateColumn HeaderText="Test Values" UniqueName="TestValuesColumn" ItemStyle-Width="400px"> <EditItemTemplate> <telerik:RadComboBox runat="server" ID="TestValuesComboBox" DropDownAutoWidth="Enabled" HighlightTemplatedItems="True" CheckBoxes="True" EnableCheckAllItemsCheckBox="True"> </telerik:RadComboBox> </EditItemTemplate> </telerik:GridTemplateColumn> </Columns> <BatchEditingSettings OpenEditingEvent="DblClick" /> </MasterTableView></telerik:RadGrid>protected void GridPreRender(object sender, EventArgs e){ RadGrid grid = sender as RadGrid; if (grid != null) { GridTableView masterTable = grid.MasterTableView; var editor = masterTable.GetBatchEditorContainer("TestValuesColumn"); var comboBox = (RadComboBox)editor.FindControl("TestValuesComboBox"); comboBox.Items.Clear(); for (int i = 1; i <= 10; i++) { RadComboBoxItem item = new RadComboBoxItem(); item.Text = i.ToString(); item.Value = i.ToString(); comboBox.Items.Add(item); item.DataBind(); } }}function ClearComboBox(sender, args) { if (sender.get_items().get_count() == 0) { return; } else { sender.clearItems(); sender.requestItems("parameter", true); }}
I have the following html:
<sq8:GridTemplateColumn DataField="FieldToFillChoiceValue" FilterImageToolTip="" HeaderText="" SortExpression="FieldToFillChoiceValue" UniqueName="FieldToFillValue" FilterControlAltText=""> <EditItemTemplate> <sq8:TextBox runat="server" ID="tbFieldToFill" ValidationGroup="DecisionGroup" /> <sq:BindableControl runat="server" TargetControlID="tbFieldToFill" DataField="FieldToFillTextValue"></sq:BindableControl> <asp:CustomValidator runat="server" ErrorMessage="CustomValidator" ID="cvFieldToFill" ValidationGroup="DecisionGroup"></asp:CustomValidator> <sq8:ComboBox runat="server" ID="cmbFieldToFill" ValidationGroup="DecisionGroup"> <Localization NoMatches="" ShowMoreFormatString="" AllItemsCheckedString="" ItemsCheckedString="" CheckAllString="" MoreItemsWithoutTotalRowCount="" NoMoreItemsWithoutTotalRowCount=""></Localization> </sq8:ComboBox> <sq:BindableControl runat="server" TargetControlID="cmbFieldToFill" DataField="FieldToFillChoiceValue" /> </EditItemTemplate> <ItemTemplate> <asp:Literal runat="server" ID="FieldToFillChoiceValue" Mode="Encode" /> <sq:BindableControl runat="server" TargetControlID="FieldToFillChoiceValue" DataField="FieldToFillChoiceValue" /> <asp:HiddenField runat="server" ID="hfFieldType" /> <sq:BindableControl runat="server" TargetControlID="hfFieldType" DataField="FieldToFillType"></sq:BindableControl> </ItemTemplate></sq8:GridTemplateColumn>
And I'm signed to OnBatchEditOpening and OnBatchEditOpened events.
My problem is that when I get to the OnBatchEditOpened handler, the value of tbFieldToFill is "TextBox" (which is the value of the hidden field) without me setting or binding any value to the control.
In the OnBatchEditOpening handler, the text box still haven't been rendered.
How and why does the value get into the textbox control?
Thanks for any help.
Hello,
I have 3 web parts each of which raise a different client side event to which the other 2 web parts react. Two of the web parts are asp .NET (Telerik) while the third is strictly client side JavaScript and REST services.
My issue is that the 2 asp .net web parts each perform a post back when they react to the event, passing some data to the server. Only one of the asp .net web parts processes their post back correctly. If the other ASP .NET web part is removed, everything works correctly.
I have considered serializing the post backs, so that one does not occur until the first has completed and rendered back to the client.
Is there a better way? Also my post backs are not showing the loading panel which does appear normally.
My client side event listener and post back code looks like this:
document.addEventListener('ADSBarcodeEvent', function (evt) { var barcode = evt.detail[0]; var assetType = evt.detail[1]; __doPostBack("<%=HiddenSearchRadButton.UniqueID%>", barcode + "||" + assetType);}, false);and on the server:
protected void HiddenSearchRadButton_Click(object sender, EventArgs e) { ProcessingExternalEvent = true; // stop infinite loop of events string passedArgument = Request.Params.Get("__EVENTARGUMENT"); // barcode + "||" + assetType if (passedArgument.Contains("||")) { string[] delimiter = new string[] { "||" }; string[] arguments = passedArgument.Split(delimiter, StringSplitOptions.None); string barcode = arguments[0]; string assetType = arguments[1];Dears,
I am new to RadGrid. I've a grid displayed without the Add New Record button.
I dont understand that. I am using NeedDataSource event to bind the data
Regards,
Endashaw

The code is posted below. When I click on the selection list I want the id of the selection list item to appear in the query string of browser after a partial postback. Is this possible?
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="telerik.aspx.cs" Inherits="Webtest.telerik" %><!DOCTYPE html><html xmlns="http://www.w3.org/1999/xhtml"><head runat="server"> <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script> <title></title> <script> function getQueryStringValue(key) { return decodeURIComponent(window.location.search.replace(new RegExp("^(?:.*[&\\?]" + encodeURIComponent(key).replace(/[\.\+\*]/g, "\\$&") + "(?:\\=([^&]*))?)?.*$", "i"), "$1")); } function addIdtoQueryString(itemId) { var querystring = getQueryStringValue("filter"); if(querystring=="") { querystring = itemId; } else { querystring = querystring + "+" + itemId; } return querystring; } function deleteIdFromQueryString(itemId) { var querystring = getQueryStringValue("filter"); var ids = querystring.split("+"); var newQuerystring = ""; for (var i = 0; i < ids.length; i++) { console.log(ids[i]); } var indexOfItemToDelete = ids.indexOf(itemId); ids.splice(indexOfItemToDelete, 1); for (var i = 0; i < ids.length; i++) { if (i != 0) { newQuerystring += "+"; } newQuerystring += ids[i]; } return newQuerystring; } function itemClicked(list, args) { var querystring =""; if (args.get_item().get_checked() == true) { querystring = addIdtoQueryString(args.get_item().get_value()); } else { querystring = deleteIdFromQueryString(args.get_item().get_value()); } if (querystring != "") document.forms["form1"].action = "?filter=" + querystring; else document.forms["form1"].action = "?"; alert(document.forms["form1"].action); } </script></head><body> <form id="form1" runat="server"> <telerik:RadScriptManager ID="rsManager" runat="server" AsyncPostBackTimeout="7200" /> <telerik:RadAjaxManager ID="raManager" runat="server" EnableAJAX="true" /> <telerik:RadAjaxManagerProxy ID="rampCommodity" runat="server" > <ajaxsettings> <telerik:AjaxSetting AjaxControlID="paCommodity"> <UpdatedControls> <telerik:AjaxUpdatedControl ControlID="paCommodity"></telerik:AjaxUpdatedControl> </UpdatedControls> </telerik:AjaxSetting> </ajaxsettings> </telerik:RadAjaxManagerProxy> <asp:Panel ID="paCommodity" runat="server"> <div> <telerik:RadCheckBoxList runat="server" ID="Questionnaire" AutoPostBack="true" CssClass="content" OnSelectedIndexChanged="Questionnaire_SelectedIndexChanged"> <ClientEvents OnItemClicked="itemClicked"> </ClientEvents> <Items> <telerik:ButtonListItem Text="Game apps (puzzles, charades, etc.)" Value="0" /> <telerik:ButtonListItem Text="Sports apps (sports schedules, scores, headlines, etc.)" Value="1" /> <telerik:ButtonListItem Text="Travel apps (airplane tickets, tourist guides, transportation info, etc.)" Value="2" /> <telerik:ButtonListItem Text="News apps (news, national headlines, technology announcements, etc.)" Value="3" /> <telerik:ButtonListItem Text="Entertainment apps (puzzles, charades, etc.)" Value="4" /> <telerik:ButtonListItem Text="Social networking apps (location check-ins, friend status updates, etc.)" Value="5" /> <telerik:ButtonListItem Text="Weather apps (local forecasts, natural disaster updates, etc.)" Value="6" /> <telerik:ButtonListItem Text="Other" Value="7" /> </Items> </telerik:RadCheckBoxList> </div> </asp:Panel> </form></body></html>

Hi I am goingnuts , please help me! RadGauge needle value updates fine to specified value on local host but not when I have published the code?
http://temperatur.gpslogik.se/1 is the published code. (throws input error on the Chrome developer console, I dont understand)
Here is part of my code!
<telerik:RadLabel ID="RadLabel6" runat="server" Text="Larmtillstånd" Font-Size="Small" AutoPostBack="True" Font-Bold="True"></telerik:RadLabel><br/>
<telerik:RadLabel ID="RadLabel3" runat="server" Text="Normal" BackColor="#33CC33" Font-Bold="True" ForeColor="White" Width="300px" ></telerik:RadLabel>
<div class="demo-container size-thin">
<telerik:RadRadialGauge runat="server" ID="RadRadialGauge1" Width="200px" Height="200px" Skin="Bootstrap">
<Pointer Value="0">
<Cap Size="0.1" />
</Pointer>
<Scale Min="0" Max="40" MajorUnit="10" >
<Labels Format="{0} C°" />
<Ranges>
<telerik:GaugeRange Color="#add8e6" From="0" To="5" />
<telerik:GaugeRange Color="Green" From="5" To="25" />
<telerik:GaugeRange Color="#ff0000" From="25" To="40" />
</Ranges>
</Scale>
</telerik:RadRadialGauge>
<p></p>
<telerik:RadHtmlChart ID="RainfallChart" runat="server" Layout="Sparkline" Width="300px" Height="60px" PlotArea-XAxis-Reversed="true">
<PlotArea>
<Series>
<telerik:AreaSeries DataFieldY="RainfallData">
<Appearance FillStyle-BackgroundColor="#00b37d"></Appearance>
<TooltipsAppearance Color="White" />
</telerik:AreaSeries>
</Series>
</PlotArea>
</telerik:RadHtmlChart><br />
<telerik:RadLabel ID="RadLabel7" Text="Temperatur trend" runat="server"></telerik:RadLabel>
<div class="demo-containers">
OBJCONN.Close() : OBJCONN.Open()
'Fyll dropdown med användare
Dim Q As New SqlCommand("SELECT * FROM temperature_values where TempDescription='" & unit & "'", OBJCONN)
Dim R As SqlDataReader = Q.ExecuteReader
If R.HasRows = True Then
Do While R.Read
adress1 = R("TemperatureAdress")
TidX = R("TempTimeStamp")
lat = R("Temperature_latitude")
lng = R("Temperature_longitude")
groupname = R("Temperatur_groupName")
TempDescription = R("TempDescription")
value = R("TempValue")
Loop
End If
OBJCONN.Close()
RadLabel2.Text = "<strong>Kl: " & TidX & "<br>" & groupname & " / " & TempDescription & "<br> Temperatur är " & value & "°C</strong>" ', Senast kända adress " & adress1
'Hämta aktuellt värde och tid för vald temperaturgivare
RadRadialGauge1.Pointer.Value = value
Timer1.Enabled = True
RainfallChart.DataSource = GetData()
RainfallChart.DataBind()

Hi,
I am Updating my table using a Vista on MSSQL.
Everything is fine on text fields except a ComboBox that is missing the ReBind. I have refresh the page using the Refresh button on my form.
How can I call the Refresh event onSave event?
Thx,
Valerio
