Telerik Forums
UI for ASP.NET AJAX Forum
3 answers
152 views
Is there an example of using On Demand Paging with a RadClientDataSource.

We have a RadClientDataSource that connects to a controller return json data.  We pass the page index, and page size to the controller, and it returns the records for that page, as well as the total count that we assign to the virtualCount.

However, when we try to page, we get an "Out of stack space".  We do not see another call to our parameter map function to get another page.  How do we set this up?
Vasil
Telerik team
 answered on 27 Jun 2017
0 answers
241 views
Hi, I'm trying to bind between an excel file and the RadSpreadsheet control using what I checked in your forums.
The code I use and does not work is:
     Dim formatProvider As Telerik.Windows.Documents.Spreadsheet.FormatProviders.IWorkbookFormatProvider = New Telerik.Windows.Documents.Spreadsheet.FormatProviders.OpenXml.Xlsx.XlsxFormatProvider
                        Using input As Stream = New FileStream(filePath, FileMode.Open)
                            RadSpreadsheet1.Sheets.AddRange(Telerik.Web.Spreadsheet.Workbook.FromDocument(formatProvider.Import(input)).Sheets)  
                        End Using

In the UI part
  </div>
        <telerik:RadSpreadsheet runat="server" ID="RadSpreadsheet1">
<div>


The version of the spreadsheet is 2016.2.421.40 and telerik web.UI 2016.2.504.40.
I'm trying to get this code working in chrome.
jose
Top achievements
Rank 1
 asked on 27 Jun 2017
0 answers
134 views
What method can be used to check files for virus on upload ?
MARK
Top achievements
Rank 1
 asked on 27 Jun 2017
8 answers
1.5K+ views
Hi,

I am using a RadTreeView & the tree menu is data sourced. On the server side when I try to grab the nodes using

foreach (RadTreeNode node in RadTreeView1.Nodes)

This provides only the root nodes (the ones at the higher level). All of the nodes have quite few child node & subfolders (which again contain child nodes). How can I scroll thru all the nodes in the tree?

Thank you

raju
Top achievements
Rank 1
 answered on 27 Jun 2017
6 answers
274 views

Hi.
I am not good at English.

I use RadTreeView for Ajax 2009 Q3.
I try to maintain a state of RadTreeView Nodes before creating a new folder via right-clicking menu.
The sorce code is the following.


namespace TelerikTreeView  
{  
    public partial class _Default : System.Web.UI.Page  
    {  
        /// <summary>  
        /// Variable for state maintein  
        /// </summary>  
        private RadTreeNodeCollection preChangeTreeNodes;  
          
        protected void RadTreeView1_ContextMenuItemClick(object sender, RadTreeViewContextMenuEventArgs e)  
        {  
            RadTreeNode clickedNode = e.Node;  
 
            // Copy Nodes  
            this.CopyRadTreeNodesTo(out preChangeTreeNodes);  
            .....  
        }  
 
        /// <summary>  
        /// The state of present TreeView is copied onto the RadTreeNodeCollection object of the argument.  
        /// </summary>  
        /// <param name="nodes"></param>  
        private void CopyRadTreeNodesTo(out RadTreeNodeCollection nodes)  
        {  
            nodes = new RadTreeNodeCollection(this.RadTreeView1);  
            foreach (RadTreeNode node in this.RadTreeView1.Nodes)  
            {  
                nodes.Add(node.Clone());  
            }  
        } 

The following error occurs by the second post backing.

-----------------------
Failed to load viewstate.  The control tree into which viewstate is being loaded must match the control tree that was used to save viewstate during the previous request.  For example, when adding controls dynamically, the controls added during a post-back must match the type and position of the controls added during the initial request.
-----------------------

The error will not occurs when EnableViewState property of TreeView is false.
But I don't want to change EnableViewState to false. Beause I can not get RadTreeViewContextMenuEventArgs Value when it is false.
Also SessionState mode is SQLServer, I can not use session to maintain the node.
How to keep the node during page post-back?

raju
Top achievements
Rank 1
 answered on 27 Jun 2017
0 answers
77 views

Hi all,

I'm new for telerik radgrid. I'm trying to bind radnumerictextbox and checkbox into onecolumn. But I'm facing with issues that date column not accept checkbox type after radnumerictextbox defined in this column. How solve it?

 

Thanks all

AKL

Aung
Top achievements
Rank 1
 asked on 27 Jun 2017
0 answers
117 views

Hi ,

I want to change column to row level on my telerik grid.  So after we change the grid will be become like this all date will be columns level and ST,Min,Max,CTA,CTD,Stop Sell will be row level . Please kindly see the attachment.

 

Thanks & Best Regards

HAN

Myo
Top achievements
Rank 1
 asked on 27 Jun 2017
0 answers
183 views

I'm using a RadGrid to load data for one table and when I sort that table and then loud another RadGrid I get the error No property or field 'ElaScaleScore' exists in type 'AssessmentGradePerformanceResultsData'. The ElaScaleScore is the sorted column on the first grid and the column doesn't exist on the second grid. How can I fix the second grid so it doesn't try to sort on a column that doesn't exist?

 

Eric
Top achievements
Rank 1
 asked on 26 Jun 2017
0 answers
212 views

Hello Team,

I created a Rad grid with a GridBoundColumn which is assigned a DateTime column. I have the allowFilterOnColumns= True.

Since it is a template column i have added a RadDatePicker as said in the demo of basic template filtering.

But the filter is not working.

Here is the code i have now.

<%@ Page Language="vb" AutoEventWireup="false" CodeBehind="GridwithFilter.aspx.vb" Inherits="WebApplication1.GridwithFilter" %>
 
<%@ 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="rdsm1" runat="server"></telerik:RadScriptManager>
            <telerik:RadGrid ID="rgdFilter" runat="server" AutoGenerateColumns="false" AllowFilteringByColumn="true">
                <MasterTableView>
                    <Columns>
                        <telerik:GridTemplateColumn HeaderText="Product Name" UniqueName="ProductNameColumn">
                            <ItemTemplate>
                                <asp:Label ID="lblProduct" runat="server" Text='<%# Eval("ProductName") %>'></asp:Label>
                            </ItemTemplate>
                        </telerik:GridTemplateColumn>
                        <telerik:GridDateTimeColumn DataField="OrderDate" HeaderText="OrderDate" FilterControlWidth="110px"
                            SortExpression="OrderDate" PickerType="DatePicker" EnableTimeIndependentFiltering="true"
                            DataFormatString="{0:MM/dd/yyyy}">
                        </telerik:GridDateTimeColumn>
                         
                        <telerik:GridBoundColumn UniqueName="ShippedDate" DataField="ShippedDate" HeaderText="Shipped date"
                        DataFormatString="{0:d}" HeaderStyle-Width="100px">
                        <FilterTemplate>
                            <telerik:RadDatePicker RenderMode="Lightweight" ID="ShippedDatePicker" runat="server" Width="100px" ClientEvents-OnDateSelected="DateSelected"
                                DbSelectedDate='<%# SetShippedDate(Container) %>' />
                            <telerik:RadScriptBlock ID="RadScriptBlock2" runat="server">
                                <script type="text/javascript">
                                    function DateSelected(sender, args) {
                                        var tableView = $find("<%# TryCast(Container, GridItem).OwnerTableView.ClientID %>");
  
                                    var date = FormatSelectedDate(sender);
  
                                    tableView.filter("ShippedDate", date, "EqualTo");
                                }
                                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>
                    </Columns>
                </MasterTableView>
            </telerik:RadGrid>
        </div>
    </form>
</body>
</html>

 

and My Code behind

Imports Telerik.Web.UI
 
Public Class GridwithFilter
    Inherits System.Web.UI.Page
 
    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
        If Not IsPostBack Then
 
        End If
    End Sub
 
    Private Sub rgdFilter_NeedDataSource(sender As Object, e As GridNeedDataSourceEventArgs) Handles rgdFilter.NeedDataSource
        Dim dt As New DataTable()
        dt.Columns.Add("ProductName")
        dt.Columns.Add("ShippedDate", GetType(Date))
        Dim dr As DataRow
        dr = dt.NewRow()
        dr("ProductName") = "Product 1"
        dr("ShippedDate") = DateTime.Now
        dt.Rows.Add(dr)
 
        dr = dt.NewRow()
        dr("ProductName") = "Product 2"
        dr("ShippedDate") = DateTime.Now.AddMonths(5)
        dt.Rows.Add(dr)
 
        rgdFilter.DataSource = dt
    End Sub
    Protected Function SetShippedDate(ByVal container As GridItem) As System.Nullable(Of DateTime)
        If container.OwnerTableView.GetColumn("ShippedDate").CurrentFilterValue = String.Empty Then
            Return New System.Nullable(Of DateTime)()
        Else
            Return DateTime.Parse(container.OwnerTableView.GetColumn("ShippedDate").CurrentFilterValue)
        End If
    End Function
End Class

 

Regards

Rajesh

Rajeesh
Top achievements
Rank 1
 asked on 26 Jun 2017
1 answer
145 views

I am having a particular issue where my RadScheduler  doesn't respond on the first click, the radscheduler just refreshes the page. When I click it again then it works fine, this appears on every event on the RadScheduler even on the Week/Month/Year change. This only appear on one of my RadScheduler I am using, below is the code for the RadScheduler

 

div class="col-xs-12">
<telerik:RadScheduler RenderMode="Lightweight" runat="server" ID="RadScheduler1" StartEditingInAdvancedForm="False" SelectedView="WeekView"
DataKeyField="ID" DataSubjectField="Subject" DataStartField="Start" CustomAttributeNames="Confidential"
DataEndField="End"
RowHeight="30px"
OnAppointmentCreated="RadScheduler1_OnAppointmentCreated" OnAppointmentClick="RadScheduler1_OnAppointmentClick" Height="100%" ShowFooter="False">
<AppointmentTemplate>
<strong>
<div>
<asp:Label ID="lblArrival" runat="server"></asp:Label>&nbsp;<asp:Image runat="server" ID="imgFlight" ImageUrl="Content/images/landing.png" />&nbsp;
<asp:Label ID="lblDeparture" runat="server"></asp:Label>
</strong>
<br />
<asp:Label ID="lblAvailableSeats" runat="server" Text="Seats:" />&nbsp;<asp:Label ID="lblSeats" runat="server" />
&nbsp;&nbsp;&nbsp;&nbsp;
</div>
</AppointmentTemplate>
<TimeSlotContextMenuSettings EnableDefault="true"></TimeSlotContextMenuSettings>
<AppointmentContextMenuSettings EnableDefault="true"></AppointmentContextMenuSettings>
</telerik:RadScheduler>
</div>

Peter Milchev
Telerik team
 answered on 26 Jun 2017
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jay
Top achievements
Rank 3
Bronze
Iron
Iron
yw
Top achievements
Rank 2
Iron
Iron
Stefan
Top achievements
Rank 2
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jay
Top achievements
Rank 3
Bronze
Iron
Iron
yw
Top achievements
Rank 2
Iron
Iron
Stefan
Top achievements
Rank 2
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?