Telerik Forums
UI for ASP.NET AJAX Forum
2 answers
287 views
I need to be able to change the background colour of the cell for a given day and resource in timeline view to show days when a resource is not available (weekends etc, but could be any day)

Can this be done and if so, how?

Is there a "day render" event for the ASP.Net RadScheduler that I could use and then set some style on the cell?

Thanks
Karl
Top achievements
Rank 1
 answered on 08 Mar 2013
0 answers
116 views
Hi All,
 I am facing so much problem in Rad  Tab.Actually master page is not getting updated.so i used update panel.After adding Update Panel i got this type of error which is dedefined below. while click on any module which is used telerik rad tab,i am getting this below error in pop up window.
  
Please help me to fix this issue.


Microsoft JScript runtime error: Sys.InvalidOperationException: A control is already associated with the element. 

              This is code--
 <body scroll="no">
    <form id="thisMainform" runat="server">
    <asp:ScriptManager ID="ScriptManager1" runat="server">
    </asp:ScriptManager>

  <%--  Added UpdatePanel to refresh the page  for opening proper Help Docs--%>
    <asp:UpdatePanel ID ="Updatecontrols" runat="server" >
    <ContentTemplate>
    <table width="100%" height="100%" border="0" align="center" cellpadding="0" cellspacing="0"
        bgcolor="#ffffff">
        <tbody>
            <tr>
                <td align="center" valign="middle" class="headerbg" height="14%">
                    <table width="100%" height="100%" border="0" cellspacing="0" cellpadding="0">
                        <tr>
                            <td align="left" valign="middle" class="logo" style="padding-left: 10px">
                                <img runat="server" src="~/images/Client_Logo.png" />
                            </td>
                            <td align="right" valign="top">
                                <table width="100%" height="60" border="0" cellpadding="0" cellspacing="0">
                                    <tr>
                                        <td align="right" valign="top">
                                            <table width="100%" border="0" cellspacing="0" cellpadding="0">
                                                <tr>
                                                    <td colspan="7" align="right" style="padding-right: 10px;" height="45">
                                                        <img runat="server" src="~/images/adaptive_logo.gif" width="246" height="37" />
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td width="75%" align="left" valign="top">
                                                        <asp:Label ID="lblUserName" runat="server" Text="Label"></asp:Label>
                                                    </td>
                                                    <td width="24" align="left" valign="middle">
                                                        <img runat="server" src="~/images/Home_icon.gif" width="14" height="14" hspace="5" />
                                                    </td>
                                                    <td width="70" align="left" valign="middle">
                                                        <asp:LinkButton ID="lnkBtnHome" runat="server" Text="Home" PostBackUrl="~/AdaptivePortfolio/AdaptivePortfoliloMain.aspx"
                                                            CausesValidation="false" />
                                                    </td>
                                                    <td width="25" align="left" valign="top">
                                                        <img runat="server" src="~/images/Help_icon.gif" width="16" height="20" />
                                                    </td>
                                                    <td width="70" align="left" valign="middle">
                                                        <asp:LinkButton ID="lnkbtnHelp" runat="server" Text="Help" CausesValidation="false" />
                                                    </td>
 
                                                      <td width="25" align="left" valign="top">
                                                        <img id="ImgVLink" runat="server" src="~/images/video.png" width="16" height="20" />
                                                    </td>
                                                    <td width="70" align="left" valign="middle">
                                                  
                                                        <asp:LinkButton ID="lnkBtnVLink"  runat="server" Text="Video"  CausesValidation="false" /> 
                                                       <%--  OnClick="ShowVLink()"--%> 
                                                    </td>



                                                    <td width="25" align="left" valign="top">
                                                        <img id="imgLogout" runat="server" src="~/images/Loigout_icon.gif" width="18" height="20" />
                                                    </td>
                                                    <td width="133" align="left" valign="middle">
                                                        <asp:LinkButton ID="lnkbtnLogout" runat="server" OnClick="lnkbtnLogout_Click" Text="Logout"
                                                            CausesValidation="false" />
                                                    </td>
                                                </tr>
                                            </table>
                                        </td>
                                    </tr>
                                </table>
                            </td>
                        </tr>
                        <tr>
                            <td height="6" colspan="2" align="left" valign="top" bgcolor="#4DA5CF">
                            </td>
                        </tr>
                    </table>
                </td>
            </tr>
            <tr>
                <td valign="top" height="77%">
                    <table width="100%" height="100%" border="0" cellpadding="0" cellspacing="0">
                        <tr>
                            <td>
                                <telerik:radtabstrip runat="server" id="RadTabMain" width="100%" skin="Office2007"
                                    selectedindex="0">
                                    <Tabs>
                                        <telerik:RadTab runat="server" Text="Adaptive Portfolio System" Value="portfolio"
                                            NavigateUrl="~/AdaptivePortfolio/AdaptivePortfoliloMain.aspx" />
                                        <telerik:RadTab runat="server" Text="Adaptive Management System" Value="Management"
                                            NavigateUrl="~/AdaptiveManagement/bin-release/AMSHome.aspx" />
                                    </Tabs>
                                </telerik:radtabstrip>
                            </td>
                        </tr>
                        <tr>
                            <td valign="top" height="100%">
                                <asp:ContentPlaceHolder ID="ContentPlaceHolderMain" runat="server">
                                </asp:ContentPlaceHolder>
                            </td>
                        </tr>
                    </table>
                </td>
            </tr>
</tbody>
    </table>
   
   </ContentTemplate>
 </asp:UpdatePanel>
Kamal
Top achievements
Rank 1
 asked on 08 Mar 2013
3 answers
164 views
Hi,

I want to make a similar kind of graphs as per attached image.  I couldn't find the solution of  three things 

1-  How to display the month labels on top 
2- Highlighting the specific XAxies column as gray.
3- Making XAxies column clickable so that user can edit monthly data.
Marin Bratanov
Telerik team
 answered on 08 Mar 2013
1 answer
77 views
I am using a radgrid with headercontextmenu with it. I have also added custom menu and I have done that in OnPrerender event of page(as suggested on telerik website). Now, when I leave the page idle for some time and then I try to sort the grid or perform any action on page, the count of the headercontextmenu items is being set to zero, which I found while debugging.

Does anyone have any idea why the items count is being set to zero?

Thanks,
Neerajan
Eyup
Telerik team
 answered on 08 Mar 2013
1 answer
108 views
Hello,

I am exporting grid to excel:
gdv.ExportSettings.ExportOnlyData = true;
gdv.MasterTableView.ExportToExcel(); 

the export is successful, but i am using Jquery to block user interface and displaying a loader ( Implemented in Master page)
but after saving the exported file, the UI is not unblocked.
What i should do ?
Daniel
Telerik team
 answered on 08 Mar 2013
1 answer
205 views
HELP!
I added a Telerik RadGrid to my aspx page and then configured my datasource. I tested in debug mode and I get this error:

The base class includes the field 'RadGrid1', but its type (Telerik.Web.UI.RadGrid) is not compatible with the type of control (Telerik.Web.UI.RadGrid).

I can't figure what is wrong??? My web.config has telerik Version=2012.3.1205.35 added and Version=2012.3.1205.40
I tried to add the version 4.0 assembly to my GAC but I got an error. Is this the problem or is there more to this?
What can I do to fix this and get it running?

Here is my Default.aspx page
<%@ Page Title="Home Page" Language="C#" MasterPageFile="~/Site.master" AutoEventWireup="true"
    CodeBehind="Default.aspx.cs" Inherits="FilterGrid._Default" %>
 
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
 
<asp:Content ID="HeaderContent" runat="server" ContentPlaceHolderID="HeadContent">
</asp:Content>
<asp:Content ID="BodyContent" runat="server" ContentPlaceHolderID="MainContent">
    <asp:ScriptManager ID="ScriptManager1" runat="server">
    </asp:ScriptManager>
     
    <telerik:RadGrid ID="RadGrid1" runat="server" CellSpacing="0"
        DataSourceID="SqlDataSource" GridLines="None">
<MasterTableView AutoGenerateColumns="False" DataSourceID="SqlDataSource">
<CommandItemSettings ExportToPdfText="Export to PDF"></CommandItemSettings>
 
<RowIndicatorColumn Visible="True" FilterControlAltText="Filter RowIndicator column">
<HeaderStyle Width="20px"></HeaderStyle>
</RowIndicatorColumn>
 
<ExpandCollapseColumn Visible="True" FilterControlAltText="Filter ExpandColumn column">
<HeaderStyle Width="20px"></HeaderStyle>
</ExpandCollapseColumn>
 
    <Columns>
        <telerik:GridBoundColumn DataField="Client"
            FilterControlAltText="Filter Client column" HeaderText="Client"
            SortExpression="Client_Name" UniqueName="Client">
        </telerik:GridBoundColumn>
        <telerik:GridBoundColumn DataField="Emp"
            FilterControlAltText="Filter Emp column" HeaderText="Emp"
            SortExpression="Emp" UniqueName="Emp">
        </telerik:GridBoundColumn>
        <telerik:GridBoundColumn DataField="ClientNum"
            FilterControlAltText="Filter ClientNum column" HeaderText="ClientNum"
            SortExpression="ClientNum" UniqueName="ClientNum">
        </telerik:GridBoundColumn>
    </Columns>
 
<EditFormSettings>
<EditColumn FilterControlAltText="Filter EditCommandColumn column"></EditColumn>
</EditFormSettings>
</MasterTableView>
 
<FilterMenu EnableImageSprites="False"></FilterMenu>
    </telerik:RadGrid>
    <asp:SqlDataSource ID="SqlDataSource"
    ConnectionString="<%$ ConnectionStrings:Matter_SearchConnectionString %>"
    SelectCommand="SELECT [Client], [Emp], [ClientNum] FROM [Table] ORDER BY [Client]"
    runat="server" ></asp:SqlDataSource>
</asp:Content>


Thanks.
Maria Ilieva
Telerik team
 answered on 08 Mar 2013
3 answers
198 views
Hi, I am new to telerik.

I am trying to implement basic filtering on a RadGrid control. the control has a LinqDataSource, as you will see from the snippet below. I can filter data with the "Donated" column which is of type Boolean and it works and the grid gets properly refreshed. however whenever i filter with any other column, be it Date or String it doesn't. I am following the example http://demos.telerik.com/aspnet-ajax/grid/examples/generalfeatures/filtering/defaultcs.aspx and the only difference i can see is the DataSource type, the example uses SQL while i am using Linq.

can anyone point me in the right direction please.
thank you
<telerik:RadGrid ID="PublicationsGrid" runat="server" GridLines="None"
        DataSourceID="PublicationsSource" AllowFilteringByColumn="True"
        AllowSorting="True" PageSize="12" ShowFooter="True" AllowPaging="False"
        AutoGenerateColumns="False" ShowStatusBar="true" EnableLinqExpressions="true">
        <ClientSettings EnableRowHoverStyle="True">
            <Selecting AllowRowSelect="True" EnableDragToSelectRows="False" />
        </ClientSettings>
        <MasterTableView DataSourceID="PublicationsSource" AllowFilteringByColumn="true">
            <CommandItemSettings ExportToPdfText="Export to PDF"></CommandItemSettings>
            <RowIndicatorColumn Visible="True" FilterControlAltText="Filter RowIndicator column">
            </RowIndicatorColumn>
            <ExpandCollapseColumn Visible="True" FilterControlAltText="Filter ExpandColumn column">
            </ExpandCollapseColumn>
            <Columns>
                <telerik:GridBoundColumn DataField="Isbn" FilterControlAltText="Filter Isbn column"
                    HeaderText="Isbn" SortExpression="Isbn" UniqueName="Isbn" AutoPostBackOnFilter="true">
                </telerik:GridBoundColumn>
                <telerik:GridBoundColumn DataField="Title" FilterControlAltText="Filter Title column"
                    HeaderText="Title" DataType="System.String" SortExpression="Title" UniqueName="Title" AutoPostBackOnFilter="true">
                </telerik:GridBoundColumn>
                <telerik:GridBoundColumn DataField="PublicationDate" DataFormatString="{0:dd/MM/yyyy}"
                    DataType="System.DateTime" FilterControlAltText="Filter PublicationDate column"
                    HeaderText="Date of publication" SortExpression="PublicationDate" UniqueName="PublicationDate" AutoPostBackOnFilter="true">
                </telerik:GridBoundColumn>
                <telerik:GridBoundColumn DataField="Pages" DataType="System.Int32" FilterControlAltText="Filter Pages column"
                    HeaderText="Pages" SortExpression="Pages" UniqueName="Pages" AllowFiltering="False">
                </telerik:GridBoundColumn>
                <telerik:GridCheckBoxColumn DataField="Donated" DataType="System.Boolean" FilterControlAltText="Filter Donated column"
                    HeaderText="Donated" SortExpression="Donated" UniqueName="Donated" AutoPostBackOnFilter="true">
                </telerik:GridCheckBoxColumn>
                <telerik:GridBoundColumn DataField="Cost" DataType="System.Double" FilterControlAltText="Filter Cost column"
                    HeaderText="Cost" SortExpression="Cost" UniqueName="Cost" AllowFiltering="False">
                </telerik:GridBoundColumn>
                <telerik:GridBoundColumn DataField="FullPrice" DataType="System.Double" FilterControlAltText="Filter FullPrice column"
                    HeaderText="Full Price" SortExpression="FullPrice" UniqueName="FullPrice" AllowFiltering="False">
                </telerik:GridBoundColumn>
                <telerik:GridBoundColumn DataField="DiscountPrice" DataType="System.Double" FilterControlAltText="Filter DiscountPrice column"
                    HeaderText="Discount Price" SortExpression="DiscountPrice" UniqueName="DiscountPrice"
                    AllowFiltering="False">
                </telerik:GridBoundColumn>
                <telerik:GridBoundColumn DataField="CurrentStockLevel" DataType="System.Int32" FilterControlAltText="Filter CurrentStockLevel column"
                    HeaderText="Current Stock Level" SortExpression="CurrentStockLevel" UniqueName="CurrentStockLevel"
                    AllowFiltering="False">
                </telerik:GridBoundColumn>
                <telerik:GridBoundColumn DataField="Language" FilterControlAltText="Filter Language column"
                    HeaderText="Language" SortExpression="Language" UniqueName="Language" AutoPostBackOnFilter="true">
                </telerik:GridBoundColumn>
            </Columns>
            <EditFormSettings>
                <EditColumn FilterControlAltText="Filter EditCommandColumn column">
                </EditColumn>
            </EditFormSettings>
        </MasterTableView>
        <FilterMenu EnableImageSprites="True">
        </FilterMenu>
    </telerik:RadGrid>
    <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server" DefaultLoadingPanelID="RadAjaxLoadingPanel1">
        <AjaxSettings>
            <telerik:AjaxSetting AjaxControlID="PublicationsGrid">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="PublicationsGrid"></telerik:AjaxUpdatedControl>
                </UpdatedControls>
            </telerik:AjaxSetting>
        </AjaxSettings>
    </telerik:RadAjaxManager>
    <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server">
    </telerik:RadAjaxLoadingPanel>
    <asp:LinqDataSource ID="PublicationsSource" runat="server" ContextTypeName="App.Business.StockPubContainer"
        EntityTypeName="App.Business.Publication"
        TableName="Publication">
    </asp:LinqDataSource>
Pavlina
Telerik team
 answered on 08 Mar 2013
3 answers
399 views

My situation
I have a RadGrid where some columns contain RadComboBoxes.  These RadComboBoxes only display a code (mostly 3 characters), when they open they display two columns (the code and a description).

My RadComboBox is defined as follows:

<telerik:RadComboBox Width="65px" DropDownWidth="270" ID="radComboBoxVHT"   
   Filter="contains" AllowCustomText="true" HighlightTemplatedItems="true"   
   markfirstmatch="true" runat="server" EnableLoadOnDemand="true"   
   EnableScreenBoundaryDetection="true" DataSourceID="dataSourceVHT" DataTextField="Code"   
   DataValueField="Code" SelectedValue='<%#Bind("VHTCode") %>' > 
        <HeaderTemplate> 
            <table style="width:250px;" cellspacing="0" cellpadding="0">
             <tr> 
                    <td style="width:50px;">Code</td> 
                    <td style="width:200px;">Description</td> 
                 </tr>
             </table>  
        </HeaderTemplate> 
        <ItemTemplate> 
            <table style="width:250px;" class="comboTable" cellspacing="0" cellpadding="0">  
                <tr> 
                    <td style="width:50px;">  
                        <div class='comboItem'>  
                            <%#DataBinder.Eval(Container.DataItem, "Code")%> 
                        </div> 
                    </td> 
                    <td style="width:200px;">  
                        <div class='comboItem'>  
                            <%#DataBinder.Eval(Container.DataItem, "Description")%> 
                        </div> 
                    </td> 
                </tr> 
            </table> 
        </ItemTemplate> 
</telerik:RadComboBox> 

The problem
When the user starts typing in the combobox, it's only filtering on the first column (Code).  I also wants it to filter on the second column.  In fact: on both columns.

Example I have following two items in the combobox:

REQ | Send a request
FIN | Require finishing

When the user starts typing "req" I still want to see both items, and not only the first.

Hristo Valyavicharski
Telerik team
 answered on 08 Mar 2013
1 answer
170 views
When I create a BarSeries that has zero value items I am NOT seeing a label with the value of zero for those items.  Every other item with a non-zero value has a label, but not ones with a value of zero.  This is especially disconcerting for graphs with only one bar item because it appears that the graph did not load at all.

Is there a way to show these zero-value labels?
Danail Vasilev
Telerik team
 answered on 08 Mar 2013
2 answers
221 views
I've implemented a custom handler, however, I get a null exception further down the stack which I can't step through. I'm wondering if I'm doing something wrong or if there is a bug in the handler. It seems to happen after the file upload is successful.

  • I've set HttpHandlerUrl on RadAsynUpload to "~/EDocsAsyncUpload" 
  • I've added the handler in the .config: <add name="EDSExtendedRadAsyncUploader" verb="*" path="EDocsAsyncUpload" type="EDS.DNN.ExtendedAsyncUploadHandler.ExtendedAsyncUploadHandler, EDS.DNN.ExtendedAsyncUploadHandler"/>
  • All permissions are set for the app pool user on the temp folder. I've allow all users access to the handler with this config: <location path="EDocsAsyncUpload"><system.web><authorization><allow users="*"/></authorization></system.web></location>
  • Telerik.Web.UI version is 2012.1.411.35
  • I'm using Windows 7. All browsers regardless of which plugin I use exhibit the same behaviour.

    [Serializable]
    public class ExtendedAsyncUploadResult : IAsyncUploadResult
    {
        public string TempFileName { get; set; }
        public bool Valid { get; set; }
        public string ValidationMessage { get; set; }
        public int ContentLength { get; set; }
        public string ContentType { get; set; }
        public string FileName { get; set; }
        public int Pages { get; set; }
        public ExtendedAsyncUploadResult()
        {
            this.TempFileName = string.Empty;
            this.ValidationMessage = string.Empty;
            this.ContentType = string.Empty;
            this.FileName = string.Empty;
        }
    }
 
public class ExtendedAsyncUploadHandler : Telerik.Web.UI.AsyncUploadHandler
    {
        protected override IAsyncUploadResult Process(UploadedFile file, HttpContext context,
            IAsyncUploadConfiguration configuration, string tempFileName)
        {
            IAsyncUploadResult result = base.Process(file, context, configuration, tempFileName);
            ExtendedAsyncUploadResult extendedResult = base.CreateDefaultUploadResult<ExtendedAsyncUploadResult>(file);
            extendedResult.TempFileName = tempFileName;
             
            try
            {
                string imagePath = Path.Combine(configuration.TempTargetFolder, tempFileName);
                if (File.Exists(imagePath))
                {
                    ImagingService.ImagingServiceClient client
                        = new ImagingService.ImagingServiceClient("NetTcpBinding_IImagingService");
 
                    ImageServiceValidationResult validationResult = client.ValidateImage(
                        imagePath, Path.GetExtension(result.FileName));
 
                    extendedResult.Valid = validationResult.State
                        == ImageServiceValidationResult.ValidState.Valid;
 
                    extendedResult.ValidationMessage = validationResult.Errors.ToString();
                    extendedResult.Pages = validationResult.PageCount;
                }
                else
                {
                    throw new Exception("File does not exist.");
                }
 
            }
            catch (Exception ex)
            {
                extendedResult.ValidationMessage = ex.Message;
                extendedResult.Valid = false;
            }
 
            return extendedResult;
        }
 
    }


I get the following exception.

<!-- 
[NullReferenceException]: Object reference not set to an instance of an object.
   at System.Web.Util.StringUtil.memcpyimpl(Byte* src, Byte* dest, Int32 len)
   at System.Web.Util.StringUtil.UnsafeStringCopy(String src, Int32 srcIndex, Char[] dest, Int32 destIndex, Int32 len)
   at System.Web.HttpWriter.Write(String s)
   at Telerik.Web.UI.AsyncUpload.ResponseWriter.WriteToResponse(String response)
   at Telerik.Web.UI.AsyncUploadHandler.ProcessUploadedFile()
   at Telerik.Web.UI.AsyncUploadHandler.ProcessRequest(HttpContext context)
   at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
   at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)
--> 
Telerik.Web.UI.WebResource.axd?_TSM_HiddenField_=ScriptManager_TSM&compress=1&_TSM_CombinedScripts_=%3b%3bSystem.Web.Extensions%2c+Version%3d4.0.0.0%2c+Culture%3dneutral%2c+PublicKeyToken%3d31bf3856ad364e35%3aen-US%3ac9cbdec3-c810-4e87-846c-fb25a7c08002%3aea597d4b%3ab25378d2%3bTelerik.Web.UI%2c+Version%3d2012.1.411.35%2c+Culture%3dneutral%2c+PublicKeyToken%3d121fae78165ba3d4%3aen-US%3af1f77841-f126-4726-9fc2-0ee8be7d2341%3a16e4e7cd%3af7645509%3a24ee1bba%3af46195d3%3a2003d0b8%3a1e771326%3aaa288e2d%3aed16cbdc%3a874f8ea2%3ac172ae1e%3a19620875%3a9cdfc6e7%3ae330518b%3ac8618e41%3ae4f8f289%3a490a9d4e%3abd8f85e4%3a68f76a79%3a2a2fc429%3a7165f74%3ab7778d6c%3a52af31a4, line 13675 character 8

Peter Filipov
Telerik team
 answered on 08 Mar 2013
Narrow your results
Selected tags
Tags
+? more
Top users last month
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Dean
Top achievements
Rank 1
Leland
Top achievements
Rank 2
Iron
Iron
Iron
Emil
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Dean
Top achievements
Rank 1
Leland
Top achievements
Rank 2
Iron
Iron
Iron
Emil
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?