Telerik Forums
UI for ASP.NET AJAX Forum
4 answers
195 views
Im getting sporadic NullReferenceExceptions when RadAsyncUpload requests Telerik.Web.UI.WebResource.axd.

I have getting error reports from some users of the site that they where not able to use the upload function. They get a javascript error... I have not been able to reproduce this but i am curious if this error could have anything to do with it.

Here is the trace from event log:

Event Type: Warning
Event Source: ASP.NET 2.0.50727.0
Event Category: Web Event 
Event ID: 1309
Date: 2012-02-28
Time: 10:25:30
User: N/A
Computer: D02AR1SWB059
Description:
Event code: 3005 
Event message: An unhandled exception has occurred. 
Event time: 2012-02-28 10:25:30 
Event time (UTC): 2012-02-28 09:25:30 
Event ID: 8ab94a43ea0443cb8a32b31a53089e36 
Event sequence: 709758 
Event occurrence: 50 
Event detail code: 0 
 
Application information: 
    Application domain: /LM/W3SVC/1075933917/ROOT-1-129748762032813225 
    Trust level: Full 
    Application Virtual Path: / 
    Application Path: C:\Apps\405000\WebSites\PublicWeb\ 
    Machine name: D02AR1SWB059 
 
Process information: 
    Process ID: 3672 
    Process name: w3wp.exe 
    Account name: NT AUTHORITY\NETWORK SERVICE 
 
Exception information: 
    Exception type: NullReferenceException 
    Exception message: Object reference not set to an instance of an object. 
 
Request information: 
    Request URL: http://www.mysite.com/Telerik.Web.UI.WebResource.axd?type=rau 
    Request path: /Telerik.Web.UI.WebResource.axd 
    User host address: XX.XX.XXX.XXX 
    User:  
    Is authenticated: False 
    Authentication Type:  
    Thread account name: NT AUTHORITY\NETWORK SERVICE 
 
Thread information: 
    Thread ID: 13 
    Thread account name: NT AUTHORITY\NETWORK SERVICE 
    Is impersonating: False 
    Stack trace:    at Telerik.Web.UI.AsyncUploadHandler.ProcessRequest(HttpContext context)
   at Telerik.Web.UI.HandlerRouter.ProcessHandler(String handlerKey, HttpContext context)
   at Telerik.Web.UI.HandlerRouter.ProcessHandler(HttpContext context)
   at Telerik.Web.UI.WebResource.ProcessRequest(HttpContext context)
   at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
   at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)
 
 
Im using 2011.3.1115.35.

John af P
Top achievements
Rank 2
 answered on 12 Apr 2012
1 answer
252 views
Hi,
I am using Telerik Radcontrols for asp.net Ajax version - 2009 Q3

I would like to know if there a way to save Telerik Radeditor content in db with all formatting but without html tags.

I know there are content and text property.

The text property removes all the formatting. I don't want to remove the formatting but at the same time I would like to not save html tags.

I would appreciate help with this.

Thanks,
Manisha
Rumen
Telerik team
 answered on 12 Apr 2012
6 answers
99 views
Hello,

we have been facing grid column alignment issue for long time.

while column is removed, it creates white spaces. but It got adjusted properly if I click "Ungroup" context menu.

Please refer the screen shot for further details.

Thanks
Venkat
Galin
Telerik team
 answered on 12 Apr 2012
3 answers
129 views
Hi,

Telerik Version: 2011, 3, 1115, 40
Browser Version: IE7 Standards

I have an odd issue with a pretty simple radgrid. In IE7 Standards mode, if a radgrid has cell text that exceeds the length of the cell, it hides the entire grid. If the columns are resized, it will render the grid like it should.

overflow:hidden on class="rgMasterTable rgClipCells rgClipCells" is the problem. I'm just not sure how to fix it.

Here's the grid:

<telerik:RadGrid ID="NotificationRadGrid" OnNeedDataSource="NotificationRadGrid_NeedDataSource" runat="server"
    GridLines="Horizontal">
    <ClientSettings>
        <ClientEvents OnRowSelected="ShowNotification" />                                         
    </ClientSettings>                                       
    <MasterTableView ShowHeader="true" AllowPaging="false" TableLayout="Fixed" ClientDataKeyNames="Notification_ID" ItemStyle-Wrap="False" HeaderStyle-Wrap="False">                                           
        <Columns>
            <telerik:GridBoundColumn  DataField="Notification_Number"
                HeaderStyle-VerticalAlign="Bottom" HeaderStyle-Width="10%"  HeaderStyle-HorizontalAlign="Center"
                HeaderText="Number" ItemStyle-VerticalAlign="Top"
                 SortExpression="Notification_Number" UniqueName="Notification_Number">                                                   
            </telerik:GridBoundColumn>
            <telerik:GridBoundColumn  DataField="Notification_Title"
                HeaderStyle-VerticalAlign="Bottom" HeaderStyle-Width="65%"
                HeaderText="Title" ItemStyle-VerticalAlign="Top"
                SortExpression="Notification_Title" UniqueName="Notification_Title">                                                      
            </telerik:GridBoundColumn>
            <telerik:GridBoundColumn  DataField="Notification_Priority"
                HeaderStyle-VerticalAlign="Bottom" HeaderStyle-Width="10%"  HeaderStyle-HorizontalAlign="Center"
                HeaderText="Priority" ItemStyle-VerticalAlign="Top"
                SortExpression="Notification_Priority" UniqueName="Notification_Priority">                                                            
            </telerik:GridBoundColumn>
            <telerik:GridBoundColumn  DataField="Notification_Published_Date"
                HeaderStyle-VerticalAlign="Bottom" HeaderStyle-Width="15%" HeaderStyle-HorizontalAlign="Center"
                HeaderText="Published" ItemStyle-VerticalAlign="Top"
                SortExpression="Notification_Published_Date" UniqueName="Notification_Published_Date" DataType="System.DateTime" DataFormatString="{0:MM/dd/yyyy}">      
            </telerik:GridBoundColumn>
        </Columns>                                           
        <CommandItemTemplate>
        </CommandItemTemplate>
    </MasterTableView>
</telerik:RadGrid>

Any help would be appreciated.

Smith
Jayesh Goyani
Top achievements
Rank 2
 answered on 12 Apr 2012
3 answers
95 views
I used radgrid with splitter when i resize to narrow panel,i found footer show strange

i also capture image before and after risze as well


thank you and regards
artit.s
Jayesh Goyani
Top achievements
Rank 2
 answered on 12 Apr 2012
2 answers
156 views

Hi

I have some issue with loading image in RadImageEditor. It is working fine in IE but not in any other browser (tested in FF and Chrome).  I have a RadListBox in page and in its selectedIndexchanged event it will add corresponding image to RadImageEditor. The problem is when I ajaxify the controls (tried with both RadAjaxManager and RadAjaxPanel), it is working only in IE. Otherwise it will work in all browsers. Please give some idea regarding this issue. (I am using Telerik dll version 2012, 1, 215, 35)

 

I am pasting my code for the reference.

 
ASPX:

<telerik:RadAjaxPanel runat="server" ID="RadAjaxPanel1">
                 <telerik:RadListBox ID="RadListBox1" runat="server" 
                    SelectionMode="Multiple" EnableDragAndDrop="true" AutoPostBack="true" OnSelectedIndexChanged="RadListBox1_SelectedIndexChanged">
                 </telerik:RadListBox>
          
            <telerik:RadImageEditor ID="RadImageEditor1" runat="server" Top="500px" Left="430px"
                   OnImageLoading="RadImageEditor1_ImageLoading">
            </telerik:RadImageEditor>
  </telerik:RadAjaxPanel>

Also tried this approach to ajaxify the controls:-
<telerik:RadAjaxManager ID="RadAjaxManager1" runat="server" >
           <AjaxSettings>
               <telerik:AjaxSetting AjaxControlID="RadAjaxManager1">
                   <UpdatedControls>
                       <telerik:AjaxUpdatedControl ControlID="RadListBox1" />
                       <telerik:AjaxUpdatedControl ControlID="RadImageEditor1" />
                   </UpdatedControls>
               </telerik:AjaxSetting>
               <telerik:AjaxSetting AjaxControlID="RadListBox1">
                   <UpdatedControls>
                             <telerik:AjaxUpdatedControl ControlID="RadImageEditor1" />
                   </UpdatedControls>
               </telerik:AjaxSetting>
           </AjaxSettings>
       </telerik:RadAjaxManager>

C#:
protected void RadImageEditor1_ImageLoading(object sender, ImageEditorLoadingEventArgs args)
    {
        args.Cancel = true;
    }
 
   protected void RadListBox1_SelectedIndexChanged(object sender, EventArgs e)
    {
       //retrieving corresponding image from database
 
        byte[] buffer = null;
        buffer = (byte[])SqlCommand.ExecuteScalar();
        MemoryStream memStream = new MemoryStream(buffer);
        MemoryStream memStream1 = new MemoryStream();
        System.Drawing.Bitmap.FromStream(memStream).Save(memStream1, System.Drawing.Imaging.ImageFormat.Png);
        RadImageEditor1.ImageUrl = "data:image/png;base64," + Convert.ToBase64String(memStream1.ToArray());
   }

Thanks,
Bavya.

Bavya
Top achievements
Rank 1
 answered on 12 Apr 2012
3 answers
95 views
Hello all.  I am looking to purchase Telerik for some work I am doing for a client.  In making my case for purchase, I came accross the tabstrip. I found the following demo which does something I need to implement:

http://demos.telerik.com/aspnet-ajax/tabstrip/examples/functionality/validationgroup/defaultcs.aspx

The question I have is that when it calls the validation group before switching to each tab does it/can it submit the form on the page or call a sub in the code behind.  Basically what the client wants is that the form in each tab should save when the user switches tabs.  If the form is missing required information, it wouldn't let them switch tabs until the current form/tab is properly filled out and submitted/saved.  Is that what this control would do?  It would save me a lot of work.  Thanks in advance for any help you can give.

John
Dimitar Terziev
Telerik team
 answered on 12 Apr 2012
4 answers
147 views
i have a radgrid which users the radfilter to filter the datasource, filter works fine but if the first page says 2 pages and i click to go to page 2 it reloads into it inital first load state with all the data. any ideas

here is my code

<%@ Control Language="C#" AutoEventWireup="true" CodeFile="ProductSearch.ascx.cs" Inherits="Controls_ProductSearch" %>
 
<telerik:RadAjaxManager ID="RadAjaxManager1" runat="server" >
<AjaxSettings>
    <telerik:AjaxSetting AjaxControlID="RadGridProductsSearch">
        <UpdatedControls>                   
            <telerik:AjaxUpdatedControl ControlID="RadGridProductsSearch" LoadingPanelID="RadAjaxLoadingPanel1"></telerik:AjaxUpdatedControl>
        </UpdatedControls>
    </telerik:AjaxSetting>             
    <telerik:AjaxSetting AjaxControlID="BtnProductSearch">
        <UpdatedControls>                   
            <telerik:AjaxUpdatedControl ControlID="RadGridProductsSearch" LoadingPanelID="RadAjaxLoadingPanel1"></telerik:AjaxUpdatedControl>
        </UpdatedControls>
    </telerik:AjaxSetting>      
</AjaxSettings>   
</telerik:RadAjaxManager>
<telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" Transparency="20" BackColor="#ffffff" runat="server">
    <asp:Image ID="Image1" runat="server" AlternateText="Loading..." BorderWidth="0px" ImageUrl="~/Includes/images/ajax/Loading.gif" />
</telerik:RadAjaxLoadingPanel>
<fieldset>
<ol>
    <li>
        <asp:Label ID="LblCategory" runat="server" Text="Search by Category" AssociatedControlID="ComboCategoryName"></asp:Label>
        <telerik:RadComboBox ID="ComboCategoryName" runat="server" Width="240"></telerik:RadComboBox>
    </li>
    <li class="small">
    <span> or </span>
    </li>
    <li>
        <asp:Label ID="LblKeywords" runat="server" Text="by Keyword" AssociatedControlID="ComboKeyword"></asp:Label>
        <telerik:RadComboBox ID="ComboKeyword" runat="server" Width="240" Filter="Contains" MarkFirstMatch="true" ChangeTextOnKeyBoardNavigation="false"></telerik:RadComboBox>
    </li>
    <li class="submit">
        <telerik:RadButton ID="BtnProductSearch" OnClick="BtnProductSearch_Click" runat="server" Text="Submit"></telerik:RadButton>                
    </li>
</ol>   
<telerik:RadFilter ID="SearchRadFilter" runat="server" Visible="false" ShowApplyButton="true" ExpressionPreviewPosition="None" ShowLineImages="true" FilterContainerID="RadGridProductsSearch"></telerik:RadFilter>   
</fieldset
<telerik:RadGrid ID="RadGridProductsSearch" runat="server"  SkinID="products" AllowPaging="true" PagerStyle-AlwaysVisible="true" BorderWidth="0" OnNeedDataSource="ProductsSearch_NeedDataSource" OnItemDataBound="ProductsSearch_ItemDataBound" OnItemCreated="ProductsSearch_ItemCreated" AllowSorting="true" AllowFilteringByColumn="true">
<GroupingSettings CaseSensitive="false"/>
<MasterTableView AutoGenerateColumns="false"  IsFilterItemExpanded="False">
<PagerTemplate>
    <asp:Panel ID="PagerPanel" runat="server" CssClass="pager-holder">
        <div class="pager">
            <span class="pagerPrev">
                <asp:LinkButton ID="ButtonPrev" runat="server" OnClientClick="changePage('prev'); return false;" CommandName="Page" CommandArgument="Prev" Text="<" CssClass="PagerButton PrevPage" />                           
            </span>
            <asp:Panel runat="server" ID="NumericPagerPlaceHolder" CssClass="pagerNumber" />
            <span class="pagerNext">
                <asp:LinkButton ID="ButtonNext" runat="server" OnClientClick="changePage('next'); return false;" CommandName="Page" CommandArgument="Next" Text=">" CssClass="PagerButton NextPage" />
            </span>
        </div>
        <span class="pagerSize">
            <span>View</span>
            <telerik:RadComboBox ID="RadComboBox1" DataSource="<%# new object[]{10, 20, 30, 40, 50} %>" SelectedValue='<%# DataBinder.Eval(Container, "Paging.PageSize") %>' runat="server" Width="60" OnClientSelectedIndexChanged="RadComboBox1_SelectedIndexChanged"></telerik:RadComboBox>
        </span>
    </asp:Panel>
</PagerTemplate>
<PagerStyle Mode="NumericPages" PageButtonCount="10" />            
    <Columns>
        <telerik:GridTemplateColumn HeaderText="Product Name" DataField="Name" SortExpression="Name" UniqueName="Name">
            <ItemTemplate>
                <asp:HyperLink ID="ProductLink" runat="server" NavigateUrl='<%# Functions.GetUrl(DataBinder.Eval(Container, "DataItem.NodeAliasPath")) %>' Text='<%# Eval("Name") %>'></asp:HyperLink>                           
            </ItemTemplate>
        </telerik:GridTemplateColumn
        <telerik:GridTemplateColumn HeaderText="NodeParentID" Visible="false" UniqueName="NodeParentID" DataField="NodeParentID">
        <ItemTemplate>
            <asp:Label ID="NodeParentID" runat="server"></asp:Label>
        </ItemTemplate>
        </telerik:GridTemplateColumn>                   
        </Columns>                 
</MasterTableView>        
</telerik:RadGrid
 <telerik:RadCodeBlock ID="RadCodeBlock1" runat="server">
<script type="text/javascript">
var tableView = null;
function pageLoad(sender, args) {
    tableView = $find("<%= RadGridProductsSearch.ClientID %>").get_masterTableView();
}
 
function RadComboBox1_SelectedIndexChanged(sender, args) {
    tableView.set_pageSize(sender.get_value());
}
 
function changePage(argument) {
    tableView.page(argument);
}
 
function RadNumericTextBox1_ValueChanged(sender, args) {
    tableView.page(sender.get_value());
}
</script>
</telerik:RadCodeBlock>
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;
using CMS.CMSHelper;
using CMS.GlobalHelper;
using Telerik.Web.UI;
 
public partial class Controls_ProductSearch : System.Web.UI.UserControl
{
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            LoadCategories();
            LoadProducts();
        }
    }
 
    void LoadCategories()
    {
        DataSet ds = TreeHelper.SelectNodes(CMSContext.CurrentAliasPath + "/%", false, "adam.productCategory", null, "Name Asc", -1, true);
 
        if (!DataHelper.DataSourceIsEmpty(ds))
        {
            ComboCategoryName.DataSource = ds;
            ComboCategoryName.DataTextField = "Name";
            ComboCategoryName.DataValueField = "NodeID";
            ComboCategoryName.DataBind();
 
            ComboCategoryName.Items.Insert(0, new RadComboBoxItem("Select Category"));
        }
    }
 
    void LoadProducts()
    {
        DataSet ds = TreeHelper.SelectNodes(CMSContext.CurrentAliasPath + "/%", false, "adam.product", null, "Name Asc", -1, true);
 
        if (!DataHelper.DataSourceIsEmpty(ds))
        {
            ComboKeyword.DataSource = ds;
            ComboKeyword.DataTextField = "Name";
            ComboKeyword.DataValueField = "Name";
            ComboKeyword.DataBind();
 
            ComboKeyword.Items.Insert(0, new RadComboBoxItem("Select Category"));
        }
    }
 
    protected void ProductsSearch_ItemDataBound(object sender, Telerik.Web.UI.GridItemEventArgs e)
    {
        if (e.Item is GridDataItem)
        {
            DataRowView dr = (DataRowView)e.Item.DataItem;
 
            GridDataItem item = (GridDataItem)e.Item;
            Label nodeParentID = item.FindControl("NodeParentID") as Label;
 
            CMS.TreeEngine.TreeNode node = TreeHelper.SelectSingleNode((int)DataHelper.GetDataRowViewValue(dr, "NodeParentId"));
            if (node != null)
            {
                nodeParentID.Text = node.DocumentName;
            }
        }
    }
 
    protected void ProductsSearch_NeedDataSource(object source, GridNeedDataSourceEventArgs e)
    {
        DataSet ds = TreeHelper.SelectNodes(CMSContext.CurrentAliasPath + "/%", false, "adam.product", null, "Name Asc", -1, true);
 
        if (!DataHelper.DataSourceIsEmpty(ds))
        {
 
            RadGridProductsSearch.DataSource = ds;
        }
        else
        {
            RadGridProductsSearch.Visible = false;
        }
    }
 
    protected void ProductsSearch_ItemCreated(object sender, Telerik.Web.UI.GridItemEventArgs e)
    {
        if (e.Item is GridPagerItem)
        {
            GridPagerItem gridPager = e.Item as GridPagerItem;
            Control numericPagerControl = gridPager.GetNumericPager();
            numericPagerControl.ID = "";
 
            Control placeHolder = gridPager.FindControl("NumericPagerPlaceHolder");
            placeHolder.Controls.Add(numericPagerControl);
        }
    }
 
    protected void BtnProductSearch_Click(object sender, EventArgs e)
    {
        SearchRadFilter.RootGroup.Expressions.Clear();
 
        if (ComboCategoryName.SelectedIndex != 0)
        {
            RadFilterGroupExpression category = new RadFilterGroupExpression();
            category.GroupOperation = RadFilterGroupOperation.And;
            RadFilterEqualToFilterExpression<int> expr = new RadFilterEqualToFilterExpression<int>("NodeParentID");
            expr.Value = Convert.ToInt32(ComboCategoryName.SelectedValue);
            SearchRadFilter.RootGroup.AddExpression(category);
            category.AddExpression(expr);
        }
 
        if (ComboKeyword.SelectedIndex != 0)
        {
            RadFilterGroupExpression product = new RadFilterGroupExpression();
            product.GroupOperation = RadFilterGroupOperation.And;
            RadFilterEqualToFilterExpression<string> expr2 = new RadFilterEqualToFilterExpression<string>("Name");
            expr2.Value = ComboKeyword.SelectedValue;
            SearchRadFilter.RootGroup.AddExpression(product);
            product.AddExpression(expr2);
        }
 
        SearchRadFilter.FireApplyCommand();
    }
}
Paul
Top achievements
Rank 1
 answered on 12 Apr 2012
5 answers
187 views
RadGrid Support,
I understand that RadGrid is 508 compliant.

However I noticed that some of the links on your website are not working.
http://www.telerik.com/help/aspnet-ajax/grdkeyfeatures.html (Search for 508 and click on the link)

Can you please point me to the proper links for 508 compliance  ?

Regards,
Kaushik
Martin
Telerik team
 answered on 12 Apr 2012
0 answers
39 views
I have a problem with custom filtering of Rad grid. If one column has a custom filter and if its been filtered,  this ignores all of the other columns' filters
Radhika
Top achievements
Rank 1
 asked on 12 Apr 2012
Narrow your results
Selected tags
Tags
+? more
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?