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

I'm trying to populate a RadComboBox but I'm getting this error and I don't know why.

My RadComboBox:

<telerik:RadComboBox ID="regTypeComboBox" runat="server" Width="305" Skin="Telerik" OnClientLoad="OnClientLoadHandler" />

My js:

function OnClientLoadHandler(sender) {
    var combo;
    combo = sender;

    var serviceUrl = "myUrl";

    var paramData = {

    };

    $.ajax({
        type: 'GET',
        url: serviceUrl,
        contentType: 'application/json; charset=utf-8',
        crossDomain: true,
        data: JSON.stringify(paramData),
        dataType: 'json',
        success: function (response) {
            var listData = response.listData;
            $.each(listData, function (index, element) {
                var name, id;
                name = element.NAME;
                id = element.ID;
                var comboItem = new Telerik.Web.UI.RadComboBoxItem();
                comboItem.set_text(name); // --> SyntaxError: illegal character

                //comboItem.set_text("name"); // --> also SyntaxError: illegal character

                //comboItem.set_text(""); // --> also SyntaxError: illegal character
            });

},
        error: function () {
            alert("error");
        }
    });
}

 

It is pretty simple, but I don't know why it gives this error.

Any ideas? Thanks

 

 

Ivan Danchev
Telerik team
 answered on 19 Feb 2016
2 answers
173 views

Hi All:

How to set the RadGrid command line background color?  I am using the MetroTouch and I do not like the black header.  I've tried the following:

.RadGrid_MetroTouch thead {
    background-color: #25a0da;
}

Phil

Viktor Tachev
Telerik team
 answered on 19 Feb 2016
2 answers
37 views

Hi,

It is possible to drag and drop nodes from one radtreeview to other but no having the ability to do the reverse.  furthermore i want to have the possibility to drag and drop between nodes just in the other radtreeview.

 

Example : RadTreeView1 -> just possibility to drag and drop in Radtreeview2

 

    

 

but not being able to do the reverse
but not being able to do the reverse
but not being able to do the reverse
Nencho
Telerik team
 answered on 19 Feb 2016
5 answers
217 views
I’ve noticed an issue with the Refresh and Export icons on a RadGrid ever since upgrading to Visual Studio 2015.  The Refresh and Export icons now appear on the left side of the grid (see attached picture).  Does anyone know how to get it back on the right?  The issue only occurs while debugging in Visual Studio 2015 (Professional).  After the code is published to a test or prod site (running IIS) the icons appears correctly.  We are currently using 2015.3.1013.45.  This issue also occurs with 2016.127.45.  Thanks in advanced for any assistance.
Maria Ilieva
Telerik team
 answered on 19 Feb 2016
1 answer
173 views

 

I'm learning Telerik UI for ASP.NET AJAX now and I want to know how to use it with an external back-end RESTful API.

Correct me if I'm wrong... Since it is a framework to help us build the UI (front-end), there should be ways to bind the back-end to "give live" to the UI.

I was specting to see some pretty simple straight forward ways to bind data coming from my REST API, but every forum, blog, tutorial that I read so far presents a "hack" to do it.

 For instance, the most basic thing... I want to load data to a RadComboBox from my API.

 My RadComboBox:

<telerik:RadComboBox ID="regTypeComboBox" runat="server" Width="305" Skin="Telerik" />

 How can I use "http://maydomain.com:8080/mycompany/api/registerTypes" to populate my RadComboBox?
Thanks.
Peter Filipov
Telerik team
 answered on 19 Feb 2016
3 answers
190 views

Hi, I have the following Code to filter a GridBoundColumn. The data comes from a Microsoft SQL DB. For some reason the filtering is not working.

 

<telerik:GridBoundColumn DataField="TestTimeStamp"
                    UniqueName="TestTimeStamp" HeaderButtonType="TextButton"
                    HeaderText="<%$ Resources:Repository,ReportingTimeStamp%>" DataType="System.DateTime"
                    DataFormatString="{0:g}">
                    <FilterTemplate>
                        From
                            <telerik:RadDatePicker ID="FromOrderDatePicker2" runat="server"
                                Width="150px" DbSelectedDate='<%# startDate %>'>
                                <ClientEvents OnDateSelected="FromDateSelected" />
                            </telerik:RadDatePicker>
                        <br />
                        to
                            <div style="padding-left: 31px;">
                                <telerik:RadDatePicker ID="ToOrderDatePicker2" runat="server"
                                    Width="150px" DbSelectedDate='<%# endDate %>'>
                                    <ClientEvents OnDateSelected="ToDateSelected" />
                                </telerik:RadDatePicker>
                            </div>
                        <telerik:RadScriptBlock ID="scriptFilterEventDate" runat="server">
                            <script type="text/javascript">
                                function FromDateSelected(sender, args) {
                                    var tableView = $find("<%# ((GridItem)Container).OwnerTableView.ClientID %>");
                                    var ToPicker = $find('<%# ((GridItem)Container).FindControl("ToOrderDatePicker2").ClientID %>');
 
                                    var fromDate = FormatSelectedDate(sender);
                                    var toDate = FormatSelectedDate(ToPicker);
 
                                    if (toDate != '') {
                                        tableView.filter("TestTimeStamp", fromDate + " " + toDate, "Between", true);
                                        //tableView.filter("TestTimeStamp", fromDate, Telerik.Web.UI.GridFilterFunction.GreaterThan);
                                    }
                                }
 
                                function ToDateSelected(sender, args) {
                                    var tableView = $find("<%# ((GridItem)Container).OwnerTableView.ClientID %>");
                                    var FromPicker = $find('<%# ((GridItem)Container).FindControl("FromOrderDatePicker2").ClientID %>');
 
                                    var fromDate = FormatSelectedDate(FromPicker);
                                    var toDate = FormatSelectedDate(sender);
 
                                    if (fromDate != '') {
                                        //tableView.filter("TestTimeStamp", fromDate, Telerik.Web.UI.GridFilterFunction.GreaterThan);
                                        tableView.filter("TestTimeStamp", fromDate + " " + toDate, "Between", true);
                                    }
                                }
 
                                function FormatSelectedDate(picker) {
                                    var date = picker.get_selectedDate();
                                    var dateInput = picker.get_dateInput();
                                    var formattedDate = dateInput.get_dateFormatInfo().FormatDate(date, dateInput.get_displayDateFormat());
 
                                    return formattedDate;
                                }
                            </script>
                        </telerik:RadScriptBlock>
                    </FilterTemplate>
                </telerik:GridBoundColumn>

Eyup
Telerik team
 answered on 19 Feb 2016
5 answers
204 views

Hi Team,

 I would like to implement the responsive behavior of the search demos panel that appear on the left side when viewing a control demo page.

 What controls does that, the panel hides and a menu icon shows when the page view port changes.

 

 

Vessy
Telerik team
 answered on 19 Feb 2016
3 answers
103 views
Hi How can i achieve menu like attached picture which is like Telrik web with image icon, Please help
Veselin Tsvetanov
Telerik team
 answered on 18 Feb 2016
6 answers
81 views

Hi,

I have a weird issue with the ribbon menus.

I have a ribbon configured in this way

<telerik:RadRibbonBar ID="RadRibbonBar1" runat="server">
                <Tabs>
                    <telerik:RibbonBarTab runat="server" Text="tab1">
                        <telerik:RibbonBarGroup Text="group1">
                            <Items>
                                <telerik:RibbonBarMenu Size="Large" Text="menu1">
                                    <Items>
                                        <telerik:RibbonBarMenuItem Text="submenu1">
                                            <Items>
                                                <telerik:RibbonBarMenuItem Text="item1"></telerik:RibbonBarMenuItem>
                                                <telerik:RibbonBarMenuItem Text="item2"></telerik:RibbonBarMenuItem>
                                            </Items>
                                        </telerik:RibbonBarMenuItem>
                                        <telerik:RibbonBarMenuItem Text="submenu2"></telerik:RibbonBarMenuItem>
                                    </Items>
                                </telerik:RibbonBarMenu>
                            </Items>
                        </telerik:RibbonBarGroup>
                    </telerik:RibbonBarTab>
                </Tabs>
            </telerik:RadRibbonBar>

- Click on the menu1 item, the menu opens

- Move the mouse over the submenu1 item, the submenu opens

- Now move the mouse over the submenu2 item, the previous submenu closes

- Move again the mouse over submenu1, the submenu DOESNT open anymore!

Tested on 2015.2.623.40 and 2015.2.623.45

Any idea on how to fix this?

Thanks

Ivan Danchev
Telerik team
 answered on 18 Feb 2016
4 answers
476 views

Hi,

we have hierarchical radgrid where on expansion of main grid it expands and shows a detail table. each detail table will have multiple records of either type A or Type B. we need to show only one record of type A and one record type B on page load.

The first column of detail table will have an expand button, on click of this it should display all type A rows from client side, and on click of that button it should hide all those rows.

 

I don't want 3 level hierarchy. since the hidden rows and row with expand button belongs to same level

Maria Ilieva
Telerik team
 answered on 18 Feb 2016
Narrow your results
Selected tags
Tags
+? more
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?