Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
306 views

Hi 
I am unable to get the RadGrid EditItemTemplate RadComboBox with checkboxes=ture selected items are empty in RadGrid BatchEdit event. Basically I put the RadComboBox in RadGrid EditItemTemplate and selecting the multiple of RadCombo box and try get those selected item in RadGrid BatchEdit event to save into db, but RadComboBax seletedItems count is empty and I am not able to get the selected items of RadcomboBox. 

Instead of RadComboBax if I use the DropDownList I am to get the selected value in Grid BatchEdit event, but my requirement is need to seleted the more than one item so I am using RadComboBox. Here the below is my code. 

<telerik:RadListBox RenderMode="Lightweight" runat="server" ID="SavedChangesList" Width="600px" Height="200px" Visible="false"></telerik:RadListBox>
        <telerik:RadGrid RenderMode="Lightweight" ID="RadGrid1" GridLines="None" runat="server" AllowAutomaticDeletes="True"
            AllowAutomaticInserts="True" PageSize="10" OnItemDeleted="RadGrid1_ItemDeleted" OnItemInserted="RadGrid1_ItemInserted"
            OnPreRender="RadGrid1_PreRender" AllowAutomaticUpdates="True" AllowPaging="True"
            AutoGenerateColumns="False" DataSourceID="SqlDataSource1" OnBatchEditCommand="RadGrid_BatchEditCommand">
            <MasterTableView CommandItemDisplay="TopAndBottom" DataKeyNames="GLAccountMaintenanceID,Region"
                DataSourceID="SqlDataSource1" HorizontalAlign="NotSet" AutoGenerateColumns="False" EditMode="Batch">
                <BatchEditingSettings EditType="Row" HighlightDeletedRows="true"/>
                <Columns>
                     <telerik:GridBoundColumn UniqueName="GLAccountMaintenanceID"  HeaderText="GLAccountMaintenanceID" DataField="GLAccountMaintenanceID" HeaderStyle-Width="50px">
                     </telerik:GridBoundColumn>
                    <telerik:GridTemplateColumn HeaderText="Region" DefaultInsertValue="Beverages" HeaderStyle-Width="100px" UniqueName="Region" DataField="Region">
                        <ItemTemplate>
                            <%# Eval("Region") %>
                        </ItemTemplate>
                        <EditItemTemplate>
                            <telerik:RadComboBox ID="radComboBox" RenderMode="Lightweight" DropDownAutoWidth="Enabled" runat="server" AutoPostBack="false" EnableLoadOnDemand="true" DataValueField="RegionId"
                                DataTextField="RegionDesc" DataSourceID="SqlDataSource2" CheckBoxes="false">
                            </telerik:RadComboBox>
                        </EditItemTemplate>
                    </telerik:GridTemplateColumn>
                    <telerik:GridButtonColumn ConfirmText="Delete this product?" ConfirmDialogType="RadWindow"
                        ConfirmTitle="Delete" HeaderText="Delete" HeaderStyle-Width="50px" 
                        CommandName="Delete" Text="Delete" UniqueName="DeleteColumn">
                    </telerik:GridButtonColumn>
                </Columns>
            </MasterTableView>
            <ClientSettings AllowKeyboardNavigation="true"></ClientSettings>
        </telerik:RadGrid>
    </div>
    <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="Data Source=HGT-LAP-085;Initial Catalog=TexasHealthQA;UID=sa;Password=Hallmark123"
        DeleteCommand="DELETE FROM [GlAccountMaintenanceConfig] WHERE [GLAccountMaintenanceId] = @GLAccountMaintenanceId" InsertCommand="INSERT INTO [GlAccountMaintenanceConfig] ([Region]) VALUES (@Region)"
        SelectCommand="SELECT GLAccountMaintenanceId,Region FROM [GlAccountMaintenanceConfig]"
        UpdateCommand="UPDATE [GlAccountMaintenanceConfig] SET [Region] = @Region WHERE [GLAccountMaintenanceId] = @GLAccountMaintenanceId">
        <DeleteParameters>
            <asp:Parameter Name="GLAccountMaintenanceId" Type="Int32"></asp:Parameter>
        </DeleteParameters>
        <InsertParameters>
            <asp:Parameter Name="Region" Type="String"></asp:Parameter>
        </InsertParameters>
        <UpdateParameters>
            <asp:Parameter Name="GLAccountMaintenanceId" Type="Int32"></asp:Parameter>
            <asp:Parameter Name="Region" Type="String"></asp:Parameter>
        </UpdateParameters>
    </asp:SqlDataSource>
    <asp:SqlDataSource ID="SqlDataSource2" runat="server" ConnectionString="Data Source=HGT-LAP-085;Initial Catalog=TexasHealthQA;UID=sa;Password=Hallmark123"
        ProviderName="System.Data.SqlClient" SelectCommand="SELECT [RegionId],[RegionDesc] FROM Region"></asp:SqlDataSource>

 protected void RadGrid_BatchEditCommand(object sender, GridBatchEditingEventArgs e)
        {
            foreach (GridBatchEditingCommand command in e.Commands)
            {
                if (command.Type == GridBatchEditingCommandType.Update)
                {
                    Hashtable newValues = command.NewValues;
                    Hashtable oldValues = command.OldValues;
                    RadComboBox radcombo = RadGrid1.FindControl(RadGrid1.MasterTableView.ClientID + "_Region").FindControl("radComboBox") as RadComboBox;
                    string radcomboitems = string.Empty;
                    foreach (var item in radcombo.CheckedItems)
                    {
                        radcomboitems = radcomboitems + item.Value + ",";
                    }
                }
            }
        }

Please look into this issue help to me, I am new to Telerik.

Thankyou in advance.

Eyup
Telerik team
 answered on 07 Sep 2020
1 answer
13.2K+ views

Hi!,

TargetFramework: 4.5.2

DLL from C:\Program Files (x86)\Progress\Telerik UI for ASP.NET AJAX R2 2020\Bin45

Starting first default page debugger in Visual Studio give me Exception Unhanded: DOMException: Failed to execute 'querySelectorAll' on 'Element': '*,:x' is not a valid selector. Visual stop just after comment below (Please check attachment).

 

/* END Telerik.Web.UI.Common.Core.js */
/* START Telerik.Web.UI.Common.jQuery.js */
/*! jQuery v1.12.4 | (c) jQuery Foundation | jquery.org/license */

 

 

Also loading pages is slow. Maybe because this exception occurs 2 times per each page (on loading).

 

Page is simple:

<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="q.aspx.cs" Inherits="Stocks.q" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
 
<head runat="server">
    <title>Logowanie</title>
</head>
<body>
    <form id="form1" runat="server">
 
        <telerik:RadScriptManager ID="rsm" runat="server">
            <Scripts>
                <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.Core.js" />
                <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.jQuery.js" />
                <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.jQueryInclude.js" />
            </Scripts>
        </telerik:RadScriptManager>
 
        <script type="text/javascript">
</script>
 
        <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
        </telerik:RadAjaxManager>
 
        <asp:Table ID="Table1" runat="server" HorizontalAlign="Center">
            <asp:TableRow runat="server">
                <asp:TableCell runat="server" ColumnSpan="2" HorizontalAlign="Center">
                    <telerik:RadLabel ID="RadLabel1" runat="server" Text="test"></telerik:RadLabel>
                </asp:TableCell>
            </asp:TableRow>          
        </asp:Table>
 
    </form>
</body>
</html>

 

Vessy
Telerik team
 answered on 04 Sep 2020
3 answers
485 views
I have an application and when the user hit a button I want to clear the selected nodes in the treeview.  I have tried SelectedNodes.Clear() but the selects remain.
Vessy
Telerik team
 answered on 04 Sep 2020
1 answer
367 views

Hello,

 

I would like my tooltip not to show the x an y coordinates on my ScatterSeries, but another string (ProjectName). ProjectName is a column in my datatable that I'm using as the source.

 

Can you please tell me what's wrong  with the following code? It shows undefined when I hover over a plot item.

 scatterSeries.TooltipsAppearance.ClientTemplate = "#=dataItem.projectname#";

 

Thank you

Vessy
Telerik team
 answered on 04 Sep 2020
5 answers
519 views

Hi All,

I have a templated combobox like so:

<telerik:RadComboBox id="ddlProgressiveInterventionBehaviour" Width="450px" Skin="Bootstrap" runat="server"
                                                DataTextField="Description" Height="400" DataValueField="ID" AutoPostBack="true" HighlightTemplatedItems="true">
                                            <HeaderTemplate>
                                                <table  >
                                                    <tr>
                                                        <td style="width: 200px;">
                                                            Policy For Success</td>
                                                        <td style="width: 80px;">
                                                            Risk Level</td>
                                                        <td style="width:300px;">
                                                            Behaviour</td>
                                                        <td style="width: 40px;">
                                                            Points</td>
                                                    </tr>
                                                </table>
                                            </HeaderTemplate>
                                            <ItemTemplate>
                                                <table  >
                                                    <tr>
                                                        <td style="width: 200px;">
                                                            <%# DataBinder.Eval(Container.DataItem, "PolicyForSuccessName")%>
                                                        </td>
                                                        <td style="width: 80px;">
                                                            <%# DataBinder.Eval(Container.DataItem, "InitialRiskLevelName")%>
                                                        </td>
                                                        <td style="width: 300px;">
                                                            <%# DataBinder.Eval(Container.DataItem, "Name")%>
                                                        </td>
                                                        <td style="width: 40px;">
                                                            <%# DataBinder.Eval(Container.DataItem, "RiskLevelPointsEachInstance")%>
                                                        </td>
                                                    </tr>
                                                </table>
                                            </ItemTemplate>
                                        </telerik:RadComboBox>

 

The radcombo is databound to a generic list of objects that have the attributes listed.  I can easily add a cssclass name attrbute to each object int the list or a hexcolor attribute etc.  When rendered it looks like the attached file.  My question is assuming I have a cssclass called .makered {..}  how do I apply it to items that have a level of 3 on the risklevel column for ONLY the risk level column in the template,  ie, for specific columns and specific items.  Applying the class to the whole row would work fine too.  Items are databound...not added in the markup.  Also any help lining up the columns would be helpful.

Thanks!

 

Eric R | Senior Technical Support Engineer
Telerik team
 answered on 03 Sep 2020
2 answers
128 views

I am trying to open the context menu of a DetailTable in the MasterTableView. There is only 1 table and it has the columns that we want the users to select columns. Honestly, this should be something out of coding, like as header option. RIght clicking is not something the user would know, unless told. A button is perfectly normal. So i tried a button and it doesnt open the Context Menu of the GridTableView nested in the MasterTableView

 

 

 

 

<telerik:RadButton runat="server" AutoPostBack="false" OnClientClicked="ShowMenu" Text="Column Chooser" RenderMode="Lightweight" />
 
<telerik:RadGrid runat="server" ID="RadGridMembers"...

    <MasterTableView runat="server".... 

       <DetailTables>

           <telerik:GridTableView Name="MemberDetailTable"....

</telerik:GridTableView>

</DetailTables>
</MasterTableView>
</telerik:RadGrid>

 

 

 

 

Eric R | Senior Technical Support Engineer
Telerik team
 answered on 03 Sep 2020
9 answers
242 views
<rade:radeditor> control is not rendered properly in Firefox where it's working fine in IE and Chrome. Observed one thing by comparison with other browsers is that the functions which are in radEditor.js are hitting fine for other browsers but not Firefox. In Firefox we can see it's only hitting starting point in js file after that it's not hitting functions like RadEditorInitilaize() etc..Please respond as soon as possible.
Manaswi
Top achievements
Rank 1
 answered on 03 Sep 2020
16 answers
4.4K+ views

Failed to create designer 'Telerik.Web.UI.RadMonthYearPicker, Telerik.web.UI, Version=2018.1.117.45

and other Control example "Failed to create designer 'Telerik.Web.UI.RadMonthYearPicker, Telerik.web.UI, Version=2018.1.117.45"

How can I do in this Queation?

Vessy
Telerik team
 answered on 03 Sep 2020
11 answers
253 views
I want to hide the tab area ussing css.  After upgrading to the new controls the tab area now displays at full height with no text.  Before is was only a few pixels high with no tab text.
Vessy
Telerik team
 answered on 03 Sep 2020
4 answers
222 views

Receiving the following error:

JavaScript runtime error: Sys.ArgumentException: Cannot deserialize empty string

Parameter name: data

The custom save javascript does the following:

var fileName = imageEditor.get_serverImageUrl();

imageEditor.saveImageOnServer(fileName, true);

The server-side code is as follows:


If e.FileName <> "" Then

   Dim img As ImageEditor.EditableImage = e.Image.Clone()

   Dim strFilePath As String = Server.MapPath(e.FileName)

   e.OverwriteFile = True

   img.Image.Save(strFilePath)







   e.Cancel = True

End If






Josh
Top achievements
Rank 1
Veteran
 answered on 02 Sep 2020
Narrow your results
Selected tags
Tags
+? more
Top users last month
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?