Telerik Forums
UI for ASP.NET AJAX Forum
4 answers
294 views
Hi,

How do i include excel like multi select filter functionality in Radgrid? Same feature is there Silverlight Radgridview but  I can't use silverlight in my application. So if you can provide me with some examples to include multiselect filter functionality in Radgrid similar to Silverlight Radgridview.

Thanks
Shasanka
Princy
Top achievements
Rank 2
 answered on 29 Oct 2013
12 answers
1.2K+ views
Hi ,

I am using RadWindow to open the redirected page . But I'm experiencing the problem, Page URL is showing in the status bar of RadWindow.
Is it possible to hide the URL in the status bar but keep the animated 'Loading' image when the window first opens?

See attached screen shot..

Thanks,
Nawnit
Princy
Top achievements
Rank 2
 answered on 29 Oct 2013
1 answer
96 views

Hai,


               Filter Icon displayed on next line, under filter textbox, for Date Column only.
It looks fine in Firefox and Chrome but in IE filterIcon is displayed on next line under filter text box like in the attachment file.

Please guide me to solve this issue ,

Thanks 

Princy
Top achievements
Rank 2
 answered on 29 Oct 2013
3 answers
165 views
I have a RadTextBox (txtFirstName) that I want to update the label text when the text box has focus:

<%@ Page Title="" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="Person.aspx.cs" Inherits="IncidentTracking.Person" %>
<%@ Register assembly="Telerik.Web.UI" namespace="Telerik.Web.UI" tagprefix="telerik" %>
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
    <script type="text/javascript">
        function Focus(sender, eventArgs)
        {
            this.txtFirstName.Label = "First Name";
        }
    </script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="FeaturedContent" runat="server">
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="MainContent" runat="server">
    <telerik:RadTextBox ID="txtFirstName" Runat="server" EmptyMessage="First Name" LabelWidth="64px" Resize="None" Width="160px" TabIndex="1">
        <ClientEvents OnFocus="Focus" />
    </telerik:RadTextBox>
</asp:Content>

However, when I run this code I get:

0x800a138f - Microsoft JScript runtime error: Unable to set value of the property 'Label': object is null or undefined
Shinu
Top achievements
Rank 2
 answered on 29 Oct 2013
1 answer
89 views
Is it possible to provide some custom text in the fake input of asyncupload?

Thanks
Merin
Shinu
Top achievements
Rank 2
 answered on 29 Oct 2013
2 answers
208 views
I have done this before in my other project for previous client but still struggling with it. I have similar code but edit/insert is giving "Cannot insert Null into <fieldName>" error. It works in InPlace but not in webusercontrol. It looks like the value is not getting transferred from WebUserControl form to grid for update. I have attached the code and hope to get someone to point out what am I really missing this time.

<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Units.aspx.cs"
    Inherits="UMOLWeb.Views.Admin.Units" MasterPageFile="~/TopNav.Master" %>
 
<%@ MasterType VirtualPath="~/TopNav.master" %>
 
<%@ Register TagPrefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI" %>
<asp:Content ID="Content1" ContentPlaceHolderID="cphHtmlHeader" runat="server">
    <style type="text/css">
        .EditFormHeader td {
            background: #25A0DA;
            padding: 10px 0px;
        }
 
        .rgRow, .rgAltRow, .rgHeader, .rtlR, .rtlA {
            font-size: small !important;
            padding: 0;
        }
 
        div.RadGrid_MetroTouch .rgHeader, div.RadGrid_MetroTouch th.rgResizeCol {
            padding-top: 0;
            padding-bottom: 0;
        }
    </style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="cphToolbar" runat="server">
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="cphContent" runat="server">
 
    <asp:Panel runat="server" Visible="false" ID="pnlContent" Style="height: 100%; margin: 0px">
        <telerik:RadScriptBlock ID="RadScriptBlock1" runat="server">
            <script type="text/javascript">
                function PopUpShowing(sender, eventArgs) {
                    var myWidth = 0, myHeight = 0;
                    if (typeof (window.innerWidth) == 'number') {
                        //Non-IE
                        myWidth = window.innerWidth;
                        myHeight = window.innerHeight;
 
                    } else if (document.documentElement && (document.documentElement.clientWidth || document.documentElement.clientHeight)) {
                        //IE 6+ in 'standards compliant mode'
                        myWidth = document.documentElement.clientWidth;
                        myHeight = document.documentElement.clientHeight;
                    } else if (document.body && (document.body.clientWidth || document.body.clientHeight)) {
                        //IE 4 compatible
                        myWidth = document.body.clientWidth;
                        myHeight = document.body.clientHeight;
                    }
 
                    popUp = eventArgs.get_popUp();
                    var gridWidth = sender.get_element().offsetWidth;
                    var gridHeight = sender.get_element().offsetHeight;
                    var popUpWidth = popUp.style.width.substr(0, popUp.style.width.indexOf("px"));
                    var popUpHeight = popUp.style.height.substr(0, popUp.style.height.indexOf("px"));
                    popUp.style.left = ((myWidth - popUpWidth) / 2 + sender.get_element().offsetLeft).toString() + "px";
                    var posy = document.body.scrollTop + document.documentElement.scrollTop;
                    popUp.style.top = (posy + sender.get_element().offsetTop + 100).toString() + "px";
                }
 
                function RowDblClick(sender, eventArgs) {
                    sender.get_masterTableView().editItem(eventArgs.get_itemIndexHierarchical());
                }
            </script>
        </telerik:RadScriptBlock>
 
        <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server" DefaultLoadingPanelID="RadAjaxLoadingPanel1">
            <AjaxSettings>
                <telerik:AjaxSetting AjaxControlID="RadGrid1">
                    <UpdatedControls>
                        <telerik:AjaxUpdatedControl ControlID="RadGrid1"></telerik:AjaxUpdatedControl>
                    </UpdatedControls>
                </telerik:AjaxSetting>
            </AjaxSettings>
        </telerik:RadAjaxManager>
         <telerik:RadWindowManager ID="RadWindowManager1" runat="server"></telerik:RadWindowManager>
        <telerik:RadSplitter ID="RadSplitter1" runat="server" Width="100%" Height="100%"
            HeightOffset="175" Skin="MetroTouch" BorderSize="0">
            <telerik:RadPane ID="RadPane1" runat="server" Scrolling="Y">
                <telerik:RadGrid ID="RadGrid1" runat="server" DataSourceID="SqlDataSource1" AutoGenerateColumns="false" BorderWidth="0" AllowAutomaticUpdates="true" AllowAutomaticInserts="true"
                    DataKeyNames="ID" AllowSorting="true" Skin="Windows7" EnableTheming="false" AllowPaging="false" PagerStyle-Mode="NextPrev" PagerStyle-Position="Top" PageSize="12"
                    ShowGroupPanel="True" OnItemUpdated="RadGrid1_ItemUpdated">
                    <MasterTableView DataSourceID="SqlDataSource1" AutoGenerateColumns="False" DataKeyNames="ID"
                        CommandItemDisplay="Top" EditMode="Popup" AllowMultiColumnSorting="true" AllowAutomaticUpdates="true" AllowAutomaticInserts="true">
                        <GroupByExpressions>
                            <telerik:GridGroupByExpression>
                                <SelectFields>
                                    <telerik:GridGroupByField FieldAlias="Region" FieldName="Region"></telerik:GridGroupByField>
                                </SelectFields>
                                <GroupByFields>
                                    <telerik:GridGroupByField FieldName="Region"></telerik:GridGroupByField>
                                </GroupByFields>
                            </telerik:GridGroupByExpression>
                            <telerik:GridGroupByExpression>
                                <SelectFields>
                                    <telerik:GridGroupByField FieldAlias="BusinessUnit" FieldName="BusinessUnit"></telerik:GridGroupByField>
                                </SelectFields>
                                <GroupByFields>
                                    <telerik:GridGroupByField FieldName="BusinessUnit"></telerik:GridGroupByField>
                                </GroupByFields>
                            </telerik:GridGroupByExpression>
                            <telerik:GridGroupByExpression>
                                <SelectFields>
                                    <telerik:GridGroupByField FieldAlias="Area" FieldName="Area"></telerik:GridGroupByField>
                                </SelectFields>
                                <GroupByFields>
                                    <telerik:GridGroupByField FieldName="Area"></telerik:GridGroupByField>
                                </GroupByFields>
                            </telerik:GridGroupByExpression>
                        </GroupByExpressions>
                        <Columns>
                            <telerik:GridEditCommandColumn ButtonType="ImageButton" HeaderText="Edit">
                            </telerik:GridEditCommandColumn>
                            <telerik:GridBoundColumn DataField="UnitNo" HeaderText="Unit" SortExpression="UnitNo"
                                UniqueName="UnitNo">
                            </telerik:GridBoundColumn>
                            <telerik:GridBoundColumn DataField="UnitType" HeaderText="UnitType" SortExpression="UnitType"
                                UniqueName="UnitType">
                            </telerik:GridBoundColumn>
                            <telerik:GridBoundColumn DataField="HorsePower" HeaderText="FERCHP" SortExpression="HorsePower"
                                UniqueName="HorsePower">
                            </telerik:GridBoundColumn>
                            <telerik:GridBoundColumn DataField="Engine" HeaderText="Engine" SortExpression="Engine"
                                UniqueName="Engine">
                            </telerik:GridBoundColumn>
                            <telerik:GridBoundColumn DataField="Region" HeaderText="Region" SortExpression="Region"
                                UniqueName="Region">
                            </telerik:GridBoundColumn>
                            <telerik:GridBoundColumn DataField="BusinessUnit" HeaderText="BU" SortExpression="BusinessUnit"
                                UniqueName="BusinessUnit">
                            </telerik:GridBoundColumn>
                            <telerik:GridBoundColumn DataField="Area" HeaderText="Area" SortExpression="Area"
                                UniqueName="Area">
                            </telerik:GridBoundColumn>
                            <telerik:GridBoundColumn DataField="Station" HeaderText="Station" SortExpression="Station"
                                UniqueName="Station">
                            </telerik:GridBoundColumn>
                            <telerik:GridCheckBoxColumn DataField="IsActive" DataType="System.Boolean" HeaderText="Active" runat="server"></telerik:GridCheckBoxColumn>
                        </Columns>
                        <EditFormSettings CaptionDataField="UnitNo" CaptionFormatString="Edit Information for Unit: {0}"
                            EditFormType="WebUserControl" UserControlName="~/Views/Controls/EditUnitDetails.ascx" InsertCaption="New Unit">
                            <FormTableItemStyle Wrap="False" Width="400px"></FormTableItemStyle>
                            <FormCaptionStyle CssClass="EditFormHeader"></FormCaptionStyle>
                            <FormMainTableStyle GridLines="None" CellSpacing="1" CellPadding="3" />
                            <FormTableStyle CellSpacing="0" CellPadding="2" Height="150px" />
                            <EditColumn ButtonType="ImageButton" InsertText="Insert Location" UpdateText="Update record"
                                UniqueName="EditCommandColumn1" CancelText="Cancel edit">
                            </EditColumn>
                            <FormTableButtonRowStyle HorizontalAlign="Left" CssClass="EditFormButtonRow"></FormTableButtonRowStyle>
                        </EditFormSettings>
                    </MasterTableView>
                    <ClientSettings AllowGroupExpandCollapse="True" AllowDragToGroup="True">
                        <ClientEvents OnPopUpShowing="PopUpShowing" />
                        <ClientEvents OnRowDblClick="RowDblClick" />
                    </ClientSettings>
                    <GroupingSettings ShowUnGroupButton="true"></GroupingSettings>
                </telerik:RadGrid>
            </telerik:RadPane>
        </telerik:RadSplitter>
        <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" Skin="Windows7">
        </telerik:RadAjaxLoadingPanel>
    </asp:Panel>
    <asp:Panel ID="pnlError" runat="server" Visible="false">
        <table>
            <tr>
                <td style="color: red; font-weight: bold">
                    <asp:Label runat="server" ID="lblError"></asp:Label></td>
            </tr>
        </table>
    </asp:Panel>
 
    <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:WebAppConnectionString %>"
        SelectCommand="SELECT U.ID,UnitNo, UnitType, EngineType, Model, Manufacturer, HorsePower, CSLocation, UsedforUnitMaintenance, Region, BusinessUnit,Area, Station, CASE WHEN U.[IsActive] =1 THEN 'true' Else 'false' END AS IsActive, LocationId FROM Units U INNER JOIN Location L ON LocationId = L.Id ORDER BY Region, BusinessUnit, Area, Station"
        UpdateCommand="UPDATE Units SET [UnitNo] = @UnitNo, [UnitType] = @UnitType, [EngineType] = @EngineType, [Model] = @Model, [Manufacturer] = @Manufacturer, [HorsePower] = @HorsePower, [CSLocation] = @CSLocation, [UsedforUnitMaintenance] = @UsedforUnitMaintenance, [LocationId] = @LocationId, IsActive=@IsActive WHERE [ID] = @ID">
        <InsertParameters>
            <asp:Parameter Name="UnitNo" Type="String" />
            <asp:Parameter Name="UnitType" Type="String" />
            <asp:Parameter Name="EngineType" Type="String" />
            <asp:Parameter Name="Model" Type="String" />
            <asp:Parameter Name="Manufacturer" Type="String" />
            <asp:Parameter Name="HorsePower" Type="Int32" />
            <asp:Parameter Name="CSLocation" Type="Boolean" />
            <asp:Parameter Name="UsedforUnitMaintenance" Type="Boolean" />
            <asp:Parameter Name="LocationId" Type="Int16"/>
            <asp:Parameter Name="IsActive" Type="Boolean" />
        </InsertParameters>
        <UpdateParameters>
            <asp:Parameter Name="UnitNo" Type="String" />
            <asp:Parameter Name="UnitType" Type="String" />
            <asp:Parameter Name="EngineType" Type="String" />
            <asp:Parameter Name="Model" Type="String" />
            <asp:Parameter Name="Manufacturer" Type="String" />
            <asp:Parameter Name="HorsePower" Type="String" />
            <asp:Parameter Name="CSLocation" Type="Boolean" />
            <asp:Parameter Name="UsedforUnitMaintenance" Type="Boolean" />
            <asp:Parameter Name="LocationId" Type="Int16" />
            <asp:Parameter Name="IsActive" Type="Boolean" />
            <asp:Parameter Name="Id" Type="Int16" />
        </UpdateParameters>
    </asp:SqlDataSource>
</asp:Content>


using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.Security;
using System.Text;
 
namespace UMOLWeb.Views.Admin
{
    public partial class Units : System.Web.UI.Page
    {
        public string PAGE_FUNCTION = "Units Information";
        const string PAGE_DESCRIPTION = "Adit/Edit Location, Unit and Task Information";
 
        private string gridMessage = null;
 
        protected void Page_Load(object sender, EventArgs e)
        {
            if (Roles.IsUserInRole("Manager") && Roles.IsUserInRole("ITSupport"))
            {
                pnlContent.Visible = true;
            }
            else
            {
                lblError.Text = "You are not authorized to view this page";
                pnlError.Visible = true;
            }
        }
 
       
 
        protected void RadGrid1_ItemUpdated(object sender, Telerik.Web.UI.GridUpdatedEventArgs e)
        {
            // Show messages on Update
            if ((e.Exception != null))
            {
                e.ExceptionHandled = true;
                e.KeepInEditMode = true;
                var aMsg = e.Exception.Message.ToString().Split(';');
                SetMessage("<b>Record cannot be updated</b>.<br />Reason:" + String.Format("<span style='color:red'>" + aMsg[0] + "</span>"));
            }
            else
            {
                SetMessage("Record is Updated!");
            }
        }
 
        private void SetMessage(string message)
        {
            gridMessage = message.Replace("'", "\\'").Replace("\n", "<br />");
        }
 
        private void DisplayMessage(string text)
        {
            //Show the error message on the RadWindow
            string msg = "radalert('" + gridMessage + "',500,100);";
            RadAjaxManager1.ResponseScripts.Add(msg);
        }
        #region "Master Page Settings"
 
        protected void Page_PreRender(object sender, System.EventArgs e)
        {
            var _m = Master;
            _m.PageFunction = PAGE_FUNCTION;
            _m.PageDescription = PAGE_DESCRIPTION;
 
            if (!(String.IsNullOrEmpty(gridMessage)))
                DisplayMessage(gridMessage);
        }
 
        #endregion
    }
}

<%@ Control Language="C#" CodeBehind="EditUnitDetails.ascx.cs" Inherits="UMOLWeb.Views.Controls.EditUnitDetails" %>
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
<table>
    <tr>
        <td>Location:
        </td>
        <td>
            <telerik:RadComboBox DataTextField="Location" DropDownAutoWidth="Enabled" DataValueField="Id" DataSourceID="sqlDataSrc1"
                 ShowMoreResultsBox="true"  Width="300px" EnableLoadOnDemand="true"
                UniqueName="Location" Filter="Contains" AutoPostBack="true" ID="LocationId"
                ItemsPerRequest="10" runat="server">
 
            </telerik:RadComboBox>
        </td>
    </tr>
    <tr>
        <td>Unit No:
        </td>
        <td>
            <asp:TextBox runat="server" ID="UnitNo" Text='<%# DataBinder.Eval(DataItem, "UnitNo")%>'></asp:TextBox>
        </td>
    </tr>
    <tr>
        <td>Unit Type:
        </td>
        <td>
            <asp:TextBox runat="server" ID="UnitType" Text='<%# DataBinder.Eval(DataItem, "UnitType")%>'></asp:TextBox>
        </td>
    </tr>
    <tr>
        <td>Engine Type:
        </td>
        <td>
            <asp:TextBox runat="server" ID="EngineType" Text='<%# DataBinder.Eval(DataItem, "EngineType")%>'></asp:TextBox>
        </td>
    </tr>
    <tr>
        <td>Manufacturer:
        </td>
        <td>
            <asp:TextBox runat="server" ID="Manufacturer" Text='<%# DataBinder.Eval(DataItem, "Manufacturer")%>'></asp:TextBox>
        </td>
    </tr>
    <tr>
        <td>Model:
        </td>
        <td>
            <asp:TextBox runat="server" ID="Model" Text='<%# DataBinder.Eval(DataItem, "Model")%>'></asp:TextBox>
        </td>
    </tr>
    <tr>
        <td>HorsePower:
        </td>
        <td>
            <asp:TextBox runat="server" ID="HorsePower" Text='<%# DataBinder.Eval(DataItem, "HorsePower")%>'></asp:TextBox>
        </td>
    </tr>
    <tr>
        <td>CS Location:
        </td>
        <td>
            <asp:CheckBox runat="server" ID="CSLocation" Checked='<%# DataBinder.Eval(DataItem, "CSLocation")%>' />
        </td>
    </tr>
    <tr>
        <td>Used for Maintenance:
        </td>
        <td>
            <asp:CheckBox runat="server" ID="UsedforUnitMaintenance" Checked='<%# DataBinder.Eval(DataItem, "UsedforUnitMaintenance")%>' />
        </td>
    </tr>
     <tr>
        <td>Active:
        </td>
        <td>
            <asp:CheckBox runat="server" ID="IsActive" Checked='<%# Convert.ToBoolean(DataBinder.Eval(DataItem, "IsActive"))%>' />
        </td>
    </tr>
 
    <tr>
        <td>
            <div class="Form_Buttons">
                <asp:LinkButton ID="btnSave" runat="server" Text="Save" CommandName="Update" Visible='<%# !(DataItem is Telerik.Web.UI.GridInsertionObject) %>' /> 
                <asp:LinkButton ID="btnAdd" runat="server" Text="Insert" CommandName="PerformInsert"
                    Visible='<%# (DataItem is Telerik.Web.UI.GridInsertionObject) %>' /> 
                <asp:LinkButton ID="btnCancel" runat="server" Text="Cancel" CausesValidation="false"
                    CommandName="Cancel" />
            </div>
        </td>
    </tr>
</table>
<asp:SqlDataSource ID="sqlDataSrc1" runat="server" ConnectionString="<%$ ConnectionStrings:WebAppConnectionString %>"
    SelectCommand="SELECT Region + '-' + BusinessUnit + '-' + Area + '-' + Station AS 'Location', Id FROM [Location]"></asp:SqlDataSource>
<asp:SqlDataSource ID="sqlDataSrc2" runat="server" ConnectionString="<%$ ConnectionStrings:WebAppConnectionString %>"></asp:SqlDataSource>
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Collections.Specialized;
using System.Data;
using Telerik.Web.UI;
using UMOLWeb.Shared;
using UMOLWeb.Models;
 
namespace UMOLWeb.Views.Controls
{
    #region "events"
    public partial class EditUnitDetails : System.Web.UI.UserControl, IBindableControl
    {
        private object _dataItem = null;
 
        public object DataItem
        {
            get{return this._dataItem;}
            set{this._dataItem = value;}
        }
 
        protected void Page_Load(object sender, EventArgs e)
        {
             
        }
 
        protected void Page_PreRender(object sender, EventArgs e)
        {
            if (!(DataItem is Telerik.Web.UI.GridInsertionObject))
            {
                DataRowView drv = (DataRowView)_dataItem;
 
                if (drv != null)
                {
                    RadComboBoxItem loc = new RadComboBoxItem();
                    loc.Text = drv.Row["Region"].ToString() + "-" + drv.Row["BusinessUnit"].ToString() + "-" + drv.Row["Area"].ToString() + "-" + drv.Row["Station"].ToString();
                    loc.Value = drv.Row["LocationId"].ToString();
                    LocationId.Items.Add(loc);
                    loc.Selected = true;
                    loc.DataBind();
                }
            }
        }
 
       
 
 
        void IBindableControl.ExtractValues(IOrderedDictionary Dictionary)
        {
 
            try
            {
                //retrives all Textbox and add thier values to the dictionary
                foreach (object ctrl in Controls)
                {
                    if ((ctrl is TextBox))
                    {
                        //    //OfType<TextBox>().Select(control => new { FieldName = control.ID, FieldValue = control.Text }))
                        Dictionary.Add(((TextBox)ctrl).ID, ((TextBox)ctrl).Text);
                    }
 
                    if (ctrl is RadComboBox)
                    {
                        Dictionary.Add(((RadComboBox)ctrl).ID, ((RadComboBox)ctrl).SelectedValue);
                    }
 
                    if (ctrl is CheckBox)
                    {
                        Dictionary.Add(((CheckBox)ctrl).ID, ((CheckBox)ctrl).Checked);
                    }
                }
 
            }
            catch (Exception ex)
            {
            }
        }
 
 
    #endregion
}
}


It is not going to extractvalue method at all. 
Vijaianand
Top achievements
Rank 1
 answered on 28 Oct 2013
4 answers
75 views

    I always thought it was a pretty poor and lazy design decision to have the rad filter menu contain run-on gobbledygook like "GreaterThanOrEqualTo" displayed to the user. And now looking at the Metro skin, it seems Telerik has taken this to a whole new level of poor design by having all-caps stuff like "GREATERTHANOREQUALTO". Now, I'm sure there are folks out there (likely those who think Visual studio 2012 is beautiful) who believe this is great and represents the evolution of UI design. But for the rest of us who aren't as advanced in the design world, would it be possible to provide a simple way of presenting users with a normal, or better yet "classic", interface which doesn't look like the result of a developer whose keyboard is malfunctioning? Phrases have spaces in them. Its how human language has developed over the course of hundreds of thousands of years. Why change now?
Albert Shenker
Top achievements
Rank 1
Veteran
Iron
 answered on 28 Oct 2013
2 answers
170 views
I am using ajaxloadingpanel with Metrotouch skin. It is not refreshing properly. It just show full blue when it does the ajax. I tried transperency, interval but still not doing the dot dot dot running icon in the middle which is suppose to and does rarely sometimes. See attached screenshots. When click on grouping buttons or edit
<telerik:RadAjaxManager ID="RadAjaxManager1" runat="server" DefaultLoadingPanelID="RadAjaxLoadingPanel1">
            <AjaxSettings>
                <telerik:AjaxSetting AjaxControlID="RadGrid1">
                    <UpdatedControls>
                        <telerik:AjaxUpdatedControl ControlID="RadGrid1"></telerik:AjaxUpdatedControl>
                    </UpdatedControls>
                </telerik:AjaxSetting>
                <telerik:AjaxSetting AjaxControlID="RadGrid2">
                    <UpdatedControls>
                        <telerik:AjaxUpdatedControl ControlID="RadGrid2"></telerik:AjaxUpdatedControl>
                    </UpdatedControls>
                </telerik:AjaxSetting>
            </AjaxSettings>
        </telerik:RadAjaxManager>
 
<telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" Skin="Metro" Transparency="100">
        </telerik:RadAjaxLoadingPanel
, this is what happens. What may the issue? Added code as well.
Vijaianand
Top achievements
Rank 1
 answered on 28 Oct 2013
3 answers
95 views
Hi All!

I have an editable RadGrid with a SQL Server 2008 back end.  I can successfully update values except when updating one field that is UNIQUE NOT NULL. 

When I insert a new item I can populate this field with no issue.

I have checked the update script in SQL Server Management Studio, and it updated the entry correctly.

Can anyone please advise me?

Thanks,
Mark
Mark
Top achievements
Rank 1
 answered on 28 Oct 2013
1 answer
112 views
I can't figure this out.  I have a RadComboBox inside a GridTemplateColumn with Items for commands.  When a command is selected from the DropDownList it posts back.
protected void gvTransactionsCommandList_SelectedIndexChanged(object sender, RadComboBoxSelectedIndexChangedEventArgs e)
        {
            RadComboBox myBox = (RadComboBox)sender;
            if (myBox != null && !string.IsNullOrEmpty(myBox.SelectedValue.Trim()))
            {
                GridDataItem item = (GridDataItem)myBox.NamingContainer;
                RadGrid grid = (RadPane1.FindControl("gvTransactions") as RadGrid);
                gvTransactions.MasterTableView.Items[item.ItemIndex].Selected = true;
                (grid.MasterTableView.GetItems(GridItemType.CommandItem)[0] as GridCommandItem).FireCommandEvent(myBox.SelectedValue, string.Empty);
            }
        }

This Fires the selected command. Which is processed by this code.

protected void gvTransactions_ItemCommand(object sender, Telerik.Web.UI.GridCommandEventArgs e)
        {
            switch (e.CommandName)
            {
                case "InitInsert":
                    gvTransactions.SetInsertControl("UserControls/TransactionDetails.ascx");
                    break;
                case "RowClick":
                    gvTransactions.SetUpdateControl("UserControls/TransactionDetails.ascx", e);
                    break;
                case "ViewProcess":
                    gvTransactions.SetUpdateControl("UserControls/TransactionDetails.ascx", e);
                    break;
                case "PerformInsert":
                    UserControl userControl = gvTransactions.GetInsertControl(e);
                    break;
                case "PerformUpdate":
                    DataTable dtOld = StoredProcedure.ReturnData("spPeople_AppointmentManager_Get", "@TransactionID", gvTransactions.GetKeyValue(e));
                    UserControl userUpdateControl = gvTransactions.GetUpdateControl(e);
 
                    gvTransactions.CloseUpdateControl(e);
                    break;
                case "PerformDelete":
                    StoredProcedure.RunCommand("spPeople_AppointmentManager_Delete", "@AcademicID", gvTransactions.GetKeyValue(e));
                    gvTransactions.CloseUpdateControl(e);
                    break;
            }
        }

This code is sent here to bind the UserControl appropriate for the selected command.

public static void SetUpdateControl(this RadGrid control, string userControlName, GridCommandEventArgs e)
        {
            control.MasterTableView.EditFormSettings.EditFormType = GridEditFormType.WebUserControl;
            control.MasterTableView.EditFormSettings.UserControlName = userControlName;
            control.MasterTableView.EditFormSettings.EditColumn.UniqueName = "EditFormControl";
            control.MasterTableView.Items[e.Item.ItemIndex].Edit = true;
            control.MasterTableView.Rebind();
        }

The Error Comes at this line where it states "invalid index".  The e.Item.ItemIndex is -1.
control.MasterTableView.Items[e.Item.ItemIndex].Edit = true;

The issue is when I use the "FireCommandEvent" function, it doesn't set the ItemIndex. 

How do I fix this?
HSD
Top achievements
Rank 1
 answered on 28 Oct 2013
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?