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

Hi,

 

I have a RadCombobox with Checkboxes and EnableLoadOnDemand features (Telerik Version 2015).

I am trying to use Filter for this RadCombobox but as soon as it filters the combobox values based on the search text, previous selection of the Combobox is not retained.

 

Please let us know if we can use Filter option of RadCombobox with checkboxes.

Veselin Tsvetanov
Telerik team
 answered on 17 Dec 2015
1 answer
125 views

I would love to implement the Excel-like Filtering, however I have a few filter templates which disappear when the filterType is set to HeaderContext.

Is there a way to implement both?

Kostadin
Telerik team
 answered on 17 Dec 2015
1 answer
178 views

I am attaching the Image  of Grid, I can't get the Value of MenuName when i clicked to the Full Access, Readonly any check Box in the Grid.

I go thru so many forums but i still can't get the Value .

This this is done by using Javascript.

plz suggest me.

Eyup
Telerik team
 answered on 17 Dec 2015
2 answers
599 views
I'm using a RadGrid, populated by an XMLDataSource, I'm using a CheckboxColumn, and was wondering why can't I select the checkbox with out clicking on the edit button?  I would rather NOT force my users to click edit.
Hector
Top achievements
Rank 1
 answered on 17 Dec 2015
2 answers
514 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
163 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
146 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
157 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
594 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
186 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
Narrow your results
Selected tags
Tags
+? more
Top users last month
Miljana
Top achievements
Rank 2
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Bronze
Cynthia
Top achievements
Rank 1
John
Top achievements
Rank 1
Iron
Mozart
Top achievements
Rank 1
Iron
Veteran
Want to show your ninja superpower to fellow developers?
Top users last month
Miljana
Top achievements
Rank 2
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Bronze
Cynthia
Top achievements
Rank 1
John
Top achievements
Rank 1
Iron
Mozart
Top achievements
Rank 1
Iron
Veteran
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?