Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
70 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
98 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
188 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
171 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
388 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
146 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
193 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
1 answer
64 views
Hello,

I would like to know if the RadSocialShare supports Google Analytics integration? If this feature is supported, please let me know how to deal with this.

Thank you,
Damian.
Princy
Top achievements
Rank 2
 answered on 08 Mar 2013
1 answer
83 views
In mode load on demand:
When click on expand item multiply, then load icons are duplicated and does not hided
Example was attached. 
Boyan Dimitrov
Telerik team
 answered on 08 Mar 2013
1 answer
290 views
Hi,

I have the following scenario to be achieved. I want to display a captcha in numeric form and want the user to perform an arithmetic calculation and enter the result in captcha textbox and hence perform a validation. Is this possible using RadCaptcha?

Please help,
Berk.
Princy
Top achievements
Rank 2
 answered on 08 Mar 2013
Narrow your results
Selected tags
Tags
+? more
Top users last month
Miljana
Top achievements
Rank 2
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Bronze
Cynthia
Top achievements
Rank 1
John
Top achievements
Rank 1
Iron
Mozart
Top achievements
Rank 1
Iron
Veteran
Want to show your ninja superpower to fellow developers?
Top users last month
Miljana
Top achievements
Rank 2
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Bronze
Cynthia
Top achievements
Rank 1
John
Top achievements
Rank 1
Iron
Mozart
Top achievements
Rank 1
Iron
Veteran
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?