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

I have a Radgrid with EnableHeaderContextMenu enabled to allow users to show/hide columns.

The checkbox and the label in column chooser window do not align.

Attached is the screenshot showing the behavior.

Eyup
Telerik team
 answered on 02 May 2013
1 answer
98 views
Hi, I am trying to allow inline editing of a radgrid, and I have a column that can either be text (including html) or a url. When we try to edit this row and accept or cancel the changes, in google chrome nothing happens, in internet explored and unhandled exception is thrown. Am I not able to accept html/urls?

Attached is the error from ie. Thanks.

<telerik:RadGrid ID="rgMain" runat="server" AllowPaging="false" AllowSorting="false"
                        AllowMultiRowSelection="false" AutoGenerateColumns="False" OnItemCommand="rgMain_ItemCommand"
                        HorizontalAlign="NotSet" AllowAutomaticDeletes="False" AllowAutomaticInserts="False"
                        AllowAutomaticUpdates="true" Width="100%" VirtualItemCount="0" AllowFilteringByColumn="false"
                        ShowGroupPanel="False">
                        <PagerStyle Mode="NextPrevAndNumeric"></PagerStyle>
                        <ClientSettings ReorderColumnsOnClient="false" AllowColumnsReorder="false" EnableRowHoverStyle="false"
                            AllowGroupExpandCollapse="true" AllowExpandCollapse="true" />
                        <MasterTableView DataKeyNames="DryRunDetailsID" GridLines="None" AllowMultiColumnSorting="True"
                            AutoGenerateColumns="False" HorizontalAlign="NotSet" CommandItemDisplay="Top"
                            EditMode="InPlace" AllowAutomaticUpdates="true" GroupLoadMode="Client">
                            <ItemStyle HorizontalAlign="Left" VerticalAlign="Top" />
                            <HeaderStyle HorizontalAlign="Left" VerticalAlign="Top" />
                            <AlternatingItemStyle HorizontalAlign="Left" VerticalAlign="Top" />
                            <GroupByExpressions>
                                <telerik:GridGroupByExpression>
                                    <SelectFields>
                                        <telerik:GridGroupByField FieldAlias="DryRunDate" FieldName="DryRunDate" FormatString="{0:dddd MMMM d}"
                                            HeaderText="Date"></telerik:GridGroupByField>
                                    </SelectFields>
                                    <GroupByFields>
                                        <telerik:GridGroupByField FieldAlias="DryRunDate" FieldName="DryRunDate" SortOrder="Ascending"
                                            FormatString="{0:dddd MMMM d}"></telerik:GridGroupByField>
                                    </GroupByFields>
                                </telerik:GridGroupByExpression>
                            </GroupByExpressions>
                            <Columns>
                                <telerik:GridTemplateColumn HeaderText="">
                                    <ItemTemplate>
                                        <asp:Label ID="lblRowCount" runat="server" />
                                    </ItemTemplate>
                                </telerik:GridTemplateColumn>
                                <telerik:GridEditCommandColumn ButtonType="ImageButton" UniqueName="EditCommandColumn">
                                    <ItemStyle CssClass="MyImageButton" />
                                </telerik:GridEditCommandColumn>
                                <telerik:GridDropDownColumn DataField="ClassID" DataSourceID="SqlDataSource1" HeaderText="ClassNumberPrefix"
                                    ListTextField="ClassNumberPrefix" ListValueField="ClassID" UniqueName="ClassNumberPrefix"
                                    EnableEmptyListItem="true" EmptyListItemText=" " EmptyListItemValue="0">
                                </telerik:GridDropDownColumn>
                                <telerik:GridBoundColumn UniqueName="PrimaryPresenter" SortExpression="PrimaryPresenter"
                                    HeaderText="Primary Presenter" DataField="PrimaryPresenter" ReadOnly="true">
                                </telerik:GridBoundColumn>
                                <telerik:GridDateTimeColumn DataField="DryRunStartTime" HeaderText="Start Date" SortExpression="DryRunStartTime" UniqueName="DryRunStartTime" DataType="System.DateTime" PickerType="DateTimePicker"></telerik:GridDateTimeColumn>
                                <telerik:GridDateTimeColumn DataField="DryRunEndTime" HeaderText="End Date" SortExpression="DryRunEndTime" UniqueName="DryRunEndTime" DataType="System.DateTime" PickerType="DateTimePicker"></telerik:GridDateTimeColumn>
                                <telerik:GridBoundColumn UniqueName="DryRunLocation" SortExpression="DryRunLocation"
                                    HeaderText="Location" DataField="DryRunLocation" ReadOnly="false">
                                </telerik:GridBoundColumn>
                                <telerik:GridDropDownColumn DataField="DryRunCoordinatorID" DataSourceID="SqlDataSource2"
                                    HeaderText="Slot Owner" ListTextField="CoordinatorName" ListValueField="DryRunCoordinatorID"
                                    UniqueName="SlotOwner" EnableEmptyListItem="true" EmptyListItemText=" "
                                    EmptyListItemValue="0">
                                </telerik:GridDropDownColumn>
                            </Columns>
                            <ExpandCollapseColumn ButtonType="ImageButton" Visible="true" UniqueName="ExpandColumn">
                                <HeaderStyle Width="19px"></HeaderStyle>
                            </ExpandCollapseColumn>
                            <RowIndicatorColumn ItemStyle-Width="0px" HeaderStyle-Width="0px" />
 
                        </MasterTableView>
                    </telerik:RadGrid>
Eyup
Telerik team
 answered on 02 May 2013
6 answers
354 views
When going to a page with the radchart control on it, we're seeing this error:

The resource cannot be found.
Description: HTTP 404. The resource you are looking for (or one of its dependencies) could have been removed, had its name changed, or is temporarily unavailable.  Please review the following URL and make sure that it is spelled correctly.

Requested URL: /performance/reports/ChartImage.axd


What can we do to fix this? Are we missing a config setting? It's important to note that right now the radchart control is in a user control which is on the page that is displaying the error.

Thanks for any help.
Jeny
Top achievements
Rank 1
 answered on 02 May 2013
1 answer
112 views

Hi, I am using telerik radgrid in my application with below markup : When in the application i m increasing the page size from 20 to 50 or more , it thows me error. Could you pls suggest what needs to be corrected from code perspective?
 
<telerik:RadGrid ID="gvHazardCategories" runat="server" 
AutoGenerateColumns="False"

AllowPaging="True"
 
PageSize="20"

AllowSorting="True"

DataSourceID="odsHazardCategories"

GridLines="None"

AllowFilteringByColumn="true"
 
OnInit="gvHazardCategories_Init"
 
OnDeleteCommand="gvHazardCategories_DeleteCommand"

OnInsertCommand="gvHazardCategories_InsertCommand"

OnUpdateCommand="gvHazardCategories_UpdateCommand"

OnItemCreated="gvHazardCategories_ItemCreated"
 
OnItemCommand="gvHazardCategories_ItemCommand"
 
OnPreRender="gv_PreRender"
 >
 

using System;
using System.Collections.Generic;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Fourleaf.Websites.DEC.Web;
using Fourleaf.Websites.DEC.Core;
using Fourleaf.Websites.DEC.Business;
using Telerik.Web.UI;
using System.Collections.Specialized;
using Microsoft.Practices.EnterpriseLibrary.ExceptionHandling;
 
public partial class DataAdmin_HazardCategories : BasePage
{
    protected void Page_Load(object sender, EventArgs e)
    {
        SetupPage("Hazard Category Management", FourleafUser.UserLevelType.Administrator);
    }
 
    #region gvHazardCategories
 
    protected void gvHazardCategories_Init(object sender, EventArgs e)
    {
        try
        {
            TelerikUtil.ConfigureFilterItems(((RadGrid)sender).FilterMenu);
        }
        catch (Exception ex)
        {
            bool rethrow = ExceptionPolicy.HandleException(ex, CurrentSite.Instance.Error_UI_Policy_Name);
            NameValueCollection errDetail = new NameValueCollection(1);
            errDetail.Add("UserErrorMessage", UserErrorMessage);
            ExceptionHandler handler = new ExceptionHandler(ex, errDetail);
        }
    }
    //protected void gvHazardCategories_hPageIndexChanged(object sender, GridCommandEventArgs e)
    //{
    //    try
    //    {
    //        gvHazardCategories.CurrentPageIndex = e.NewPageIndex;
    //        //ShowGrid(-1);
    //        gvHazardCategories.DataBind();
    //    }
    //    catch (Exception ex)
    //    {
    //        bool rethrow = ExceptionPolicy.HandleException(ex, CurrentSite.Instance.Error_UI_Policy_Name);
    //        NameValueCollection errDetail = new NameValueCollection(1);
    //        errDetail.Add("UserErrorMessage", UserErrorMessage);
    //        ExceptionHandler handler = new ExceptionHandler(ex, errDetail);
    //    }
    //}
 
    protected void gvHazardCategories_ItemCommand(object source, GridCommandEventArgs e)
    {
        try
        {
            //Used to close any open edit forms when the insert form is displayed and vice versa
            RadGrid grid = (RadGrid)source;
            TelerikUtil.CloseOppositeForm(grid, e);
 
            if (e.Item is GridEditableItem & !e.Item.IsInEditMode)
            {
                Hazard_Category _Business = new Hazard_Category();
                //Get edited item
                GridEditableItem editedItem = (GridEditableItem)e.Item;
                //Get values
                int HazardCategoryId = Conversion.ToInt32Default(editedItem.GetDataKeyValue("Hazard_Category_Id"), 0);
 
                if (HazardCategoryId > 0)
                {
                    switch (e.CommandName.ToUpper())
                    {
                        case "UP":
                            _Business.MoveUp(HazardCategoryId);
                            gvHazardCategories.Rebind();
                            break;
                        case "DOWN":
                            _Business.MoveDown(HazardCategoryId);
                            gvHazardCategories.Rebind();
                            break;
                    }
                }
            }
        }
        catch (Exception ex)
        {
            bool rethrow = ExceptionPolicy.HandleException(ex, CurrentSite.Instance.Error_UI_Policy_Name);
            NameValueCollection errDetail = new NameValueCollection(1);
            errDetail.Add("UserErrorMessage", UserErrorMessage);
            ExceptionHandler handler = new ExceptionHandler(ex, errDetail);
        }
    }
 
 
    protected void gvHazardCategories_DeleteCommand(object source, GridCommandEventArgs e)
    {
        try
        {
            //Get edited item
            GridEditableItem editedItem = (GridEditableItem)e.Item;
 
            //Get values
            int HazardCategoryId = Conversion.ToInt32Default(editedItem.GetDataKeyValue("Hazard_Category_Id"), 0);
 
            //Check values are legit
            if (HazardCategoryId <= 0)
            {
                e.Canceled = true;
            }
            else
            {
                //Do the work
                Hazard_Category _Business = new Hazard_Category();
                _Business.Delete(HazardCategoryId);
            }
        }
        catch (Exception ex)
        {
            bool rethrow = ExceptionPolicy.HandleException(ex, CurrentSite.Instance.Error_UI_Policy_Name);
            NameValueCollection errDetail = new NameValueCollection(1);
            errDetail.Add("UserErrorMessage", UserErrorMessage);
            ExceptionHandler handler = new ExceptionHandler(ex, errDetail);
        }
    }
 
    protected void gvHazardCategories_InsertCommand(object source, GridCommandEventArgs e)
    {
        try
        {
            //Get edited item
            GridEditableItem editedItem = (GridEditableItem)e.Item;
 
            //Get error label and reset it
            Label lblError = (Label)Functions.FindControlRecursive(editedItem.OwnerTableView, "lblError");
            lblError.Text = "";
 
            //Get values
            string HazardCategoryName = Conversion.ToStringDefault(((TextBox)Functions.FindControlRecursive(editedItem.OwnerTableView, "txtEditName")).Text);
            int AboveOrBelow = Conversion.ToInt32Default(((RadComboBox)Functions.FindControlRecursive(editedItem.OwnerTableView, "cmbAboveBelow")).SelectedValue, 0);
            int ReferenceId = Conversion.ToInt32Default(((RadComboBox)Functions.FindControlRecursive(editedItem.OwnerTableView, "cmbHazardCategories")).SelectedValue, 0);
 
 
            //Check values are legit
            if (HazardCategoryName.Trim() == "")
            {
                e.Canceled = true;
            }
            else
            {
                //Do the work
                Hazard_Category _Business = new Hazard_Category();
                int i = _Business.Insert(HazardCategoryName, AboveOrBelow, ReferenceId);
 
                if (i == -1)
                {
                    lblError.Text = string.Format("The database already contains a record for '{0}'", HazardCategoryName);
                    lblError.Visible = true;
                    e.Canceled = true;
                }
            }
 
            //Check to see if we need to display error
            if (e.Canceled == true && lblError.Text == "")
            {
                lblError.Text = "Please complete all the required fields.";
                lblError.Visible = true;
            }
        }
        catch (Exception ex)
        {
            bool rethrow = ExceptionPolicy.HandleException(ex, CurrentSite.Instance.Error_UI_Policy_Name);
            NameValueCollection errDetail = new NameValueCollection(1);
            errDetail.Add("UserErrorMessage", UserErrorMessage);
            ExceptionHandler handler = new ExceptionHandler(ex, errDetail);
        }
    }
 
    protected void gvHazardCategories_UpdateCommand(object source, GridCommandEventArgs e)
    {
        try
        {
            //Get edited item
            GridEditableItem editedItem = (GridEditableItem)e.Item;
 
            //Get error label and reset it
            Label lblError = (Label)Functions.FindControlRecursive(editedItem.OwnerTableView, "lblError");
            lblError.Text = "";
 
            //Get values
            int HazardCategoryId = Conversion.ToInt32Default(editedItem.GetDataKeyValue("Hazard_Category_Id"), 0);
            string HazardCategoryName = Conversion.ToStringDefault(((TextBox)editedItem.FindControl("txtEditName")).Text);
            int HazardCategorySort = Conversion.ToInt32Default(editedItem.GetDataKeyValue("Hazard_Category_Sort"), 0);
 
            //Check values are legit
            if (HazardCategoryId <= 0 || HazardCategoryName.Trim() == "")
            {
                e.Canceled = true;
            }
            else
            {
                //Do the work
                Hazard_Category _Business = new Hazard_Category();
                _Business.Update(HazardCategoryId, HazardCategoryName, HazardCategorySort);
            }
 
            //Check to see if we need to display error
            if (e.Canceled == true && lblError.Text == "")
            {
                lblError.Text = "Please complete all the required fields.";
                lblError.Visible = true;
            }
        }
        catch (Exception ex)
        {
            bool rethrow = ExceptionPolicy.HandleException(ex, CurrentSite.Instance.Error_UI_Policy_Name);
            NameValueCollection errDetail = new NameValueCollection(1);
            errDetail.Add("UserErrorMessage", UserErrorMessage);
            ExceptionHandler handler = new ExceptionHandler(ex, errDetail);
        }
    }
 
    protected void gvHazardCategories_ItemCreated(object sender, Telerik.Web.UI.GridItemEventArgs e)
    {
        try
        {
            if (e.Item is GridHeaderItem)
            {
            }
 
            if (e.Item is GridDataItem)
            {
                GridDataItem dataItem = e.Item as GridDataItem;
                Button btDelete = null;
                int CategoryCount = Conversion.ToInt32Default(dataItem.GetDataKeyValue("Hazard_Category_Count"));
 
                btDelete = ((Button)dataItem["HC_Actions"].Controls[3]);
 
                if (CategoryCount == 0)
                {
                    btDelete.Visible = true;
                }
                else
                {
                    btDelete.Visible = false;
                }
 
                //Hide sort order buttons
                int IsFirst = Conversion.ToInt32Default(dataItem.GetDataKeyValue("IsFirst"));
                int IsLast = Conversion.ToInt32Default(dataItem.GetDataKeyValue("IsLast"));
 
                if (IsFirst == 1)
                {
                    dataItem["HC_Up"].Controls[0].Visible = false;
                    dataItem["HC_Up"].Text = " ";
                }
                if (IsLast == 1)
                {
                    dataItem["HC_Down"].Controls[0].Visible = false;
                    dataItem["HC_Down"].Text = " ";
                }
            }
 
            if (e.Item is GridEditFormItem && e.Item.IsInEditMode)
            {
                GridEditFormItem item = (GridEditFormItem)e.Item;
                //Loop through all items in grid adding help tooltips where necessary
                foreach (Control c in item.Controls[1].Controls[0].Controls)
                {
                    if (c.GetType() == typeof(Label))
                    {
                        Label lbl = (Label)item.FindControl(c.ID);
                        if (lbl.CssClass == "help_label")
                        {
                            lbl.ToolTip = new HelpText().GetTooltip(c.ID, "Hazard Category Management");
                        }
                    }
                }
            }
        }
        catch (Exception ex)
        {
            bool rethrow = ExceptionPolicy.HandleException(ex, CurrentSite.Instance.Error_UI_Policy_Name);
            NameValueCollection errDetail = new NameValueCollection(1);
            errDetail.Add("UserErrorMessage", UserErrorMessage);
            ExceptionHandler handler = new ExceptionHandler(ex, errDetail);
        }
    }
 
    protected void gv_PreRender(object sender, System.EventArgs e)
    {
        RadGrid aGrid = (RadGrid)sender;
 
        if (aGrid.MasterTableView.IsItemInserted)
        {
            RadComboBox aCombo = (RadComboBox)Functions.FindControlRecursive(aGrid.MasterTableView, "cmbHazardCategories");
            if (aCombo != null)
            {
                aCombo.Items[aCombo.Items.Count - 1].Selected = true;
            }
        }
    }
 
    #endregion
 
    protected void Toolbar_ButtonClick(object sender, RadToolBarEventArgs e)
    {
        try
        {
 
            RadToolBarButton thisButton = (RadToolBarButton)e.Item;
 
            if (thisButton.CommandName.ToUpper() == "CLEARFILTERS")
            {
                GridTableView gtv = ((GridTableView)((RadToolBar)sender).Parent.Parent.Parent.Parent.Parent);
                foreach (GridColumn column in gtv.Columns)
                {
                    column.CurrentFilterFunction = GridKnownFunction.NoFilter;
                    column.CurrentFilterValue = string.Empty;
                }
                gtv.FilterExpression = string.Empty;
                gtv.Rebind();
            }
        }
        catch (Exception ex)
        {
            bool rethrow = ExceptionPolicy.HandleException(ex, CurrentSite.Instance.Error_UI_Policy_Name);
            NameValueCollection errDetail = new NameValueCollection(1);
            errDetail.Add("UserErrorMessage", UserErrorMessage);
            ExceptionHandler handler = new ExceptionHandler(ex, errDetail);
        }
 
    }
}
<%@ Page Title="" Language="C#" MasterPageFile="../Core/MasterPage.master" AutoEventWireup="true" CodeFile="HazardCategories.aspx.cs" Inherits="DataAdmin_HazardCategories" %>
<%@ Register TagPrefix="ucDEC" TagName="HelpPage" Src="../UserControls/HelpPage.ascx" %>
 
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolderMain" Runat="Server">
 
    <span style="float: right; line-height: 20px;">
        <ucDEC:HelpPage ID="ucHelp" runat="server" PageName="Hazard_Category" Title="Help - Hazard Category Management" />
    </span>
     
    <h4>Hazard Category Management</h4>
     
    <asp:Panel ID="pnlInstructions" runat="server">
        <p>
            Each requirement is classified according to one of the Hazard Categories from the list shown below.
            <br /><br />
            This screen is used to modify the list of existing Hazard Categories or add new ones. A new Hazard Category can be inserted between existing categories if required.
        </p>
    </asp:Panel>
    <telerik:RadGrid ID="gvHazardCategories" runat="server"
        AutoGenerateColumns="False"
        AllowPaging="True"
        PageSize="20"
        AllowSorting="True" 
        DataSourceID="odsHazardCategories"
        GridLines="None"
        AllowFilteringByColumn="true"
        OnInit="gvHazardCategories_Init"
        OnDeleteCommand="gvHazardCategories_DeleteCommand"
        OnInsertCommand="gvHazardCategories_InsertCommand"
        OnUpdateCommand="gvHazardCategories_UpdateCommand"
        OnItemCreated="gvHazardCategories_ItemCreated"
        OnItemCommand="gvHazardCategories_ItemCommand"
        OnPreRender="gv_PreRender"
        >
        <MasterTableView
            DataKeyNames="Hazard_Category_Id, Hazard_Category_Nm, Hazard_Category_Count, Hazard_Category_Sort, IsFirst, IsLast"
            DataSourceID="odsHazardCategories" 
            InsertItemPageIndexAction="ShowItemOnCurrentPage"
            CommandItemDisplay="Top"
            TableLayout="Fixed"
            >
            <PagerStyle AlwaysVisible="true" />
            <RowIndicatorColumn>
                <HeaderStyle Width="20px" />
            </RowIndicatorColumn>
            <ExpandCollapseColumn>
                <HeaderStyle Width="20px" />
            </ExpandCollapseColumn>
            <CommandItemTemplate>
                <telerik:RadToolBar ID="tbGroups" runat="server" OnButtonClick="Toolbar_ButtonClick">
                    <Items>
                        <telerik:RadToolBarButton Text="New"
                            Visible="true"
                            CommandName='<%# RadGrid.InitInsertCommandName %>' ImageUrl="../Core/images/new.gif">
                        </telerik:RadToolBarButton>
                        <telerik:RadToolBarButton Text="Refresh"
                            Visible="true"
                            CommandName='<%# RadGrid.RebindGridCommandName %>' ImageUrl="../Core/images/refresh.gif">
                        </telerik:RadToolBarButton>
                        <telerik:RadToolBarButton Text="Export to Excel"
                            Visible="false"
                            CommandName='<%# RadGrid.ExportToExcelCommandName %>' ImageUrl="../Core/images/excel.gif">
                        </telerik:RadToolBarButton>
                        <telerik:RadToolBarButton Text="Output to PDF"
                            Visible="false"
                            CommandName='<%# RadGrid.ExportToPdfCommandName %>' ImageUrl="../Core/images/pdf.gif">
                        </telerik:RadToolBarButton>
                        <telerik:RadToolBarButton Text="Clear Filters"
                            Visible="true"
                            CommandName='CLEARFILTERS' ImageUrl="../Core/images/clear_filters.gif">
                        </telerik:RadToolBarButton>
                    </Items>
                </telerik:RadToolBar>
            </CommandItemTemplate>
            <Columns>
                <telerik:GridBoundColumn UniqueName="HC_ID" HeaderText=""
                    ReadOnly="true" Visible="false"
                    DataField="Hazard_Category_Id">
                </telerik:GridBoundColumn>
                <telerik:GridBoundColumn UniqueName="HC_Sort" HeaderText=""
                    ReadOnly="true" Visible="false"
                    DataField="Hazard_Category_Sort">
                </telerik:GridBoundColumn>
                <telerik:GridBoundColumn UniqueName="HC_Name" HeaderText="Name"
                    AutoPostBackOnFilter="true"
                    CurrentFilterFunction="Contains"
                    ShowFilterIcon="false"
                    DataField="Hazard_Category_Nm">
                </telerik:GridBoundColumn>
                <telerik:GridButtonColumn UniqueName="HC_Up"
                    HeaderStyle-Width="40px"
                    ButtonType="ImageButton"
                    CommandName="Up"
                    Text="Move Up"
                    ImageUrl="../Core/Images/move_up.gif"
                    ItemStyle-HorizontalAlign="Center"
                    ItemStyle-VerticalAlign="Middle"
                    >
                </telerik:GridButtonColumn>
                <telerik:GridButtonColumn UniqueName="HC_Down"
                    HeaderStyle-Width="40px"
                    ButtonType="ImageButton"
                    CommandName="Down"
                    ImageUrl="../Core/Images/move_down.gif"
                    Text="Move Down"
                    ItemStyle-HorizontalAlign="Center"
                    ItemStyle-VerticalAlign="Middle"
                    >
                </telerik:GridButtonColumn>
                <telerik:GridTemplateColumn UniqueName="HC_Actions" HeaderText="" Visible="true"
                    AllowFiltering="false"
                    HeaderStyle-Width="120px"
                    >
                    <ItemTemplate>
                        <asp:Button ID="bt_HC_Edit" runat="server" Text="Edit" CommandName="Edit" />
                        <asp:Button ID="bt_HC_Delete" runat="server" Text="Delete" CommandName="Delete" />
                    </ItemTemplate>
                </telerik:GridTemplateColumn>
            </Columns>
            <EditFormSettings EditColumn-ButtonType="PushButton" EditFormType="Template">
            <FormTemplate>
                <table>
                    <tr>
                        <td colspan="2">
                            <asp:Label ID="lblError" runat="server" Text="" Visible="false" CssClass="errormsg" />
                        </td>
                    </tr>
                    <tr>
                        <td><asp:Label ID="lblEditName" runat="server" Text="Hazard Name: " CssClass="">Hazard Name: <span class="errormsg">*</span></asp:Label></td>
                        <td><asp:TextBox ID="txtEditName" runat="server" Text='<%#DataBinder.Eval(Container.DataItem, "Hazard_Category_Nm")%>'></asp:TextBox></td>
                    </tr>
                    <tr>
                        <td><asp:Label ID="lblInsertItem" runat="server" Text="Insert Hazard "
                            Visible='<%# (Container is GridEditFormInsertItem) ? true : false %>' CssClass="">Insert Hazard: <span class="errormsg">*</span></asp:Label></td>
                        <td>
                            <telerik:RadComboBox ID="cmbAboveBelow" runat="server"
                                Visible='<%# (Container is GridEditFormInsertItem) ? true : false %>'
                                >
                                <Items>
                                    <telerik:RadComboBoxItem Text="Below" Value="1" />
                                    <telerik:RadComboBoxItem Text="Above" Value="-1" />
                                </Items>
                            </telerik:RadComboBox>
                            <asp:Literal ID="litSpacer" runat="server" text=" " Visible='<%# (Container is GridEditFormInsertItem) ? true : false %>' />
                            <telerik:RadComboBox ID="cmbHazardCategories" runat="server"
                                AppendDataBoundItems="true"
                                EnableItemCaching="true"
                                DataSourceID="odsHazardCategories"
                                DataTextField="Hazard_Category_Nm"
                                DataValueField="Hazard_Category_Id"
                                Width="200px"
                                Visible='<%# (Container is GridEditFormInsertItem) ? true : false %>'
                                >
                            </telerik:RadComboBox>
                        </td>
                    </tr>
                    <tr>
                    <td> </td>
                    <td class="radGridEditLabel">
                        <asp:Button ID="bt_Detail_Update" runat="server"
                            CommandName='<%# (Container is GridEditFormInsertItem) ? "PerformInsert" : "Update" %>'
                            Text='<%# (Container is GridEditFormInsertItem) ? "Insert" : "Update" %>' />
                        <asp:Button ID="bt_Detail_Cancel" runat="server" CausesValidation="False"
                            CommandName="Cancel" Text="Cancel" />
                    </td>
                </tr>
                </table>
            </FormTemplate>
            </EditFormSettings>
        </MasterTableView>
        <ValidationSettings
            CommandsToValidate="PerformInsert,Update"
            EnableValidation="true"
            ValidationGroup="vgHazardCategory" />
        <GroupingSettings
            CaseSensitive="False" />
        <ClientSettings>
            <Selecting AllowRowSelect="false" />
        </clientsettings>
    </telerik:RadGrid>
     
     
    <asp:ObjectDataSource ID="odsHazardCategories" runat="server"
        SelectMethod="ListOrdered"
        TypeName="Fourleaf.Websites.DEC.Business.Hazard_Category" >
    </asp:ObjectDataSource>
     
     
     
     
</asp:Content>
Angel Petrov
Telerik team
 answered on 02 May 2013
1 answer
79 views
hi,
  can any one suggest a website to understand a MEDIA QUERIES concept clearly(From basic concepts).....................................
thanks
Princy
Top achievements
Rank 2
 answered on 02 May 2013
6 answers
114 views
I have a scheduler with a customized advanced form. On this form I have a Boolean attribute control ResFlight, indicating whether the appointment is a flight, and a resource contol ResAirport holding the departing airport.

If the user checks the ResFlight checkbox I want the ResAirport to be required. 

I would like to do this on the client, but I am a bit lost. I've tried using the asp validators, but I get an error saying that the ResAirport is "an invalid control to validate type"

Any ideas?


Regards, Jill-Connie Lorentsen
Jill-Connie Lorentsen
Top achievements
Rank 1
 answered on 02 May 2013
13 answers
611 views
Hi,

I am using GridClientSelectColumn in my grid.
i am facing problem in which i am selecting multiple row by clicking checkbox generated by GridClientSelectColumn.
and if i Click on any row it deselects other row and just selects only clicked row.  and AllowRowSelect must be set to true for GridClientSelectColumn.

I want that it do not allow selecting row by clicking on it. or any other solution to prevent this.

Thanks,
kamini
Top achievements
Rank 1
 answered on 02 May 2013
7 answers
458 views

Hi,

I have a asp.net page( .aspx) with user control( .ascx). That user control has a RADGrid with several records with paging turned on.
When We want to print, we would like to print all rows( not just rows of current page showing in the grid).
Currently, when we print, it is printing only the rows from page that is being shown on the grid on the screen.
To solve the problem, we wanted to hookup onBeforePrint and set the page size to max number of rows and revertback during onafterprint event
. For that we have the following client-side javascript function. But the effect on RADGrid is not happening until after we get
the print dialog and click on the print dialog. We would like to know how to make the RADGrid display all rows before
the print dialog so that print process would pick up the grid with all rows.

We are wondering how we can do this without going to server and disable the paging through Ajax.

<script type="text/javascript">

    var pageSize;
    var  PageCount;
    function disableGridPaging()
    {       
        var grid = $find("<%= RadGrid_ContactDetails.ClientID %>");
        pageSize = grid.MasterTableView.PageSize;
        PageCount = grid.MasterTableView.PageCount;
        grid.MasterTableView.beginUpdate();
        grid.MasterTableView.set_pageSize(grid.MasterTableView.PageSize * grid.MasterTableView.PageCount);
        grid.MasterTableView.endUpdate();
    }

    function revertBackGridPaging()
    {
        var grid = $find("<%= RadGrid_ContactDetails.ClientID %>");
        grid.MasterTableView.beginUpdate();
        grid.MasterTableView.set_pageSize(pageSize);
        grid.MasterTableView.endUpdate();
    }

     window.onbeforeprint = disableGridPaging
     window.onafterprint = revertBackGridPaging
</script>

thanks,
Srini

Eyup
Telerik team
 answered on 02 May 2013
7 answers
303 views
Hi,

I'm currently evaluating using the RadScheduler in a new ASP.Net MVC enterprise application and so far it looks like it's looking promising, especially since you now have odata support instead of just asmx. However, we also require mobile functionality for tablets and possibly phones. I can't seem to find any concrete information on this although I did see one post claiming an extension was being developed to provide better mobile support. Is that compete? I noticed if I use your demos on an iphone I can touch and drag the appointments around but I can't view their detail, delete them and I couldn't seem to resize them either.

I don't mind have to do a little coding/extension to the control to better support mobile I just need to know if it's possible or has the work already been done. If so, can you point to any demos or example code?

Secondly, what functionality is not available when using the RadScheduler in ASP.Net MVC? I've read a post that indicated that the PDF functionality would not be available. Is that the case? What else will be nonfunctional?

Before we potentially purchase a license, I need to know.

Thanks.
Ivan Zhekov
Telerik team
 answered on 02 May 2013
11 answers
813 views
Hello,

I've a rad scheduler with a customized template for the edit item. I've my own controls in the template and it is working fine. But when i double click an empty cell i just get prompted to enter the title of the appoinment. Can i custom that template too? I want another dropdown it, say category.

Thank you.
Plamen
Telerik team
 answered on 02 May 2013
Narrow your results
Selected tags
Tags
+? more
Top users last month
Chester
Top achievements
Rank 1
Iron
Simon
Top achievements
Rank 1
Iron
Douglas
Top achievements
Rank 2
Iron
Iron
SUNIL
Top achievements
Rank 3
Iron
Iron
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Chester
Top achievements
Rank 1
Iron
Simon
Top achievements
Rank 1
Iron
Douglas
Top achievements
Rank 2
Iron
Iron
SUNIL
Top achievements
Rank 3
Iron
Iron
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?