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

I can get the render suggested actions to work when its loaded up, but when the user selects an option, i want to render more suggested options for them to select.  I have the onpost firing. What am i missing here. this code fires but i dont see the options appear in the chat window.

 

function onPost(e) {

    if (e.sender.options.user.name != 'Bot') {

        if (e.text == 'How do I..?') {
            var chat = $("#chat").data("kendoChat");
            chat.renderSuggestedActions([{
                title: "Option 1.",
                value: "Option 1."
            }, {
                title: "Option 2",
                value: "Option 2"
            }
          
            ]);
        }
Attila Antal
Telerik team
 answered on 21 Sep 2023
1 answer
131 views

DLL: Progress Telerik UI ASP NET AJAX Versión 2020.2.617.40

Hi!,
I have a problem with dynamically loading data, and subsequently filtering data from the headers of a radgrid.

The radgrid data is loaded dynamically through the selection of a radcombo with Id "rcb_Views", and this loads a sql server database view into a sql SqlDataSource "eds_Generic" and binds it to the grid.

The problem is that filtering by grid headers also has to be implemented, and it works if the selection in the combo does not change. But when the selection, in order to load a new data view, and regenerate all the data in the radgrid, it gives an error:

"[column] is neither a DataColumn nor a DataRelation for the DefaultView table.

The problem seems clear, and it is that it does not refresh either the model or the data, since the error column belongs to the schema of the model of the previous view, but I have not been able to solve it by changing the data source of the data, doing a rebind, etc. .

Can someone guide me on how I can correct the problem?

ASPX

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentMain" runat="Server">
    <section class="section-admin-main">
        <h1 class="page-title">
            <asp:Label ID="lblTitle" runat="server" Text="Informes"></asp:Label>
        </h1>
        <telerik:RadAjaxManagerProxy ID="RadAjaxManager1" runat="server">
            <AjaxSettings>
                <telerik:AjaxSetting AjaxControlID="rcb_Views">
                    <UpdatedControls>
                        <telerik:AjaxUpdatedControl ControlID="rcb_Views"></telerik:AjaxUpdatedControl>
                        <telerik:AjaxUpdatedControl ControlID="RG_DistributorsWithoutParts"></telerik:AjaxUpdatedControl>
                        <telerik:AjaxUpdatedControl ControlID="eds_Generic"></telerik:AjaxUpdatedControl>
                    </UpdatedControls>
                </telerik:AjaxSetting>
                <telerik:AjaxSetting AjaxControlID="RG_DistributorsWithoutParts">
                    <UpdatedControls>
                        <telerik:AjaxUpdatedControl ControlID="rcb_Views"></telerik:AjaxUpdatedControl>
                        <telerik:AjaxUpdatedControl ControlID="RG_DistributorsWithoutParts"></telerik:AjaxUpdatedControl>
                        <telerik:AjaxUpdatedControl ControlID="eds_Generic"></telerik:AjaxUpdatedControl>
                    </UpdatedControls>
                </telerik:AjaxSetting>
            </AjaxSettings>
        </telerik:RadAjaxManagerProxy>
        <div id="div_combo">
            <telerik:RadComboBox ID="rcb_Views" runat="server" MaxHeight="200" Width="315" OnSelectedIndexChanged="rcb_Views_SelectedIndexChanged" DataSourceID="eds_ViewNames"
                DataTextField="description" DataValueField="ViewName" AutoPostBack="true" Label="Seleccione los datos a mostrar: ">
            </telerik:RadComboBox>
        </div>
        <telerik:RadGrid ID="RG_DistributorsWithoutParts" runat="server" Height="500px" AllowPaging="True" ShowFooter="True"
            AllowSorting="True" AutoGenerateColumns="True" ShowStatusBar="True" AllowFilteringByColumn="True" DataSourceID="eds_Generic" 
            OnItemCommand="RG_DistributorsWithoutParts_ItemCommand" CellSpacing="-1" Culture="es-ES" GridLines="Both">
            <GroupingSettings CaseSensitive="false" />
            <MasterTableView Width="100%" CommandItemDisplay="Top" CommandItemSettings-ShowAddNewRecordButton="false" CommandItemSettings-ShowRefreshButton="true" CommandItemSettings-ShowExportToExcelButton="true" PageSize="50">
                <CommandItemSettings ShowAddNewRecordButton="False" ShowExportToExcelButton="True"></CommandItemSettings>
                <Columns>
                </Columns>
            </MasterTableView>
            <ClientSettings>
                <Scrolling AllowScroll="true" UseStaticHeaders="false" SaveScrollPosition="false" />
                <Resizing AllowColumnResize="true" AllowResizeToFit="true" />
            </ClientSettings>
        </telerik:RadGrid>
        <asp:SqlDataSource ID="eds_Generic" runat="server" ConnectionString="<%$ ConnectionStrings:LMSViewsConnString %>" SelectCommand="SELECT * FROM [man_participantes]"></asp:SqlDataSource>
        <asp:SqlDataSource ID="eds_ViewNames" runat="server" ConnectionString="<%$ ConnectionStrings:LMSViewsConnString %>" SelectCommand="SELECT * FROM [v_ViewNames]"></asp:SqlDataSource>
    </section>
</asp:Content>
<asp:Content ID="Content4" ContentPlaceHolderID="FooterScripts" runat="Server">
    <style type="text/css">
        input[type="checkbox"] {
            -webkit-appearance: checkbox;
        }

        input[type="radio"] {
            -webkit-appearance: radio;
        }
    </style>

    <script type="text/javascript">
        function pageLoad() {
            var grid = $find('<%=RG_DistributorsWithoutParts.ClientID %>');
            var columns = grid.get_masterTableView().get_columns();
                for (var i = 0; i < columns.length; i++) {
                    columns[i].resizeToFit();
                }
        }
    </script>
</asp:Content>
ASPX.CS

protected void Page_Load(object sender, EventArgs e)
{
    (this.Master as BaseMaster).setVisibilityMenu(false);
    this.meth_TranslateGrids(RG_DistributorsWithoutParts);
    if (rcb_Views.SelectedValue != "")
    {
        eds_Generic.SelectCommand = "SELECT * FROM [" + rcb_Views.SelectedValue + "]";
    }

    if (!IsPostBack)
    {
        rcb_Views.DataBind();
        eds_Generic.SelectCommand = "SELECT * FROM [" + rcb_Views.SelectedValue + "]";
        RG_DistributorsWithoutParts.DataBind();
    }
}
protected void rcb_Views_SelectedIndexChanged(object sender, Telerik.Web.UI.RadComboBoxSelectedIndexChangedEventArgs e)
{
    eds_Generic.SelectCommand = "SELECT * FROM [" + rcb_Views.SelectedValue + "]";
    RG_DistributorsWithoutParts.DataBind();
}


Doncho
Telerik team
 answered on 19 Sep 2023
0 answers
144 views

I am able to bind pie chart data from code behind but I am not sure how to bind my Javascript object to Pie chart.

I am using ASP.NET Web Form and using AJAX to call Handler. I need to bind data after handler returns data. 

Anuj
Top achievements
Rank 1
 asked on 15 Sep 2023
1 answer
73 views
I've used Telerik for 15 years, or when it came out. I've stepped away from development as I moved up in ranks. Today, I'm going to develop an application. I purchased the software, installed it and opened Visual Studio. After opening Visual Studio, I selected "Telerik Web Forms Application" and clicked next. I selected a blank project from the Progress create new project screen. The app did it's thing and i was presented with a project with a Default.aspx. I tried to run it and it is nothing but errors, ( Unknown server tag 'telerik:RadStyleSheetManager'.)  (telerik, unknown tag prefix and so on) This has never happened in the past and I'm following Teleriks own project start. SMH. So much for quickly knocking out an application. Now I have to spend time trying to Unscrew Telerik's poor quality deployment and installation. SMH! So frustrating and annoying. 
So, what hoops do I need to jump through to get this working that was not done when I used Telerik to build this project?
Rumen
Telerik team
 answered on 14 Sep 2023
1 answer
124 views

To add a PDF file to a RadRotator control, the forum has a link to some code in Rich Content which has this:

                        <div class="image">
                            <img src='images/pic<%# XPath("Number") %>.gif' height="75" width="69" alt="" title=""
                                style="border: 0px" />
                        </div>
                        <div class="flashMovie">
                            <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://active.macromedia.com/flash4/cabs/swflash.cab#version=4,0,0,0"
                                width="165" height="74">
                                <param name="movie" value='images/Movie<%# XPath("Number") %>.swf' />
                                <param name="quality" value="high" />
                                <param name="bgcolor" value="#FFFFFF" />
                                <param name="wmode" value="transparent" />
                                <object type="application/x-shockwave-flash" data='images/Movie<%# XPath("Number") %>.swf'
                                    width="165" height="74">
                                    <param name="wmode" value="transparent" />
                                </object>
                            </object>
                        </div>
                        <div class="orderDetails">
                            order:
                            <asp:DropDownList runat="server">
                                <asp:ListItem Value="Vase">Vase</asp:ListItem>
                                <asp:ListItem Value="Card">Card</asp:ListItem>
                                <asp:ListItem Value="Box">Box</asp:ListItem>
                            </asp:DropDownList>
                            <br />
                            price: <b>$<%# XPath("Content")%></b>
                            <br />
                            <a href="#" class="orderInfo">details&nbsp;&raquo;</a>
                        </div>
                    

The Telerik answer about adding a PDF file says use the PDF's iFrame to add to the RadRotator, but iFrames are deprecated, and there is no iFrame in this code.  Can anyone provide a modern solution that specifically shows how to add an existing PDF file to a RadRotator?

 

 
Rumen
Telerik team
 answered on 14 Sep 2023
1 answer
191 views

Hi all

I have a radgrid with 1 detail table.

The master table retrieves data using a SQLDataSource ,a stored procedure and session value as a parameter - this works fine.

The detail table also uses a SQLDataSource and a stored procedure but the parameter for this is the key field from the master table and not a session field.

How do I go about grabbing the key field from the master and pass it to my stored procedure?

Any help greatly apprciated.

Geoff
Top achievements
Rank 1
Iron
 answered on 13 Sep 2023
1 answer
164 views

Hello

i'm stuck with a simple example.

I have a RadGrid with multiple column avec ExcelFilter activated.

When in a column, you have data like 'test AND test' the Filter got no FilterExpression when you select this particular line in  the filter with a tickbox.

If you use the Filter fonction normally (Contain) it work.

 

Here is a simple exemple.

Default.aspx :


<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="Default" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
    <telerik:RadStyleSheetManager id="RadStyleSheetManager1" runat="server" />
</head>
<body>
    <form id="form1" runat="server">
    <telerik:RadScriptManager ID="RadScriptManager1" 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>
    <div>
        <telerik:RadGrid ID="GridFile" runat="server"         
            OnNeedDataSource="ContextGrid_NeedDataSource"
            AllowSorting="true"
            AllowFilteringByColumn="True"
            FilterType="HeaderContext"
            EnableHeaderContextMenu="true" 
            EnableHeaderContextFilterMenu="true"
            OnFilterCheckListItemsRequested="RadGrid1_FilterCheckListItemsRequested"  
            FilterMenu-EnableRoundedCorners="false"
            >
             <MasterTableView AutoGenerateColumns="false" TableLayout="Auto"> 
                <Columns>
                    <telerik:GridBoundColumn UniqueName="Creation" DataField="Creation" HeaderText="Creation"   FilterCheckListEnableLoadOnDemand="true"/>
                    <telerik:GridBoundColumn UniqueName="Name" DataField="Name" HeaderText="Name" FilterCheckListEnableLoadOnDemand="true"/>
                 </Columns>
            </MasterTableView>
        </telerik:RadGrid>
    </div>
    </form>
</body>
</html>


And Defaults.aspx.cs 


using System.Data;
using Telerik.Web.UI;


public partial class Default : System.Web.UI.Page 
{
    
    protected void ContextGrid_NeedDataSource(object source, Telerik.Web.UI.GridNeedDataSourceEventArgs e)
    {
        DataTable table = new DataTable();

        GridFile.DataSource = getTable();
    }


    protected void RadGrid1_FilterCheckListItemsRequested(object sender, GridFilterCheckListItemsRequestedEventArgs e)
    {
        string DataField = (e.Column as IGridDataColumn).GetActiveDataField();
        DataTable table = getTable();

        table.DefaultView.Sort = DataField + " asc";

        e.ListBox.DataSource = table.DefaultView.ToTable(true, DataField);
        e.ListBox.DataKeyField = DataField;
        e.ListBox.DataTextField = DataField;
        e.ListBox.DataValueField = DataField;
        e.ListBox.DataBind();
    }

    protected DataTable getTable()
    {
        DataTable table = new DataTable();
        table.Columns.Add("Creation", typeof(string));
        table.Columns.Add("Name", typeof(string));

        int i = 0;
        for (i=0; i < 10; i++)
        {

            table.Rows.Add(
                "Name " + i,
                i + " The AND a test"
                ) ;
        }
        return table;
    }

}

 

Selection and Error in the 2 captures.

Works with OR also.

Any Clues ?

Thinks it's the same error like the quote.

 

Thanks a lot

Benjamin

 

Doncho
Telerik team
 answered on 12 Sep 2023
1 answer
172 views

Hello,

RadDateRangePicker is not working for me. The buttons do not display and of course no pop calendar as well. 

Other pickers work fine. Any idea what I am missing here

Thanks

Gil 

Rumen
Telerik team
 answered on 12 Sep 2023
0 answers
181 views

Please see the attached picture. I have a Grid with multi column headers. How do I access header cells where red arrows and green arrow are pointing at respectively?

Accessing header cells is happening in RadGrid1_OnPreRender().

BTW, how to visually indicate filtering for grid with multi column header ? I tried this code in: https://docs.telerik.com/devtools/aspnet-ajax/knowledge-base/grid-visually-indicate-filtered-columns-in-excel-like-filtering

It works fine with common grid, but for grid with multi colum headers, it has bugs and cannot show properly.

Thank you!

yuki
Top achievements
Rank 2
Iron
Iron
Iron
 updated question on 12 Sep 2023
0 answers
316 views

I love the RadSpreadsheet control.  It works great having the toolbar to open files, save files etc.

But I want to run some code on a button press on the page that does some specific validation, then 

taking each row and import into a database.

 

So I use this control to open xls files for user to view, make changes etc.

I then run some custom code that checks (Rows / Columns data) for custom rules

Then I want to take the end result and import that into a database.

 

Should I be using a Grid Control to do this as it seems impossible to get the worksheet from the RadSpreadSheet control when we use the open toolbar.

Roger
Top achievements
Rank 2
Iron
Iron
Iron
 asked on 05 Sep 2023
Narrow your results
Selected tags
Tags
+? more
Top users last month
Rob
Top achievements
Rank 3
Bronze
Iron
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
Iron
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?