Telerik Forums
UI for ASP.NET AJAX Forum
2 answers
106 views
Hi,
I want to find out changes to the controls on the form if any element is changed but without saving it if the user moves to the other pages I want to show the user to ‘some unsaved changes are there do you want to save it or not?’ something like to show to the user. For archiving this I am using the JavaScript. With this I was able to find out any changes to all the controls on the form except RadAsyncUpload control.
Can you please advise how can I find out the changes to this RadAsyncUpload control using javascript?
Thanks,
Ivan Danchev
Telerik team
 answered on 29 Jun 2016
2 answers
126 views

So I'm binding the data to the treelist via datatable. It defintely has data (over 2000 rows), and I'm using the needsdatasource event handler to bind. It must be recognizing SOMETHING because after it binds, the column names from the data appear in the list it just show no data. VS 2015 is that makes a difference. Code below:

<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="xxx.aspx.cs" Inherits="xxx.xxx.xxx" %>
 
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
 
<!DOCTYPE html>
 
<head runat="server">
    <meta http-equiv="X-UA-Compatible" content="IE=edge"/>
    <title></title>
</head>
 
<body>
    <form id="form1" runat="server">
    <telerik:RadScriptManager ID="RadScriptManager1" runat="server"></telerik:RadScriptManager>
    <div>
        <div>
            <telerik:RadDateTimePicker runat="server" ID="datePicker" Width="175px"></telerik:RadDateTimePicker><asp:Button runat="server" ID="btnLoad" Text="Load" OnClick="btnLoad_Click" /><asp:Button runat="server" ID="btnExport" OnClick="btn_Export_Click" Text="Export To Excel" /><br />
 
                <telerik:RadTreeList ID="RadTreeList1" runat="server" AllowPaging="true" PageSize="3" DataKeyNames="USERID"
                   OnNeedDataSource="RadTreeList1_NeedDataSource"  ParentDataKeyNames="CustomerID">
                     
                </telerik:RadTreeList>
 
 
        </div>
 
     
    </div>
    </form>
</body>
</html>



using System;
using System.Collections.Generic;
using System.Configuration;
using System.Data;
using System.Data.SqlClient;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Telerik.Web.UI;
 
namespace xxx.xxx
{
    public partial class Tracker : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            datePicker.SelectedDate = DateTime.Now;
        }
 
        protected void RadTreeList1_NeedDataSource(object sender, Telerik.Web.UI.TreeListNeedDataSourceEventArgs e)
        {
            var dt = GetDataSource();
            RadTreeList1.DataSource = dt;
        }
        protected void btnLoad_Click(object o,EventArgs e)
        {
            RadTreeList1.Rebind();
        }
        protected void btn_Export_Click(object o,EventArgs e)
        {
            RadTreeList1.ExportSettings.Excel.Format = TreeListExcelFormat.Biff;
           
            RadTreeList1.ExportToExcel();
        }
        public DataTable GetDataSource()
        {
            var dt = new DataTable();
            var strQuery = "";
 
            strQuery += " select ";
            strQuery += " USERID [CustomerID]";
            strQuery += ", USERID ";
            strQuery += ", FileInput";
            strQuery += ", MeterNo ";
            strQuery += ", MeterName ";
            strQuery += " ,LastReadTime ";
            strQuery += " from xx i ";
            strQuery += " JOIN xxx u ON u.CustomerID = i.USERID ";
            strQuery += " where ConnectionDevice = 18 AND isActive=1";
            strQuery += " and u.isParent = 1 ";
            strQuery += " AND Time<@Time ";
            strQuery += " order by userid,fileinput,meterno";
 
            using (var con = new SqlConnection(ConfigurationManager.ConnectionStrings["xxx"].ConnectionString))
            {
                con.Open();
                var cmd = new SqlDataAdapter(strQuery, con);
                cmd.SelectCommand.Parameters.AddWithValue("@Time", "11/1/2015");
                cmd.Fill(dt);
            }
            return dt;
        }
    }
}

Like I said it displays the treelist with all the columns from the query and corresponding datatable fine, but it's not displaying any data despite having 2000+records. 

 

Kostadin
Telerik team
 answered on 29 Jun 2016
2 answers
299 views

Hi,

I have 4 icon tiles that are shape=wide set to TileRows=2. How do I centre these on the screen (left-right)?

Al
Top achievements
Rank 1
Iron
Iron
Iron
 answered on 29 Jun 2016
1 answer
115 views

Hi,

I need to create a multi-level form for one of my requirements.

I have to create around 8 levels and each level will contain about 15 user fields (fields like textbox,checkbox, dropdown, radio buttons, file upload options so on..)

Will using RadWizard control be apt for my requirements ? and if i use radwizard will there be any performance issue as i will be having more that 100 user fields in a single page. Also, thanks to let me know if there are any other alternative for achieving my requirements. 

Thanks in advance for the response.

 

Dimitar
Telerik team
 answered on 29 Jun 2016
6 answers
325 views
is it possible to insert technical formulas into the radeditor?
we want to buy the kwizcom wikiplus and i've heard, that they use the telerik radeditor as editor.
our users want a technical formular editor like LaTeX.

or is there another editor we can install to have this feature?

thanks for your help.
Rumen
Telerik team
 answered on 29 Jun 2016
2 answers
218 views
I have added to my form a change to my save button if any (various) inputs are changed.
$(document).ready(function () {
    $("input,select,textarea").change(function () {
        $("#<%=btnSaveDataFull.clientid %>").addClass('SkinPulgin_button_update');
    });
});


this works for the textboxes, textareas ,comboboxes
but not dropdownlists changes.
Magdalena
Telerik team
 answered on 29 Jun 2016
1 answer
109 views

I am very confused by the following. The system design is a masterpage with 2 ContentPlaceHolders. The RadMenu is part of the masterpage with a SqlDataSource, and I am using "Silk" skin.

On the Content Page everything looks correct menu where it should be, however as soon as I add a RadNotification in the Contant Page, the menu side is bigger, it looks like the padding is off... However when I remove the RadNotification, everything goes back to normal...

Does anybody as to why this is happening, and how to fix it?

Magdalena
Telerik team
 answered on 29 Jun 2016
4 answers
282 views

Hello,

Have a model radwindow open where the contents of the page contains an asp repeater that generates dynamically rad input controls.

Everything works great until something in the page does an ajax callback.

At that point it is is still ok until you try to do something with the radwindow (move, close, resize ect..)

When you do I get the following error message 

"Error: Unable to get property 'reflowing' of undefined or null reference"

trigger [Line: 11557, Col: 33], Telerik.Web.UI.WebResource.axd
b.DropDown.prototype.reflow [Line: 12369, Col: 1], Telerik.Web.UI.WebResource.axd
Anonymous function [Line: 12401, Col: 36], Telerik.Web.UI.WebResource.axd
m.event.dispatch [Line: 1522, Col: 8380], Telerik.Web.UI.WebResource.axd
r.handle [Line: 1522, Col: 5064], Telerik.Web.UI.WebResource.axd

This error only occurs in IE (tested in IE 11, chrome and firefox)

Was wondering if anyone has run into this before and what can be done to fix this.

Thanks.

cramer
Top achievements
Rank 1
 answered on 28 Jun 2016
3 answers
164 views

Telerik Support,

I have one page that has a RadGrid with a GridHyperLinkColumn.  When the user clicks the hyperlink, a second page with a RadRotator is opened up in a new browser window.  Let's say I have 2 rows of data in the grid.  If I click on the first link, the image displays as expected in the RadRotator.  Next if I click on the second hyperlink, it should set no images for the RadRotator, but instead the RadRotator's datasource seems to somehow be cached and reloads the initially loaded image. 

Vice versa creates a similar issue.  Stop running the app and restart it.  Click on the second hyperlink first and the RadRotator is displayed with no image.  Next click on the first hyperlink and still no image is loaded.  The expected result no matter what order is selected is for the first hyperlink to display an image in the RadRotator and the second hyperlink should not display an image in the RadRotator.

Here is a video reproducing the issue both ways with a simple example:  http://screencast.com/t/2batqcc8

Here is the code for page 1

ImageList.aspx

<%@ Page Language="vb" AutoEventWireup="false" CodeBehind="ImageList.aspx.vb" Inherits="TestBed.ImageList" %>
 
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
 
<!DOCTYPE html>
 
<head runat="server">
    <title></title>
</head>
<body>
    <form id="form1" runat="server">
        <div>
            <telerik:RadScriptManager ID="RadScriptManager1" runat="server"></telerik:RadScriptManager>
            <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server"></telerik:RadAjaxManager>
            <telerik:RadGrid ID="RadGrid1" runat="server" Height="100%" Width="100%" AutoGenerateColumns="false">
                <MasterTableView>
                    <Columns>
                        <telerik:GridHyperLinkColumn DataTextField="Text" HeaderText="Image" Target="_blank" UniqueName="Text"
                            DataNavigateUrlFormatString="~\ImageViewer.aspx?image={0}" DataNavigateUrlFields="Image">
                        </telerik:GridHyperLinkColumn>
                    </Columns>
                </MasterTableView>
            </telerik:RadGrid>
        </div>
    </form>
</body>
</html>

ImageList.aspx.vb

Public Class ImageList
    Inherits System.Web.UI.Page
 
    Private Sub RadGrid1_NeedDataSource(sender As Object, e As Telerik.Web.UI.GridNeedDataSourceEventArgs) Handles RadGrid1.NeedDataSource
        Dim dt As New DataTable
        Dim dr As DataRow
        Dim col As New DataColumn("Image", GetType(Boolean))
        dt.Columns.Add(col)
        col = New DataColumn("Text", GetType(String))
        dt.Columns.Add(col)
        dr = dt.NewRow
        dr("Image") = True
        dr("Text") = "Image1"
        dt.Rows.Add(dr)
        dr = dt.NewRow
        dr("Image") = False
        dr("Text") = "Image2"
        dt.Rows.Add(dr)
        RadGrid1.DataSource = dt
    End Sub
End Class

ImageViewer.aspx

<%@ Page Language="vb" AutoEventWireup="false" CodeBehind="ImageViewer.aspx.vb" Inherits="TestBed.ImageViewer" %>
 
<!DOCTYPE html>
 
<head runat="server">
    <title></title>
</head>
<body>
    <form id="form1" runat="server">
        <div>
            <telerik:RadScriptManager ID="RadScriptManager1" runat="server"></telerik:RadScriptManager>
            <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server"></telerik:RadAjaxManager>
                <telerik:RadRotator ID="RadRotator1" runat="server" RenderMode="Lightweight" DataSourceID="XmlDataSource1"
                    Width="215px" Height="100px" ItemHeight="32px" FrameDuration="2000" ScrollDuration="2000" RotatorType="Buttons">                   
                    <ItemTemplate>
                        <div class="itemTemplate">
                            <img src="<%# XPath("SmallURL") %>" alt="" style="height: 100px; width: 100px;" onclick="SetImage('<%# XPath("LargeURL") %>');" />
                        </div>
                    </ItemTemplate>
                    <ControlButtons LeftButtonID="img_left" RightButtonID="img_right"></ControlButtons>
                </telerik:RadRotator>
                <asp:XmlDataSource ID="XmlDataSource1" runat="server"></asp:XmlDataSource>
        </div>
    </form>
</body>
</html>

ImageViewer.aspx.vb

Public Class ImageViewer
    Inherits System.Web.UI.Page
 
    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
        Dim image As Boolean = CBool(Me.Request.QueryString("image"))
        If image Then
            XmlDataSource1.Data = "<Data><DataItem><SmallURL>/Image1.jpg</SmallURL><LargeURL>/Image1.jpg</LargeURL></DataItem></Data>"
        Else
            XmlDataSource1.Data = "<Data><DataItem><SmallURL></SmallURL><LargeURL></LargeURL></DataItem></Data>"
        End If
    End Sub
 
End Class

Please help.

Thanks,

Rob

 

Rob
Top achievements
Rank 1
 answered on 28 Jun 2016
4 answers
133 views

I have a master/detail heirachary. The first expand of the master row to the respective details works fine. But then I can neither collapse that master row nor expand another row?

protected void RadGrid1_ItemCommand(object source, Telerik.Web.UI.GridCommandEventArgs e)
    {
        if ((string)e.CommandName == "ExpandCollapse")
        {
            string keyValues = ((GridEditableItem)e.Item).KeyValues;

            if (e.Item.OwnerTableView.Name == "MasterTable")
            {
                GridDataItem item = (GridDataItem)e.Item;
                Session["Headerkey"] = item["Headerkey"].Text; // set the primary key of the details table before the bind of the expand
            }
        }
    }

<telerik:RadGrid ID="RadGrid1" runat="server" AllowPaging="True" AllowSorting="True" PageSize="20" ShowFooter="True" CellSpacing="-1" GridLines="Both"
    CssClass="MyGridView"
    OnItemCommand="RadGrid1_ItemCommand"
    AllowCustomPaging="True">
    <GroupingSettings CollapseAllTooltip="Collapse all groups"></GroupingSettings>

    <ClientSettings EnableRowHoverStyle="True" AllowDragToGroup="True">
        <Selecting AllowRowSelect="True" />
    </ClientSettings>
    <MasterTableView AutoGenerateColumns="False" ShowGroupFooter="true" CommandItemDisplay="Top" DataKeyNames="Headerkey" Name="MasterTable">

        <CommandItemSettings ShowAddNewRecordButton="False" ShowExportToCsvButton="True" ShowExportToExcelButton="True" ShowPrintButton="true" />
        <Columns>
            <telerik:GridBoundColumn DataField="Headerkey" DataType="System.Int32" Display="true" FilterControlAltText="Filter Headerkey column" HeaderText="Headerkey" ReadOnly="True" SortExpression="Headerkey" UniqueName="Headerkey">
            </telerik:GridBoundColumn>
            <telerik:GridBoundColumn DataField="Groupkey" DataType="System.Int32" Display="False" FilterControlAltText="Filter Groupkey column" HeaderText="Groupkey" SortExpression="Groupkey" UniqueName="Groupkey">
            </telerik:GridBoundColumn>

            <telerik:GridBoundColumn DataField="xh.DTM02_ProductionDate" FilterControlAltText="Filter xh.DTM02_ProductionDate column" HeaderText=" Production Date" ReadOnly="True" SortExpression="xh.DTM02_ProductionDate" UniqueName="xh.DTM02_ProductionDate">
            </telerik:GridBoundColumn>

            <telerik:GridBoundColumn DataField="xh.BPR16_CheckIssueEFT_EffectiveDate" FilterControlAltText="Filter xh.BPR16_CheckIssueEFT_EffectiveDate column" HeaderText=" Check Issue Effective Date" ReadOnly="True" SortExpression="xh.BPR16_CheckIssueEFT_EffectiveDate" UniqueName="xh.BPR16_CheckIssueEFT_EffectiveDate">
            </telerik:GridBoundColumn>
            <telerik:GridBoundColumn DataField="BPR02_TotlActlProvdrPaymntAmnt" DataFormatString="{0:c}" FilterControlAltText="Filter BPR02_TotlActlProvdrPaymntAmnt column" HeaderText="Payment Amnt" SortExpression="BPR02_TotlActlProvdrPaymntAmnt" UniqueName="BPR02_TotlActlProvdrPaymntAmnt" Aggregate="Sum" FooterText="Total: $">
                <ItemStyle HorizontalAlign="Right" />
                <FooterStyle HorizontalAlign="Right" />
            </telerik:GridBoundColumn>
            <telerik:GridBoundColumn DataField="BPR13_ReceiverorProviderBankIDNo" FilterControlAltText="Filter BPR13_ReceiverorProviderBankIDNo column" HeaderText="BPR13_ReceiverorProviderBankIDNo" SortExpression="BPR13_ReceiverorProviderBankIDNo" UniqueName="BPR13_ReceiverorProviderBankIDNo" Display="false">
            </telerik:GridBoundColumn>
            <telerik:GridBoundColumn DataField="BPR15_ReceiverorProviderAccntNo" FilterControlAltText="Filter BPR15_ReceiverorProviderAccntNo column" HeaderText="BPR15_ReceiverorProviderAccntNo" SortExpression="BPR15_ReceiverorProviderAccntNo" UniqueName="BPR15_ReceiverorProviderAccntNo" Display="false">
            </telerik:GridBoundColumn>
            <telerik:GridBoundColumn DataField="TRN02_CheckEFT_TraceNumber" FilterControlAltText="Filter TRN02_CheckEFT_TraceNumber column" HeaderText="Trace Number" ReadOnly="True" SortExpression="TRN02_CheckEFT_TraceNumber" UniqueName="TRN02_CheckEFT_TraceNumber" Display="false">
            </telerik:GridBoundColumn>
        </Columns>
        <DetailTables>
            <telerik:GridTableView runat="server" DataKeyNames="HeaderKey" DataSourceID="SqlDataSource2" Name="DetailTable"  NoDetailRecordsText="No era details to display." NoMasterRecordsText="No era to display." CommandItemDisplay="Top" CommandItemSettings-ShowAddNewRecordButton="false" AutoGenerateColumns="false" AllowNaturalSort="False">

                <ColumnGroups>
                    <telerik:GridColumnGroup HeaderText="Patient" Name="Patient" HeaderStyle-HorizontalAlign="Center">
                        <HeaderStyle HorizontalAlign="Center"></HeaderStyle>
                    </telerik:GridColumnGroup>

                    <telerik:GridColumnGroup HeaderText="Service" Name="Service" HeaderStyle-HorizontalAlign="Center">
                        <HeaderStyle HorizontalAlign="Center"></HeaderStyle>
                    </telerik:GridColumnGroup>

                    <telerik:GridColumnGroup HeaderText="Provider" Name="Provider" HeaderStyle-HorizontalAlign="Center">
                        <HeaderStyle HorizontalAlign="Center"></HeaderStyle>
                    </telerik:GridColumnGroup>

                    <telerik:GridColumnGroup HeaderText="Payer" Name="Payer" HeaderStyle-HorizontalAlign="Center">
                        <HeaderStyle HorizontalAlign="Center"></HeaderStyle>
                    </telerik:GridColumnGroup>
                </ColumnGroups>

                <CommandItemSettings ShowAddNewRecordButton="False" ShowRefreshButton="False"></CommandItemSettings>
                <ParentTableRelation>
                    <telerik:GridRelationFields DetailKeyField="HeaderKey" MasterKeyField="HeaderKey"></telerik:GridRelationFields>
                </ParentTableRelation>
                <Columns>
                    <telerik:GridBoundColumn DataField="PatientName" FilterControlAltText="Filter PatientName column" HeaderText="Patient Name" SortExpression="Name" UniqueName="PatientName" Display="true" ColumnGroupName="Patient">
                    </telerik:GridBoundColumn>

                    <telerik:GridBoundColumn DataField="InsuredID" FilterControlAltText="Filter InsuredID column" HeaderText="Insured ID" SortExpression="InsuredID" UniqueName="InsuredID" Display="true" ColumnGroupName="Patient">
                    </telerik:GridBoundColumn>

                    <telerik:GridBoundColumn DataField="GroupNumber" HeaderText="Group Number" SortExpression="GroupNumber" UniqueName="GroupNumber" Display="true" ColumnGroupName="Patient">
                    </telerik:GridBoundColumn>

                    <telerik:GridBoundColumn DataField="PatientID" FilterControlAltText="Filter PatientID column" HeaderText="PatientID" SortExpression="PatientID" UniqueName="PatientID" Display="false" ColumnGroupName="Patient">
                    </telerik:GridBoundColumn>

                    <telerik:GridBoundColumn DataField="ServiceDate" FilterControlAltText="Filter ServiceDate column" HeaderText="Service Date" SortExpression="ServiceDate" UniqueName="ServiceDate" Display="true" ColumnGroupName="Service">
                    </telerik:GridBoundColumn>

                    <telerik:GridBoundColumn DataField="ServiceAmount" FilterControlAltText="Filter ServiceAmount column" HeaderText="Service Fee " SortExpression="ServiceAmount" UniqueName="ServiceAmount" Display="true" ColumnGroupName="Service" DataFormatString="{0:c}">
                        <ItemStyle HorizontalAlign="Right" />
                    </telerik:GridBoundColumn>

                    <telerik:GridBoundColumn DataField="CoPay/CoIns" FilterControlAltText="Filter CoPay/CoIns column" HeaderText="Patient / Responsible" SortExpression="CoPay/CoIns" UniqueName="CoPay/CoIns" Display="true" ColumnGroupName="Service" DataFormatString="{0:c}">
                        <ItemStyle HorizontalAlign="Right" />
                    </telerik:GridBoundColumn>

                    <telerik:GridBoundColumn DataField="ClaimAmtPaid" FilterControlAltText="Filter ClaimAmtPaid column" HeaderText="Amount Paid" SortExpression="ClaimAmtPaid" UniqueName="ClaimAmtPaid" Display="true" ColumnGroupName="Service" DataFormatString="${0:#,###.##}">
                        <ItemStyle HorizontalAlign="Right" />
                    </telerik:GridBoundColumn>

                    <telerik:GridBoundColumn DataField="PayerName" FilterControlAltText="Filter PayerName column" HeaderText="Payer Name" SortExpression="PayerName" UniqueName="PayerName" Display="false">
                    </telerik:GridBoundColumn>

                    <telerik:GridBoundColumn DataField="PayeeName" FilterControlAltText="Filter PayeeName column" HeaderText="Payee Name" SortExpression="PayeeName" UniqueName="PayeeName" Display="true" ColumnGroupName="Provider">
                    </telerik:GridBoundColumn>

                    <telerik:GridBoundColumn DataField="RenderingProvider" FilterControlAltText="Filter RenderingProvider column" HeaderText="Rendering Provider" SortExpression="RenderingProvider" UniqueName="RenderingProvider" Display="true" ColumnGroupName="Provider">
                    </telerik:GridBoundColumn>

                    <telerik:GridBoundColumn DataField="NPI" FilterControlAltText="Filter NPI column" HeaderText="NPI" SortExpression="NPI" UniqueName="NPI" Display="true" ColumnGroupName="Provider">
                    </telerik:GridBoundColumn>

                    <telerik:GridBoundColumn DataField="CLP07_PayerClaimControlNumber" HeaderText="Payer Control No" SortExpression="CLP07_PayerClaimControlNumber" UniqueName="CLP07_PayerClaimControlNumber" Display="true" ColumnGroupName="Payer">
                    </telerik:GridBoundColumn>
                </Columns>
                <PagerStyle Position="TopAndBottom" />
            </telerik:GridTableView>
        </DetailTables>
        <PagerStyle Position="TopAndBottom" />
    </MasterTableView>
    <PagerStyle Mode="NextPrev" PageSizes="10;20;50" Position="TopAndBottom" />
</telerik:RadGrid>

david
Top achievements
Rank 1
 answered on 28 Jun 2016
Narrow your results
Selected tags
Tags
+? more
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?