I have a ComboBox that I would like to change the Text value on the client side using JavaScript. How can I go about setting the text of a CB by passing a custom parameter. I would like this to be a universal function so I need to find the object calling the function, set the Substring value based on a passed parameter, and then set the text property of the CB to that. For example, options are:
1 | Item 1
2 | Item 2
3 | Item 3
On the event OnClientSelectedIndexChanged I would like to change the text to only the left character. What I am looking for is something like this, but works:
<telerik:RadComboBox ID="rcbItemCode" runat="server" CssClass="block width2" RenderMode="Lightweight" ExpandDirection="Down" DropDownAutoWidth="Enabled" EnableLoadOnDemand="True" ShowMoreResultsBox="true" EnableVirtualScrolling="true" OnItemsRequested="rcb_ItemsRequested" OnClientFocus="SetTextOfTheComboBox" OnClientSelectedIndexChanged="function (radcombobox, args) {special(this, args, 1);}" /><script type="text/javascript"> function special(sender, eventArgs, len) { debugger; var item = eventArgs.get_item(); var clientId = item.get_id(); var rcb = document.getElementById(clientId);; var newText = rcb.get_text().substring(0, len); rcb.set_text(newText); }</script>Hello,
I am currently using the checkbox template column to bind a boolean column which seems to be working fine except for one major problem.
When I click the checkbox (changed state) I will have to click multiple times around and/or above the checkbox row location to trigger the edited flag.
I need the flag triggered in order to call my batch edit save button function. (Batch save wont trigger without having edit flag up)
Everything seems to be binding properly without issue but except for getting the flag to trigger. Again, only multiple clicks around the checkbox will finally trigger the flag (exact position isn't clear).
Best,
-R
ASP Code:
<telerik:GridTemplateColumn ColumnEditorID="CompletedBox" Reorderable="true" AllowSorting="true" HeaderText="Complete" >
<HeaderStyle Width="60px" />
<ItemStyle CssClass="float-right" />
<ItemTemplate>
<asp:CheckBox ID="CheckBox3" runat="server" Checked='<%# Bind("CompletedAsBool") %>' />
</ItemTemplate>
<EditItemTemplate >
<asp:CheckBox ID="CheckBox2" runat="server" Checked='<%# Bind("CompletedAsBool") %>' />
</EditItemTemplate>
</telerik:GridTemplateColumn>

Hello,
I just came across an issue trying to enable/disable the Treeview control
It is declared this way :
<telerik:RadTreeView RenderMode="Classic" runat="Server" ID="trProvince" Height="350" CheckBoxes="True" TriStateCheckBoxes="true" CheckChildNodes="true" OnClientNodeClicked="ClientNodeClicked" Enabled="False" CssClass="Province" >
Next of it, there's a checkbox that allows to enable/disable it
Here's the JS doing that :
function ToggleRow(sender, eventArgs) { var rowClass = "." + sender.get_id().substring(3); var isChecked = sender.get_checked(); console.log(rowClass); console.log(isChecked); $(rowClass).each(function() { $(this).each(function () { var element = $find($(this)[0].id); console.log(element); console.log("enabled :" + element.get_enabled()); if (isChecked) { element.enable && element.enable(); element.set_enabled && element.set_enabled(true); } else { element.disable && element.disable(); element.set_enabled && element.set_enabled(false); } }); });}
It's working as in : When checkbox is checked, I can click the checkboxes in the TreeView, expand/collapse its node but it still has a "disabled" style (greyed)
How do I get it to remove the grey layer on the control?
Thank you
Telerik version : 2017.1.118

Within a step of my radwizard I need a button that is supposed to dynamically add some fields to my form as needed. No matter what I do, the button click event won't fire. What am I missing? I've added a simple demo to demonstrate:
<telerik:RadWizard RenderMode="Lightweight" ID="RadWizardIncidentGroupA" runat="server" CssClass="formfont" Width="100%" OnClientLoad="OnClientLoad" Skin="Bootstrap"OnClientButtonClicking="OnClientButtonClicking"OnFinishButtonClick="RadWizardIncidentGroupA_FinishButtonClick" OnCancelButtonClick="RadWizardIncidentGroupA_CancelButtonClick"BorderColor="#cccccc"><WizardSteps> <telerik:RadWizardStep ID="RadWizardStep1" Title="Administrative" StepType="Start" DisplayCancelButton="true" runat="server"> <div class="inputWrapper"> <asp:Label ID="lblTest" Text="Test1" runat="server"></asp:Label> <asp:Button ID="ChangeText" runat="server" Text="Add an Offense" OnClick="ChangeText_Click" /> </div> </telerik:RadWizardStep> </WizardSteps>
</telerik:RadWizard>
CODEBEHIND:
protected void ChangeText_Click(object sender, EventArgs e)
{
lblTest.Text = "Test2";
}
Hi, I have a page that contains a RadComboBox that let's the user select a group name and a RadGrid that displays the members of the selected group. I have added a setting to the RadAjaxManager to make the combo box update the grid. That part seems to be working as the loading panel is shown over the grid each time I pick a different value from the combo box. The problem is that the data in the grid doesn't change, unless I click the refresh button on the grid.
I set a breakpoint in my NeedDataSource event handler and I can see that the AJAX request occurs, but the handler is not invoked. Is this the expected behavior? If so, what is the correct way to achieve my desired outcome?
<telerik:RadAjaxManager ID="RadAjaxManager" runat="server">
<AjaxSettings>
<telerik:AjaxSetting AjaxControlID="RadComboBoxCustomGroups2">
<UpdatedControls>
<telerik:AjaxUpdatedControl ControlID="RadGridGroupMembers" LoadingPanelID="RadAjaxLoadingPanel" />
</UpdatedControls>
</telerik:AjaxSetting>
</AjaxSettings>
</telerik:RadAjaxManager>
<asp:Panel ID="CustomizeCustomGroupPanel" runat="server" GroupingText="Customize Custom Group" Width="635px">
<div>
<div class="InlineTable">
<telerik:RadComboBox ID="RadComboBoxCustomGroups2" runat="server"
DataSourceID="SqlDataSourceCustomGroups" DataTextField="Group_Name"
DataValueField="Group_Id" CssClass="radcombobox" AutoPostBack="True" />
</div>
</div>
<br />
<div>
<div>
<telerik:RadGrid ID="RadGridGroupMembers" runat="server" CssClass="RadGrid_site" ClientSettings-Selecting-AllowRowSelect="true"
AutoGenerateColumns="false" AllowAutomaticInserts="True" AllowAutomaticUpdates="True" AllowAutomaticDeletes="True" OnNeedDataSource="RadGridGroupMembers_NeedDataSource"
OnUpdateCommand="RadGridGroupMembers_UpdateCommand" OnInsertCommand="RadGridGroupMembers_InsertCommand">
<MasterTableView CommandItemDisplay="Top" EditMode="InPlace" DataKeyNames="Branch_Id">
<Columns>
<telerik:GridEditCommandColumn />
<telerik:GridBoundColumn DataField="Branch_Id" HeaderText="Branch ID" UniqueName="Branch_Id" ReadOnly="true" Display="false">
</telerik:GridBoundColumn>
<telerik:GridTemplateColumn HeaderText="Branch Name" UniqueName="Branch_Name">
<EditItemTemplate>
<asp:DropDownList runat="server" DataValueField="Branch_Name" DataSourceId="SqlDataSourceCustomGroupBranchesSource">
</asp:DropDownList>
</EditItemTemplate>
<ItemTemplate>
<asp:Label runat="server" ReadOnly="true" Text='<%# Eval("Branch_Name") %>'>
</asp:Label>
</ItemTemplate>
</telerik:GridTemplateColumn>
<telerik:GridDateTimeColumn DataField="Expiration" HeaderText="Expiration" UniqueName="Expiration" ReadOnly="false">
</telerik:GridDateTimeColumn>
</Columns>
</MasterTableView>
</telerik:RadGrid>
</div>
</div>
</asp:Panel>
I have a grid with a ClientSelectedItem column and an item template column with a list in it. When the page loads the ClientSelectedItem is disabled. I want to enable it client side when a value is selected in the dropdown, or change it back to disabled if they change the selection in the dropdown back to nothing. Here's the column section of the grid.
<Columns> <telerik:GridClientSelectColumn UniqueName="ClientSelectColumn" HeaderStyle-Width="47px" /> <telerik:GridBoundColumn DataField="CaseId" UniqueName="CASEID" Visible="false" /> <telerik:GridTemplateColumn UniqueName="FIRSTLASTNAMES" ShowFilterIcon="false" DataField="FIRSTLASTNAMES" SortExpression="FIRSTLASTNAMES" HeaderText="Soldier" CurrentFilterFunction="Contains" AutoPostBackOnFilter="true" HeaderStyle-Width="150px"> <ItemTemplate> <asp:LinkButton ID="lnkBtnName" runat="server" Text='<%# Eval("FIRSTLASTNAMES") %>' CommandArgument='<%# Eval("CASEID") %>' CommandName="Popup" /> </ItemTemplate> </telerik:GridTemplateColumn> <telerik:GridBoundColumn UniqueName="SSN" HeaderText="SSN" DataField="SSN" ShowFilterIcon="false" DataType="System.String" CurrentFilterFunction="Contains" AutoPostBackOnFilter="true" HeaderStyle-Width="50px" /> <telerik:GridBoundColumn UniqueName="COMPANYNAME" HeaderText="CO" DataField="CompanyName" ShowFilterIcon="false" DataType="System.String" CurrentFilterFunction="Contains" AutoPostBackOnFilter="true" HeaderStyle-Width="30px" /> <telerik:GridBoundColumn UniqueName="PLATOON" HeaderText="PLT" DataField="PLATOON" ShowFilterIcon="false" DataType="System.String" CurrentFilterFunction="Contains" AutoPostBackOnFilter="true" HeaderStyle-Width="30px" /> <telerik:GridBoundColumn UniqueName="SQUADRON" HeaderText="SQD" DataField="SQUADRON" ShowFilterIcon="false" DataType="System.String" CurrentFilterFunction="Contains" AutoPostBackOnFilter="true" HeaderStyle-Width="30px" /> <telerik:GridBoundColumn UniqueName="CDR" HeaderText="CDR" DataField="CDR" ShowFilterIcon="false" DataType="System.String" CurrentFilterFunction="Contains" AutoPostBackOnFilter="true" /> <telerik:GridBoundColumn UniqueName="SW" HeaderText="SW" DataField="SW" ShowFilterIcon="false" DataType="System.String" CurrentFilterFunction="Contains" AutoPostBackOnFilter="true" /> <telerik:GridBoundColumn UniqueName="OT" HeaderText="OT" DataField="OT" ShowFilterIcon="false" DataType="System.String" CurrentFilterFunction="Contains" AutoPostBackOnFilter="true" /> <telerik:GridBoundColumn UniqueName="NCM" HeaderText="NCM" DataField="NCM" ShowFilterIcon="false" DataType="System.String" CurrentFilterFunction="Contains" AutoPostBackOnFilter="true" /> <telerik:GridBoundColumn UniqueName="PSG" HeaderText="PSG" DataField="PSG" ShowFilterIcon="false" DataType="System.String" CurrentFilterFunction="Contains" AutoPostBackOnFilter="true" /> <telerik:GridBoundColumn UniqueName="SL" HeaderText="SL" DataField="SL" ShowFilterIcon="false" DataType="System.String" CurrentFilterFunction="Contains" AutoPostBackOnFilter="true" /> <telerik:GridTemplateColumn UniqueName="SLSelection" ShowFilterIcon="false" DataField="SL" SortExpression="SL" HeaderText="Select SL" Visible="true"> <ItemTemplate> <telerik:RadDropDownList ID="ddlSelectedSqdLdr" runat="server" Width="100" OnClientItemSelected="modifySelection" DefaultMessage="Select..."> </telerik:RadDropDownList> <asp:HiddenField ID="tranferCaseId" runat="server" Value='<%# Eval("CASEID") %>' /> </ItemTemplate> </telerik:GridTemplateColumn> <telerik:GridBoundColumn UniqueName="TC" HeaderText="TC" DataField="TC" ShowFilterIcon="false" DataType="System.String" CurrentFilterFunction="Contains" AutoPostBackOnFilter="true" /></Columns>
Thanks
Rodney
Hello,
I know there is an example how to show and hide the loading panel over one single page-element at the documentation. But I wonder if it is possible to show and hide the loading panel over multiple elements of the page, e.g. over a toolbar at the top and a grid at the bottom of the page.
Thanks in advance.
Kind regards
Felix