Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
110 views
After upgrading Telerik UI for ASP.NET Ajax from v2014.1.225.45 to v2014.3.1024.45, RadEditor has some problems on paste html from dialogs (both standard and custom) e.g. ImageManager, HyperLinkManager. Images and links are pasted at the top of document instead of cursor position. I'm using RadEditor on ToolbarMode="RibbonBar" and until now it has worked properly. It works on chrome and firefox but not in IE10. You can reproduce the same issue here: http://demos.telerik.com/aspnet-ajax/editor/examples/overview/defaultcs.aspx. Is possible to do something to solve?

I'm using:

 - Telerik.Web.UI 2014.3.1024.45
 - Telerik.Web.UI.Skins 2013.3.1024.45
 - Internet Explorer 10
 - RibbonBar ToolbarMode
 - Skin Metro

This is my editor:
            <telerik:RadEditor runat="server" ID="Editor" ExternalDialogsPath="~/RadEditor/EditorDialogs" 
                ToolbarMode="RibbonBar" ToolsFile="~/RadEditor/editorToolsFile.xml" ContentFilters="IndentHTMLContent"
                Width="100%" Height="680" EnableResize="false" BorderWidth="0" ImageManager-MaxUploadFileSize="1024000"
                NewLineMode="Br"> 
            </telerik:RadEditor>


Ianko
Telerik team
 answered on 08 Dec 2014
6 answers
152 views
Can I get information from the page layout system that will tell me which span (i.e. SpanXl, SpanLg, SpanMd, SpanSm, or SpanXs) is in effect at any given browser size or device size?
I want to be able to say:
If SpanInEffect = "SpanMd" Then
   -Do this
ElseIf SpanInEffect = "SpanXs" Then
Do something different
End If

I am really hoping this is available, because I want to dynamically change which .css class I am applying to the Column based on the "Span in Effect" at a given time. Currently the columns are reacting responsively, but I want to be able, for example, when viewing in SpanXs mode, to make the font smaller, by applying a different class.

thanks,
got my fingers crossed!
Ivan Zhekov
Telerik team
 answered on 08 Dec 2014
1 answer
101 views
Hi,

I get the datasource data as date time and I want to display the x-axis data for past 8 hours. But the data is there only for 1hour. How can I set the MinValue and MaxValue so that I see all the 8 hours in x-axis but see data only in the particular hours and gaps for other data.
Danail Vasilev
Telerik team
 answered on 08 Dec 2014
1 answer
228 views
Hi

I'm using the RadCalendar control along with the OnDayRender method for a scheduler. The OnDayRender method calls a Customize Day method like on the example page which then fills in days with existing transactions using a different background colour.  The problem is a user can click a day to quick add a transaction and then after that transaction is made it will not show as blue until the user navigates forward a month then back. This is causing a lot of user confusion as they think nothing has happened.

So what I want to be able to do is call a .Rebind() or .Refresh() after the transaction has been inserted to redraw the calendar.  Yet this function does not seem to exist.

Any ideas?
Maria Ilieva
Telerik team
 answered on 08 Dec 2014
1 answer
107 views
Hello

I'm not able to apply in-built filters or in fact any filters on my grid. I followed these two demos in mix:
http://demos.telerik.com/aspnet-ajax/grid/examples/data-editing/edit-form-types/defaultcs.aspx#qsf-demo-source
http://demos.telerik.com/aspnet-ajax/grid/examples/data-editing/form-template-update/defaultcs.aspx

Please help.

ASPX code  :- 
<!------------------------------------------------------------------------------------------------------------------->
<%@ Page Language="C#" MasterPageFile="~/Main.master" AutoEventWireup="true" Inherits="UserPermissionManager.Applications" CodeBehind="Applications.aspx.cs" %>

<%@ Register TagPrefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="ajaxToolkit" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="Server">
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="CTP" runat="Server">
    <asp:UpdatePanel ID="UpdatePanel2" runat="server">
        <ContentTemplate>
            <table align="center" cellspacing="10px" border="0">
                <tr align="center">
                    <td>
                        <input runat="server" type="hidden" id="hdUserName" name="hdUserName" />
                    </td>
                </tr>
                <tr>
                    <td align="left">
                        <div id="divlist" runat="server" visible="true" style="border: 1px solid #666666; background-color: #ffffff; font-size: 11px; overflow: scroll; height: 579px; width: 1860px;">
                            <asp:CheckBox ID="chkshowinactive" runat="server" Visible="true"
                                Text="Show Inactive" CausesValidation="false"
                                Checked="false" OnCheckedChanged="rad_needpermssion_SelectedIndexChanged"
                                AutoPostBack="True" CssClass="Checkbox" />
                            <br />
                            <%--<telerik:RadScriptManager runat="server" ID="RadScriptManager1" />--%>
                            <%--<telerik:RadSkinManager ID="QsfSkinManager" runat="server" ShowChooser="true" />--%>
                            <%--<telerik:RadFormDecorator ID="QsfFromDecorator" runat="server" DecoratedControls="All" EnableRoundedCorners="false" />--%>
                            <telerik:RadCodeBlock ID="RadCodeBlock2" runat="server">
                                <script type="text/javascript">
                                    function RowDblClick(sender, eventArgs) {
                                        sender.get_masterTableView().editItem(eventArgs.get_itemIndexHierarchical());
                                    }

                                    function onPopUpShowing(sender, args) {
                                        args.get_popUp().className += " popUpEditForm";
                                    }
                                </script>
                            </telerik:RadCodeBlock>
                            <telerik:RadAjaxManagerProxy ID="RadAjaxManager1" runat="server">
                                <AjaxSettings>
                                    <telerik:AjaxSetting>
                                        <UpdatedControls>
                                            <telerik:AjaxUpdatedControl ControlID="RadGrid1" LoadingPanelID="RadAjaxLoadingPanel1"></telerik:AjaxUpdatedControl>
                                        </UpdatedControls>
                                    </telerik:AjaxSetting>
                                </AjaxSettings>
                            </telerik:RadAjaxManagerProxy>
                            <telerik:RadGrid ID="RadGrid1" runat="server" AllowPaging="True" ShowFooter="True"
                                AllowSorting="True" AutoGenerateColumns="False" ShowStatusBar="True"
                                OnPreRender="RadGrid1_PreRender" OnNeedDataSource="RadGrid1_NeedDataSource" OnUpdateCommand="RadGrid1_UpdateCommand"
                                OnInsertCommand="RadGrid1_InsertCommand" OnItemDataBound="RadGrid1_ItemDataBound"
                                AllowFilteringByColumn="true" CellSpacing="-1" GridLines="Both">
                                <PagerStyle Mode="NextPrevAndNumeric" Position="TopAndBottom" />
                                <HeaderStyle Font-Bold="true" />
                                <MasterTableView CommandItemDisplay="Top" DataKeyNames="AppID" PageSize="15">
                                    <EditFormSettings>
                                        <PopUpSettings Modal="true" />
                                    </EditFormSettings>
                                    <Columns>
                                        <telerik:GridEditCommandColumn UniqueName="EditCommandColumn" />
                                        <telerik:GridBoundColumn Visible="true" SortExpression="AppName" DataField="AppName"
                                            HeaderText="Application Name" ItemStyle-VerticalAlign="Top" />
                                        <telerik:GridHyperLinkColumn DataTextField="NoOfPermTypes" SortExpression="NoOfPermTypes" HeaderText="# of Permission Types" DataNavigateUrlFields="AppID"
                                            DataNavigateUrlFormatString="ApplicationPermission.aspx?AppID={0}" HeaderStyle-Font-Bold="true" HeaderStyle-HorizontalAlign="Left" />
                                        <telerik:GridBoundColumn Visible="true" SortExpression="Active" DataField="Active"
                                            HeaderText="Active" ItemStyle-VerticalAlign="Top" AllowFiltering="false" />
                                        <telerik:GridBoundColumn Visible="true" SortExpression="WebBased" DataField="WebBased"
                                            HeaderText="Web Based" ItemStyle-VerticalAlign="Top" AllowFiltering="false" />
                                        <telerik:GridBoundColumn Visible="true" SortExpression="ModifiedOn" DataField="ModifiedOn"
                                            HeaderText="Modified On" ItemStyle-VerticalAlign="Top" DataFormatString="{0:d-MMM-yyyy hh:mm tt}" />
                                        <telerik:GridBoundColumn Visible="true" SortExpression="ModifiedBy" DataField="ModifiedBy"
                                            HeaderText="Modified By" ItemStyle-VerticalAlign="Top" />
                                    </Columns>
                                    <EditFormSettings EditFormType="Template" CaptionFormatString="Add/Edit Application">
                                        <FormTemplate>
                                            <table id="Table2" cellspacing="2" cellpadding="1" width="100%" border="0" rules="none"
                                                style="border-collapse: collapse;">
                                                <tr>
                                                    <td>
                                                        <table id="Table3" cellspacing="1" cellpadding="1" border="0" class="module">
                                                            <tr>
                                                                <td>Application Name:</td>
                                                                <td>
                                                                    <asp:TextBox ID="txtAppName" runat="server" Text='<%# Bind("AppName") %>' />
                                                                </td>
                                                            </tr>
                                                            <tr>
                                                                <td>Web Based:
                                                                </td>
                                                                <td>
                                                                    <asp:CheckBox ID="chkWebBased" runat="server" Enabled='<%# (Container is GridEditFormInsertItem) ? false : true %>'
                                                                        Checked='<%# (DataBinder.Eval(Container.DataItem,"WebBased")==DBNull.Value ? true:Eval("WebBased"))%>' />
                                                                </td>
                                                            </tr>
                                                            <tr>
                                                                <td>Active:
                                                                </td>
                                                                <td>
                                                                    <asp:CheckBox ID="chkActive" runat="server" Enabled='<%# (Container is GridEditFormInsertItem) ? false : true %>'
                                                                        Checked='<%# (DataBinder.Eval(Container.DataItem,"Active")==DBNull.Value ? true:Eval("Active"))%>' />
                                                                </td>
                                                            </tr>
                                                        </table>
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td align="left">
                                                        <asp:Label ID="lblError1" ForeColor="Red" runat="server"></asp:Label>
                                                    </td>
                                                    <td align="right">
                                                        <asp:Button ID="btnUpdate" Text='<%# (Container is GridEditFormInsertItem) ? "Insert" : "Update" %>'
                                                            runat="server" CommandName='<%# (Container is GridEditFormInsertItem) ? "PerformInsert" : "Update" %>'></asp:Button>
                                                        &nbsp;
                                                        <asp:Button ID="btnCancel" Text="Cancel" runat="server" CausesValidation="False"
                                                            CommandName="Cancel"></asp:Button>
                                                    </td>
                                                </tr>
                                            </table>
                                        </FormTemplate>
                                    </EditFormSettings>
                                </MasterTableView>
                                <ClientSettings>
                                    <ClientEvents OnRowDblClick="RowDblClick" OnPopUpShowing="onPopUpShowing" />
                                </ClientSettings>
                            </telerik:RadGrid>
                        </div>
                    </td>
                </tr>
                <tr>
                    <td align="left">
                        <font color="#666666">* Red color represents the applications that does not need permissions.</font><br />
                        <font color="#666666">* Green color represents the applications that needs permissions.</font>
                    </td>
                </tr>
            </table>
        </ContentTemplate>
    </asp:UpdatePanel>
</asp:Content>
<!------------------------------------------------------------------------------------------------------------------->

CodeBehind :- 

/***************************************************************************************************/
using System;
using System.Collections;
using System.Data;
using System.Drawing;
using System.Web.UI;
using System.Linq;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using Telerik.Web.UI;
using UPMLibrary;

namespace UserPermissionManager
{
    public partial class Applications : Page
    {
        AppPermission objApp = new AppPermission();
        Users objusers = new Users();
        string strFilters = "";

        public DataTable BindApplications()
        {
            //the table index (.Tables[1]) in the below statement is done 
            //for TEMPORARY SUPPORT of old UPM and must changed back to (.Tables[0]) 
            //after this new UPM is rolled OUT
            /********************************************************************************************************************************************/
            DataView aView = objApp.ListApplications().Tables[1].DefaultView;
            /********************************************************************************************************************************************/

            aView.RowFilter = "Active=" + ((chkshowinactive.Checked) ? false : true).ToString();
            return aView.ToTable();
        }

        protected void Page_Load(object sender, EventArgs e)
        {
            ((HtmlGenericControl)this.Master.FindControl("liApps")).Attributes.Add("class", "SelectedMainMenu");

            if (!IsPostBack)
            {
                if (Session["PERMISSIONLOGONUSER"] != null)
                    objApp.CurrentUser = Session["PERMISSIONLOGONUSER"].ToString();
                else
                    Page.ClientScript.RegisterStartupScript(this.GetType(), "CallMyFunction", "document.getElementById('CTP_hdUserName').value = document.getElementById('lblSupplier').innerText;", true);
            }
        }

        protected override void OnInit(EventArgs e)
        {
            base.OnInit(e);
            //RadGrid1.DataSource = ApplicationsTable;
            //RadGrid1.DataBind();
            //ApplicationsTable.PrimaryKey = new DataColumn[] { ApplicationsTable.Columns["AppID"] };
                
            RadGrid1.MasterTableView.EditMode = (GridEditMode)Enum.Parse(typeof(GridEditMode), "PopUp");
            //GridFilterMenu menu = RadGrid1.FilterMenu;
            //int i = 0;
            //while (i < menu.Items.Count)
            //{
            //    if (menu.Items[i].Text == "NoFilter" ||
            //        menu.Items[i].Text == "Contains" ||
            //        menu.Items[i].Text == "DoesNotContain" ||
            //        menu.Items[i].Text == "StartsWith" ||
            //        menu.Items[i].Text == "EndsWith" ||
            //        menu.Items[i].Text == "EqualTo" ||
            //        menu.Items[i].Text == "NotEqualTo"
            //        )
            //        i++;
            //    else
            //        menu.Items.RemoveAt(i);
            //}
        }

        protected void rad_needpermssion_SelectedIndexChanged(object sender, EventArgs e)
        {
            Session["Applications"] = null;
            RadGrid1.MasterTableView.Rebind();
        }

        protected void RadGrid1_PreRender(object sender, System.EventArgs e)
        {
            if (!IsPostBack && RadGrid1.MasterTableView.Items.Count > 1)
            {
                //RadGrid1.MasterTableView.Items[1].Edit = true;
                //RadGrid1.EditIndexes.Add(0);
                //RadGrid1.MasterTableView.Rebind();
                //RadGrid1.Rebind();
            }
        }

        private DataTable ApplicationsTable
        {
            get
            {
                object obj = Session["Applications"];
                DataTable myDataTable = new DataTable();
                if (obj != null)
                {
                    myDataTable = (DataTable)obj;

                    //bool bActive = true;
                    //bActive = (chkshowinactive.Checked) ? false : true;
                    //myDataTable.DefaultView.RowFilter = "Active='" + bActive.ToString() + "'";
                    //myDataTable = myDataTable.DefaultView.ToTable();
                    //return myDataTable;
                }
                else
                    myDataTable = BindApplications();

                DataView aView = myDataTable.DefaultView;
                aView.RowFilter = strFilters;

                //myDataTable = aView.ToTable();

                //DataTable datasource;
                //if (strFilters != "")
                //{
                DataRow[] drArr = myDataTable.Select(strFilters);
                DataTable dtFiltered = myDataTable.Clone();

                foreach (DataRow dr in drArr)
                    dtFiltered.ImportRow(dr);

                //    datasource = ApplicationsTable;
                //    DataView aView = datasource.DefaultView;
                //    aView.RowFilter = strFilters;

                //    datasource = aView.ToTable();
                //}
                //else
                //    datasource = ApplicationsTable;
                //DataView aView = ApplicationsTable.DefaultView;
                //aView.RowFilter = strFilters;
                //DataTable dtFiltered = aView.ToTable();

                Session["Applications"] = myDataTable;
                return myDataTable;
            }
        }

        protected void RadGrid1_NeedDataSource(object source, GridNeedDataSourceEventArgs e)
        {
            RadGrid1.DataSource = ApplicationsTable;
            ApplicationsTable.PrimaryKey = new DataColumn[] { ApplicationsTable.Columns["AppID"] };
        }

        protected void RadGrid1_ItemDataBound(object sender, GridItemEventArgs e)
        {
            if (e.Item is GridDataItem)
            {
                //Get the instance of the right type
                GridDataItem dataBoundItem = e.Item as GridDataItem;

                //Check the formatting condition
                if (dataBoundItem["Active"].Text.ToLower() == "true")
                {
                    dataBoundItem["Active"].Text = "YES";
                    dataBoundItem["Active"].ForeColor = Color.Green;
                    dataBoundItem["Active"].Font.Bold = true;
                    dataBoundItem["AppName"].ForeColor = Color.Green;
                    dataBoundItem["AppName"].Font.Bold = true;
                }
                else
                {
                    dataBoundItem["Active"].Text = "NO";
                    dataBoundItem["Active"].ForeColor = Color.Red;
                    dataBoundItem["AppName"].ForeColor = Color.Red;
                }
                if (dataBoundItem["WebBased"].Text.ToLower() == "true")
                {
                    dataBoundItem["WebBased"].Text = "YES";
                    dataBoundItem["WebBased"].ForeColor = Color.Green;
                    dataBoundItem["WebBased"].Font.Bold = true;
                }
                else
                {
                    dataBoundItem["WebBased"].Text = "NO";
                    dataBoundItem["WebBased"].ForeColor = Color.Red;
                }
            }
            if ((e.Item is GridEditableItem) && (e.Item.IsInEditMode))
            {
                GridEditableItem editform = (GridEditableItem)e.Item;
                TextBox txtAppName = (TextBox)editform.FindControl("txtAppName");
                Button btnUpdate = (Button)editform.FindControl("btnUpdate");
                Label lblError1 = (Label)editform.FindControl("lblError1");
                //btnUpdate.Attributes.Add("onclick", "return clientValidation(" + txtAppName.ClientID + "," + lblError1.ClientID + ");");
                btnUpdate.Attributes.Add("onclick", "if(document.getElementById('" + txtAppName.ClientID + "').value == '') { document.getElementById('" +
                    lblError1.ClientID + "').innerText = 'Application name cannot be empty.'; document.getElementById('" + txtAppName.ClientID + "').focus(); return false; }");
                txtAppName.Attributes.Add("onkeydown", "document.getElementById('" + lblError1.ClientID + "').innerText = '';");
            }
        }

        protected void RadGrid1_UpdateCommand(object source, GridCommandEventArgs e)
        {
            GridEditableItem editedItem = e.Item as GridEditableItem;
            TextBox txtAppName = (TextBox)editedItem.FindControl("txtAppName");
            CheckBox chkWebBased = (CheckBox)editedItem.FindControl("chkWebBased");
            CheckBox chkActive = (CheckBox)editedItem.FindControl("chkActive");
            Label lblError1 = (Label)editedItem.FindControl("lblError1");
            
            //Prepare new row to add it in the DataSource
            string sAppID = editedItem.OwnerTableView.DataKeyValues[editedItem.ItemIndex]["AppID"].ToString();
            DataRow[] changedRows = ApplicationsTable.Select("AppID = " + sAppID);

            Label lblError = new Label();
            RadGrid1.Controls.Add(lblError);

            if (changedRows.Length != 1)
            {
                lblError1.Text = "Unable to locate the Application for updating.";
                e.Canceled = true;
                return;
            }
            if (txtAppName.Text == "")
            {
                lblError1.Text = "Application name cannot be empty.";
                txtAppName.Focus();
                e.Canceled = true;
                return;
            }

            //Update new values
            Hashtable newValues = new Hashtable();
            newValues["AppName"] = txtAppName.Text;
            newValues["WebBased"] = chkWebBased.Checked;
            newValues["Active"] = chkActive.Checked;
            newValues["ModifiedOn"] = DateTime.Now;
            newValues["ModifiedBy"] = "";

            changedRows[0].BeginEdit();
            try
            {
                foreach (DictionaryEntry entry in newValues)
                    changedRows[0][(string)entry.Key] = entry.Value;

                changedRows[0].EndEdit();
                ApplicationsTable.AcceptChanges();

                objApp.APPID = Convert.ToInt32(sAppID);
                objApp.AppName = txtAppName.Text;
                objApp.WebBased = (chkWebBased.Checked) ? 1 : 0;
                objApp.AppStatus = (chkActive.Checked) ? 1 : 0;
                objApp.CurrentUser = "";

                int ischanged = objApp.ChangeAppStatus();

                lblError.Text = "Application is updated successfully!";
                lblError.ForeColor = Color.Green;
            }
            catch (Exception ex)
            {
                changedRows[0].CancelEdit();
                lblError1.Text = "Unable to update Application. Reason: " + ex.Message;
                e.Canceled = true;
            }
        }

        protected void RadGrid1_InsertCommand(object source, GridCommandEventArgs e)
        {
            GridEditableItem editedItem = e.Item as GridEditableItem;
            TextBox txtAppName = (TextBox)editedItem.FindControl("txtAppName");
            CheckBox chkWebBased = (CheckBox)editedItem.FindControl("chkWebBased");
            CheckBox chkActive = (CheckBox)editedItem.FindControl("chkActive");
            Label lblError1 = (Label)editedItem.FindControl("lblError1");

            //Create new row in the DataSource
            DataRow newRow = ApplicationsTable.NewRow();

            Label lblError = new Label();
            RadGrid1.Controls.Add(lblError);
            
            if (txtAppName.Text == "")
            {
                lblError1.Text = "Application name cannot be empty.";
                txtAppName.Focus();
                e.Canceled = true;
                return;
            }
            
            //Insert new values
            Hashtable newValues = new Hashtable();
            newValues["AppName"] = txtAppName.Text;
            newValues["WebBased"] = chkWebBased.Checked;
            newValues["Active"] = chkActive.Checked;
            newValues["ModifiedOn"] = DateTime.Now;
            newValues["ModifiedBy"] = "";

            //make sure that unique primary key value is generated for the inserted row
            try
            {
                objApp.APPID = 0;
                objApp.AppName = txtAppName.Text;
                objApp.WebBased = (chkWebBased.Checked) ? 1 : 0;
                objApp.AppStatus = (chkActive.Checked) ? 1 : 0;
                objApp.CurrentUser = "";

                newValues["AppID"] = objApp.ChangeAppStatus();

                foreach (DictionaryEntry entry in newValues)
                    newRow[(string)entry.Key] = entry.Value;
                ApplicationsTable.Rows.Add(newRow);
                ApplicationsTable.AcceptChanges();

                lblError.Text = "<font color=Green>Application is inserted successfully!</font>";
                lblError.ForeColor = Color.Green;
            }
            catch (Exception ex)
            {
                lblError1.Text = "Unable to insert Application. Reason: " + ex.Message;
                e.Canceled = true;
            }
        }

        protected void RadGrid1_ItemCommand(object sender, GridCommandEventArgs e)
        {
            //if (e.CommandName == RadGrid.FilterCommandName)
            //{
            //    Pair filterPair = (Pair)e.CommandArgument;
            //    string s1 = "Current Filter function: '" + filterPair.First + "' for column '" + filterPair.Second + "'";
            //    TextBox filterBox = (e.Item as GridFilteringItem)[filterPair.Second.ToString()].Controls[0] as TextBox;
            //    string s2 = "<br> Entered pattern for search: " + filterBox.Text;


            //    if (strFilters != "")
            //    {
            //        switch (filterPair.First.ToString())
            //        {
            //            case "Contains":
            //                strFilters = strFilters + " and " + filterPair.Second + " like '%" + filterBox.Text + "%'";
            //                break;
            //            case "DoesNotContain":
            //                strFilters = strFilters + " and " + filterPair.Second + " not like '%" + filterBox.Text + "%'";
            //                break;
            //            case "StartsWith":
            //                strFilters = strFilters + " and " + filterPair.Second + " like '%>" + filterBox.Text + "%'";
            //                break;
            //            case "EndsWith":
            //                strFilters = strFilters + " and " + filterPair.Second + " like '%" + filterBox.Text + "</%'";
            //                break;
            //            case "EqualTo":
            //                strFilters = strFilters + " and " + filterPair.Second + " like '%>" + filterBox.Text + "</%'";
            //                break;
            //            case "NotEqualTo":
            //                strFilters = strFilters + " and " + filterPair.Second + " not like '%>" + filterBox.Text + "</%'";
            //                break;
            //        }
            //        //strFilters = strFilters + " and " + filterExpressions[i].FieldName + " like '%" + filterExpressions[i].FieldValue + "%'";
            //    }
            //    else
            //    {
            //        switch (filterPair.First.ToString())
            //        {
            //            case "Contains":
            //                strFilters = filterPair.Second + " like '%" + filterBox.Text + "%'";
            //                break;
            //            case "DoesNotContain":
            //                strFilters = filterPair.Second + " not like '%" + filterBox.Text + "%'";
            //                break;
            //            case "StartsWith":
            //                strFilters = filterPair.Second + " like '%>" + filterBox.Text + "%'";
            //                break;
            //            case "EndsWith":
            //                strFilters = filterPair.Second + " like '%" + filterBox.Text + "</%'";
            //                break;
            //            case "EqualTo":
            //                strFilters = filterPair.Second + " like '%>" + filterBox.Text + "</%'";
            //                break;
            //            case "NotEqualTo":
            //                strFilters = filterPair.Second + " not like '%>" + filterBox.Text + "</%'";
            //                break;
            //        }
            //        //strFilters = filterExpressions[i].FieldName + " like '%" + filterExpressions[i].FieldValue + "%'";
            //    }
            //    //RadGrid1.MasterTableView.FilterExpression = strFilters;
            //    //RadGrid1.MasterTableView.Rebind();
            //    //ApplicationsTable.DefaultView.RowFilter = strFilters;
            //    //RadGrid1.DataSource = ApplicationsTable.DefaultView.ToTable();
            //    Session["Applications"] = null;
            //    RadGrid1.MasterTableView.Rebind();
            //}
        }
    }
}

/*************************************************************************************************/

Please guide...
Konstantin Dikov
Telerik team
 answered on 08 Dec 2014
1 answer
124 views
I've found an issue with RadGrid horizontal scrolling in Firefox & Safari (IE & Chrome work without issue). If the user filters a column & no results come back, the horizontal scroll bar appears but doesn't work. This is a problem when a user filters on a column that isn't displayed by default & can only be viewed using the horizontal scroll bar.

Here's some details about the RadGrid:

1.) The columns are autogenerated
2.) The first columns are frozen
3.) The client settings "scrolling-AllowScroll" and "scrolling-UseStaticHeaders" are enabled

Any help on this issue would be greatly appreciated.

Venelin
Telerik team
 answered on 08 Dec 2014
5 answers
111 views
I am using rad tabs with with content URL with following settings
.aspx code
<asp:Content ID="Content1" ContentPlaceHolderID="MainContentPlaceHolder" runat="Server">
    <telerik:RadAjaxPanel ID="rjxPanel" runat="server" LoadingPanelID="RadAjaxLoadingPanel1">
 </telerik:RadAjaxPanel>
</asp:Content>

aspx.cs code

 protected void Page_Load(object sender, EventArgs e)
    {   RadAjaxManager rjxManager = RadAjaxManager.GetCurrent(this);
        //Create a new delegate to handle the AjaxRequest event   
        rjxManager.AjaxRequest += new RadAjaxControl.AjaxRequestDelegate(RadAjaxManager_AjaxRequest);
        rjxManager.AjaxSettings.AddAjaxSetting(rjxManager, pnl_OpportunityGroups);
   }

 protected void RadAjaxManager_AjaxRequest(object sender, AjaxRequestEventArgs e)
    {
        try
        {
            if (!string.IsNullOrEmpty(e.Argument))
            {
                if (e.Argument == "Rebind")
                    RadGrid_Group.Rebind();
            }
        }
        catch (Exception exc)
        {
            XITingExceptionProcessor.ProcessException(this, exc);
        }



    }

when exception is thrown then exception is shown behind loading panel In IE11 only.

I could not get solution
PFA.
Maria Ilieva
Telerik team
 answered on 08 Dec 2014
1 answer
131 views
I have radgrid with all the columns populated dynamically. I want to incorporate the edit functionality to the grid for each row/cell.

I see the batch edit functionality best suits my environment. But, as I have the AutoGenerateColumns="true" I am unable to use that option.

Please suggest the other best option to add edit functionality. An example would really help.

Thanks,
Vikas
Viktor Tachev
Telerik team
 answered on 08 Dec 2014
6 answers
432 views
Dear Telerik Team,

i am looking to integrate RadFileExplorer with unc share drive, i try to see this link http://www.telerik.com/support/kb/aspnet-ajax/fileexplorer/physical-paths-and-different-content-types.aspx but seems the link is broken.

Could you please guide for my requirements.

Thanks
Vessy
Telerik team
 answered on 08 Dec 2014
1 answer
511 views
We started seeing errors this week like:  363.6364 is not a value for Int32

In the postback trace 363.6364 we found the following:

FormFieldRadComboBox_i0_FormField_OptionsRadTreeView_ClientState
= {"expandedNodes":["0:2"],"collapsedNodes":[],"logEntries":[],"selectedNodes":["0:2:12"],"checkedNodes":[],"scrollPosition":363.6364}

So it seems Chrome 39.0.2171.71 is returning a decimal scrollPosition which is blowing up RadComboBox. 

Any one else seeing this and/or have a resolution?
Dimitar Terziev
Telerik team
 answered on 08 Dec 2014
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?