Telerik Forums
UI for ASP.NET AJAX Forum
2 answers
476 views

Hi, I am using RadDatePicker as follows:

 

<telerik:RadDatePicker ID="RadDATERECIEVED" runat="server" Culture="English (United States)" >
<DateInput runat="server" DateFormat="MM/dd/yyyy" MaxLength="10">

 

The picker works fine, you can pick the date, it formats with a maximum length.

I have two questions:

1.  How do I set the DatePicker field so that the user cannot enter a date, it has to be chosen from the calendar.

2.  I will be loading some records with an existing date from SQL that needs to be loaded into the DatePicker.   What property do I use as I see no value property.

 

Thank you for your time.  Dale,

Dale
Top achievements
Rank 1
 answered on 16 Dec 2015
2 answers
124 views

Hi guys,

Is possible with RadScheduler in Timeline view to create a second group level? I mean, a label that split the group on the left, I've created an example with an image editing software

 

Marbry
Top achievements
Rank 1
 answered on 16 Dec 2015
1 answer
114 views

Hi,

I'm using the new FilterType="HeaderContext" with my RadGrid.  In this case I am going against a large set of items that may take some time to load when the user filters.  So, I have the RadGrid set to register to itself with AJAX which seems to work well in all cases except when a filter is applied from the context menu.  Here's what I observe:

1) User opens context menu and enters in filter criteria.

2) User clicks the 'Filter' button on the content menu.

3) The UpdatePanel displays as it should but, although I can see the filter properly applied to the grid in the background i.e. the items update properly, the UpdatePanel never closes.  It just sits there forever.  Note that other actions in the context menu (sorting for example) work properly and in those cases the UpdatePanel displays and then hides as expected.

 

I've got a minimal page that exhibits the behaviour (code below).  What am I doing wrong?  I really love the new excel filtering capability but I need to AJAX'ify it.  Help!

Regards,

Greg

 

Form:

<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="radgridajax.aspx.cs" Inherits="Pages.Results.radgridajax" %>
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
</head>
<body>
    <form id="form1" runat="server">
        <telerik:RadScriptManager ID="RadScriptManager1" runat="server"></telerik:RadScriptManager>
        <telerik:RadAjaxManager ID="ResultsRadAjaxManager" runat="server">
            <AjaxSettings>
                <telerik:AjaxSetting AjaxControlID="lstBrowseResults">
                    <UpdatedControls>
                        <telerik:AjaxUpdatedControl ControlID="lstBrowseResults" LoadingPanelID="LoadingPanel" UpdatePanelCssClass="" />
                    </UpdatedControls>
                </telerik:AjaxSetting>
            </AjaxSettings>
        </telerik:RadAjaxManager>

        <telerik:RadAjaxLoadingPanel ID="LoadingPanel" runat="server" Transparency="30" EnableEmbeddedSkins="False"  MinDisplayTime="500">
            <div class="loading">
                <asp:Image ID="imgLoading" runat="server" ImageUrl="loading.gif" AlternateText="loading"></asp:Image>
            </div>
        </telerik:RadAjaxLoadingPanel>  
         
    <div>
        <telerik:RadGrid ID="lstBrowseResults" runat="server" AutoGenerateColumns="False" AllowFilteringByColumn="true" EnableHeaderContextMenu="true" EnableHeaderContextFilterMenu="true" AllowSorting="true" GroupingEnabled="true"
            AllowPaging="true" PageSize="10" PagerStyle-Mode="NextPrevNumericAndAdvanced" PagerStyle-AlwaysVisible="true" FilterType="HeaderContext"
            OnNeedDataSource="lstBrowseResults_NeedDataSource" >
            <MasterTableView GridLines="None" DataKeyNames="ID">
                <Columns>
                    <telerik:GridBoundColumn DataField="Name" HeaderText="Name" UniqueName="lstBrowseResults_colName" DataType="System.String" HeaderStyle-Width="150" FilterCheckListEnableLoadOnDemand="true" CurrentFilterFunction="Contains"></telerik:GridBoundColumn>
                </Columns>
            </MasterTableView>
        </telerik:RadGrid>
    </div>
    </form>
</body>
</html>

 

Code behind:

 using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Telerik.Web.UI;

namespace Pages.Results
{
    public partial class radgridajax : System.Web.UI.Page
    {

        public class Item
        {
            public int ID { get; set; }
            public String Name { get; set; }
            public Item(int id, String name)
            {
                ID = id;
                Name = name;
            }
        }

        protected void Page_Load(object sender, EventArgs e)
        {

        }

        protected void lstBrowseResults_NeedDataSource(object sender, GridNeedDataSourceEventArgs e)
        {
            List<Item> items = new List<Item>();
            for (int i = 0; i < 100; i++)
                items.Add(new Item(i, i.ToString()));

            lstBrowseResults.DataSource = items;
        }
    }
}

Kostadin
Telerik team
 answered on 16 Dec 2015
0 answers
122 views

 I called on 1-888-365-2779, sent some emails to Sales@telerik.com and asked following questions online form

but since December 02, 2015 waiting for response. Please anybody from telerik answer following questions.

I need file explorer for my project with following requirements.

Looking for Files Uploader and Downloader software integrating with Visual Studio 2013 asp.net C#.
Browsing the folder for files upload.
Upload the all files with in selected folder and sub folders (All tree folders contents) to the database by selecting folder or multiple files selection.
Downloading files from database with same file path with multiple selection
• Client-side MD5 hash/checksum that could be used to determine if the client file is different from already uploaded files
• Resume of interrupted uploads
Properties of associated with uploaded files like
Size of file
Created date
Files path from client computer
Development environment
Developing Website by creating Web pages by Web Form using Visual C#, .NET Framework 4.5 with
Visual Studio 2013, IIS 7, Window 7 Professional, 64 bit Operating System and SQL Server 2012 R2

Thank you,

Bashir.

Bashir
Top achievements
Rank 1
 asked on 16 Dec 2015
7 answers
505 views

Hi,

I'm using a radcombobox to display a long list of projects for the user to pick from.  When I view it in the Visual Studio development environment... or when I run it from visual studio, everything looks great.  Unfortunately when it displays from the webserver - it loses the bottom border of the control.  It is a minor thing but is annoying to my users.

 My guess is that the CSS isn't correct on it but I have no idea where to start.  I'm just using standard skins.  I'll attach the two different views of the combobox.

 Here is how it is defined in my code:

<td style="border-right: black 1px solid; border-top: black 1px solid; border-left: black 1px solid; width: 670px; border-bottom: black 1px solid"
align="left" colspan="3">
<telerik:RadComboBox ID="RadComboPIF" runat="server" AllowCustomText="True" EmptyMessage="Find a PIF NUMBER" Filter="Contains" Height="400px" SortCaseSensitive="False" Width="600px"
AutoPostBack="true" OnSelectedIndexChanged="RadComboPIF_SelectedIndexChanged" CausesValidation="False" EnableScreenBoundaryDetection="False">
</telerik:RadComboBox>
</td>

 

 

 

Cory
Top achievements
Rank 1
 answered on 16 Dec 2015
3 answers
134 views
I read a lot of this topic, but now I have an error when add other filter on grid.
this is my scenario

steps:
1- filter by date --> filter is OK.
2- filter by date, filter by colum x--> filter does not work because lost custom date filter.

This is my code:
 public static void FilterDateTimes(RadGrid grid, GridCommandEventArgs e, string columnName, string actionFilter)
        {
            e.Canceled = true;
            var dateColumn = (GridBoundColumn)e.Item.OwnerTableView.GetColumnSafe(columnName);
            string newFilter;

            switch (actionFilter)
            {
                case "NoFilter":
                    string removeFilter;
                    if (HttpContext.Current.Session["equalTo"] != null)
                    {
                        removeFilter = HttpContext.Current.Session["equalTo"].ToString();

                        if (grid.MasterTableView.FilterExpression.Contains("AND" + removeFilter))
                            grid.MasterTableView.FilterExpression =
                                grid.MasterTableView.FilterExpression.Replace("AND" + removeFilter, "");

                        if (grid.MasterTableView.FilterExpression.Contains(removeFilter))
                            grid.MasterTableView.FilterExpression =
                                grid.MasterTableView.FilterExpression.Replace(removeFilter, "");
                    }

                    if (HttpContext.Current.Session["NoEqualTo"] != null)
                    {
                        removeFilter = HttpContext.Current.Session["NoEqualTo"].ToString();

                        if (grid.MasterTableView.FilterExpression.Contains("AND" + removeFilter))
                            grid.MasterTableView.FilterExpression =
                                grid.MasterTableView.FilterExpression.Replace("AND" + removeFilter, "");

                        if (grid.MasterTableView.FilterExpression.Contains(removeFilter))
                            grid.MasterTableView.FilterExpression =
                                grid.MasterTableView.FilterExpression.Replace(removeFilter, "");
                    }

                  

                    dateColumn.CurrentFilterFunction = GridKnownFunction.NoFilter;
                    dateColumn.CurrentFilterValue = null;

                    break;

                case "EqualTo":


                    var dt =
                        ((RadDateInput)
                         ((GridFilteringItem)e.Item)[Convert.ToString(columnName)].Controls[1])
                        ;

                    if (dt.Text == null) return ;
                    DateTime date = Convert.ToDateTime(dt.SelectedDate);
                    DateTime startDate = Convert.ToDateTime(date);
                    DateTime endDate = Convert.ToDateTime(date).AddDays(1);

                    newFilter = "('" + startDate.ToString("G") + "' < [Date] AND [Date] < '" +
                                       endDate.ToString("G") + "')";

                     if (HttpContext.Current.Session["equalTo"] != null)
                     {
                         removeFilter = HttpContext.Current.Session["equalTo"].ToString();

                         if (grid.MasterTableView.FilterExpression.Contains("AND" + removeFilter))
                             grid.MasterTableView.FilterExpression =
                                 grid.MasterTableView.FilterExpression.Replace("AND" + removeFilter, "");

                         if (grid.MasterTableView.FilterExpression.Contains(removeFilter))
                             grid.MasterTableView.FilterExpression =
                                 grid.MasterTableView.FilterExpression.Replace(removeFilter, "");
                     }

                    HttpContext.Current.Session["equalTo"] = newFilter;

                    if (grid.MasterTableView.FilterExpression == "")
                    {
                        grid.MasterTableView.FilterExpression = newFilter;
                    }
                    else
                    {
                        if (HttpContext.Current.Session["NoEqualTo"] != null)
                        {
                            removeFilter = HttpContext.Current.Session["NoEqualTo"].ToString();

                            if (grid.MasterTableView.FilterExpression.Contains("AND" + removeFilter))
                                grid.MasterTableView.FilterExpression =
                                    grid.MasterTableView.FilterExpression.Replace("AND" +  removeFilter, "");
                           
                            if (grid.MasterTableView.FilterExpression.Contains(removeFilter))
                                grid.MasterTableView.FilterExpression =
                                    grid.MasterTableView.FilterExpression.Replace(removeFilter, "");
                            
                        }

                        if (grid.MasterTableView.FilterExpression == "")
                        {
                            grid.MasterTableView.FilterExpression = newFilter;
                        }
                        else
                        {
                            grid.MasterTableView.FilterExpression += "AND" + newFilter;
                        }

                    }

                    dateColumn.CurrentFilterValue = Convert.ToDateTime(date).ToString("dd/MM/yyyy");
                    dateColumn.CurrentFilterFunction = GridKnownFunction.EqualTo;

                    break;


                case "NotEqualTo":


                    dt =
                        (RadDateInput)
                        ((GridFilteringItem)e.Item)[Convert.ToString(columnName)].Controls[1];

                    if (dt.Text == null) return ;
                    date = Convert.ToDateTime(dt.SelectedDate);

                    startDate = Convert.ToDateTime(date);
                    endDate = Convert.ToDateTime(date).AddHours(24);
                    DateTime beforeDate = Convert.ToDateTime(date).AddMinutes(-1);

                    newFilter = "([Date] <'" + startDate.ToString("G") + "') OR ([Date] >'" + endDate.ToString("G") + "')";

                    if (HttpContext.Current.Session["NoEqualTo"] != null)
                    {
                        removeFilter = HttpContext.Current.Session["NoEqualTo"].ToString();

                        if (grid.MasterTableView.FilterExpression.Contains("AND" + removeFilter))
                            grid.MasterTableView.FilterExpression =
                                grid.MasterTableView.FilterExpression.Replace("AND" + removeFilter, "");
                        if (grid.MasterTableView.FilterExpression.Contains(removeFilter))
                            grid.MasterTableView.FilterExpression =
                                grid.MasterTableView.FilterExpression.Replace(removeFilter, "");

                    }

                    HttpContext.Current.Session["NoEqualTo"] = newFilter;

                    if (grid.MasterTableView.FilterExpression == "")
                    {
                        grid.MasterTableView.FilterExpression = newFilter;
                    }
                    else
                    {
                        if (HttpContext.Current.Session["equalTo"] != null)
                        {
                            removeFilter = HttpContext.Current.Session["equalTo"].ToString();

                            if (grid.MasterTableView.FilterExpression.Contains("AND" + removeFilter))
                                grid.MasterTableView.FilterExpression =
                                    grid.MasterTableView.FilterExpression.Replace("AND" +  removeFilter, "");
                            if (grid.MasterTableView.FilterExpression.Contains(removeFilter))
                                grid.MasterTableView.FilterExpression =
                                    grid.MasterTableView.FilterExpression.Replace(removeFilter, "");
                            
                        }
                        if (grid.MasterTableView.FilterExpression == "")
                        {
                            grid.MasterTableView.FilterExpression = newFilter;
                        }else
                        {
                            grid.MasterTableView.FilterExpression += "AND" + newFilter;
                        }

                        
                       
                    }
                    dateColumn.CurrentFilterFunction = GridKnownFunction.NotEqualTo;

                    dateColumn.CurrentFilterValue = Convert.ToDateTime(date).ToString("G");
                    break;
            }
            
        }


  if (e.CommandName == RadGrid.FilterCommandName)
            {
                var filterPair = e.CommandArgument as Pair;
                string filter = null;

                if (gridSearchHistory.MasterTableView.FilterExpression.StartsWith("AND"))
                   gridSearchHistory.MasterTableView.FilterExpression = gridSearchHistory.MasterTableView.FilterExpression.Remove(0, 3);

                if (Convert.ToString(filterPair.Second).Contains("Date"))
                {
                    WebSearch.Components.CommonFunctions.GridFunction.FilterDateTimes(gridSearchHistory, e,
                                                                                      Convert.ToString(filterPair.Second),
                                                                                      Convert.ToString(filterPair.First));
                                     
                  }

                LoadDataSource();
            }
        }

Screen:



I have a lot of records with 03/05/2012 as date

Steps 1:
filter as 03/05/2012 --> OK



Step 2:
Add Result equal to 4.



Does not work correctly.

in code behind Filter said:
[Date] = '03/05/2012 12:00:00 a.m. --> LOST the custom filter

My aspx
<telerik:RadGrid ID="gridSearchHistory" runat="server" AutoGenerateColumns="false"  EnableViewState="true"
      OnItemCommand="gridSearchHistory_ItemCommand" OnPageIndexChanged="gridSearchHistory_PageIndexChanged"
    OnPreRender="gridSearchHistory_PreRender"  OnSortCommand="gridSearchHistory_SortCommand" OnPageSizeChanged="gridSearchHistory_PageSizeChanged" >
         <MasterTableView DataKeyNames="Id" CommandItemDisplay="None"
                        TableLayout="Fixed"  Width="100%">
                        <Columns>
                           <telerik:GridBoundColumn UniqueName="Id" DataField="Id" Visible="false" />
                           <telerik:GridDateTimeColumn UniqueName="Date" DataField="Date" PickerType="None"
                                AutoPostBackOnFilter="true" DataType="System.DateTime" />
                       <telerik:GridBoundColumn UniqueName="Query" DataField="Query"  Visible="false" AllowFiltering="false" />
                        <telerik:GridTemplateColumn UniqueName="QueryLink" SortExpression="Query"   AutoPostBackOnFilter="true">
                            <ItemTemplate>
                                <asp:LinkButton ID="lnkQuery" runat="server" Text='<%# Eval("Query") %>' OnClick="lnkQuery_Click" />
                            </ItemTemplate>
                         </telerik:GridTemplateColumn>
                           <telerik:GridBoundColumn UniqueName="ResultCount" DataField="ResultCount"   SortExpression="ResultCount"  />
                                                   
                    
                    </Columns>

        </MasterTableView>
    </telerik:RadGrid>

Please I need help
Konstantin Dikov
Telerik team
 answered on 16 Dec 2015
1 answer
72 views
I am using the progress area to monitor a file generation.  Not using the RadUpload with it.  It appears on production, but doesn't move forward at all.  Same in Chrome, IE, FF.  This is on IIS, but the application is running at full trust and the page is NOT called Default.aspx.  What could be the issue?  I have a fiddlercap, but it doesn't let me post that file type here.  What can I do?  Thanks!
Peter Filipov
Telerik team
 answered on 16 Dec 2015
1 answer
115 views
8, IE 9 compatibility issue we are planning to upgrade into newer version (Telerik v2015.2.826.45).

We had a testing with trial version of Telerik v2015.2.826.45, we have faced the UI distortion issue in the RADDatePicker and RADTimePicker control. Below is the sample screen shot.

File Name in the attachment: ScreenShot1.png

We are using the custom css based on our site design, some cssclass is misplaced with the Telerik control along with our custom css classes. Below is the screen shot with one example compared with the older version and the newer version.

File Name in the attachement: ScreenShot2.png

For more information please contact me on my mobile number provided below.

Thanks & Regards,
Ramanathan
7829883355
Konstantin Dikov
Telerik team
 answered on 16 Dec 2015
1 answer
78 views
i need to change the month format to be 1,2,10,11  like MM instead of may ,.... in year view 
Bozhidar
Telerik team
 answered on 16 Dec 2015
1 answer
183 views

Hi,

We want to enable batch editing in three level hierarchical grid for only the last level child grid. First and second level grid will be readonly. Do Rad Grid support this functionality? if yes is there any sample code which implement this or implements the batch editing in hierarchical grid?

We tried setting Edit mode as batch for all grid but not able to get the client side changed values of last level grid at server side in Batch Edit Command event handler.

Awaiting your quick response, thanks for you help.

--Himanshu

Eyup
Telerik team
 answered on 16 Dec 2015
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?