Telerik Forums
UI for ASP.NET AJAX Forum
2 answers
118 views
I have a form with a grid in it that uses a LinqDataSource. The Selecting event is wired up to return the number of rows. I use a RadAjaxManager and a RadAjaxLoadingPanel. However, when I click on a paging control the grid "flashes" and the loading "wheel" does not appear like the 300,000 Linq demo shows. The paging does work though. How do I make the loading stuff work? I have supplied the code for a cutback version of what I am doing in a real web app.

<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="WebForm8.aspx.cs" Inherits="CharityCheck.WebForm8" %> 
<%@ Register assembly="Telerik.Web.UI" namespace="Telerik.Web.UI" tagprefix="telerik" %> 
 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 
 
<html xmlns="http://www.w3.org/1999/xhtml">  
<head runat="server">  
    <title></title>  
</head> 
<body> 
    <form id="form1" runat="server">  
    <div> 
        <asp:Panel ID="Panel1" runat="server">  
            <telerik:RadScriptManager ID="RadScriptManager1" runat="server" ScriptMode="Release" /> 
            <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server" > 
                <AjaxSettings> 
                    <telerik:AjaxSetting AjaxControlID="RadGrid1">  
                        <UpdatedControls> 
                            <telerik:AjaxUpdatedControl ControlID="RadGrid1" LoadingPanelID="RadAjaxLoadingPanel1" /> 
                        </UpdatedControls> 
                    </telerik:AjaxSetting> 
                </AjaxSettings> 
            </telerik:RadAjaxManager> 
            <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" /> 
            <telerik:RadGrid ID="RadGrid1" runat="server" AllowPaging="True"   
                Skin="Office2007" GridLines="None"   
                AutoGenerateColumns="False"   
                DataSourceID="LinqDataSource1" > 
                <MasterTableView TableLayout="Fixed" > 
                    <Columns> 
                        <telerik:GridBoundColumn DataField="CompanyName" DefaultInsertValue=""   
                            HeaderText="CompanyName" SortExpression="CompanyName"   
                            UniqueName="CompanyName" ReadOnly="True" > 
                        </telerik:GridBoundColumn> 
                        <telerik:GridBoundColumn DataField="ID" DefaultInsertValue="" 
                            HeaderText="ID" SortExpression="ID" UniqueName="ID"   
                            DataType="System.Int32" ReadOnly="True">  
                        </telerik:GridBoundColumn> 
                    </Columns> 
                </MasterTableView> 
                <ClientSettings>    
                    <selecting allowrowselect="True" /> 
                </ClientSettings>    
                <PagerStyle Position="TopAndBottom" /> 
            </telerik:RadGrid> 
 
            <asp:LinqDataSource ID="LinqDataSource1" runat="server"   
                AutoPage="False" ContextTypeName="CharityCheck.CharityCheckEntities"   
                onselecting="LinqDataSource1_Selecting"   
                TableName="CompanySet" OrderBy="CompanyName"   
                Select="new (CompanyName, ID)">  
            </asp:LinqDataSource> 
        </asp:Panel>         
    </div> 
    </form> 
</body> 
</html> 
 
using System;  
using System.Collections.Generic;  
using System.Linq;  
using System.Web;  
using System.Web.UI;  
using System.Web.UI.WebControls;  
using Infragistics.WebUI.UltraWebGrid;  
using Telerik.Web.UI;  
 
namespace CharityCheck  
{  
    public partial class WebForm8 : System.Web.UI.Page  
    {  
        protected void Page_Load(object sender, EventArgs e)  
        {  
 
        }  
 
        protected void LinqDataSource1_Selecting(object sender, LinqDataSourceSelectEventArgs e)  
        {  
            CharityCheckEntities entities = new CharityCheckEntities();  
            var data = from company in entities.CompanySet  
                       select company;  
            e.Arguments.TotalRowCount = data.Count();  
        }  
    }  
}  
 
David Simmonds
Top achievements
Rank 1
 answered on 05 May 2010
3 answers
111 views


Hi,

I am facing a strange issue with RadTextBox: I have a RadtextBox inside a RadGrid, when I click a button(outside the Grid) the value in the Textbox vanishes, it isnot maintaining the value. why is it so?

Another point to note is, this happens only for IE 8, the textbox is maintaining its value in IE 6.

What could be the reason?

Please let me know the solution for this issue...

-Liji Gilesh 
Nikolay Rusev
Telerik team
 answered on 05 May 2010
9 answers
792 views
Hello,

I am trying to hook a RadScheduler up to a WebService, but cannot even get the page to render, even after following these directions to the letter. Some relevant facts: I am using VS 2010 b2 and IIS7. I've tried this in both a WebForms project and an MVC project, and I get the same error each time. I'll post the stack trace below. Let me know if there's any other information I can provide you.

Thanks,

Daniel

Stack trace:
Server Error in '/' Application.

An entry with the same key already exists.

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. 

Exception Details: System.ArgumentException: An entry with the same key already exists.

Source Error: 

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Stack Trace: 

[ArgumentException: An entry with the same key already exists.]
   System.Collections.Specialized.ListDictionary.Add(Object key, Object value) +7689715
   System.Web.UI.ClientScriptManager.RegisterExpandoAttribute(String controlId, String attributeName, String attributeValue, Boolean encode) +337
   System.Web.UI.ScriptRegistrationManager.RegisterExpandoAttribute(Control control, String controlId, String attributeName, String attributeValue, Boolean encode) +115

[TargetInvocationException: Exception has been thrown by the target of an invocation.]
   System.RuntimeMethodHandle._InvokeMethodFast(IRuntimeMethodInfo method, Object target, Object[] arguments, SignatureStruct& sig, MethodAttributes methodAttributes, RuntimeType typeOwner) +0
   System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean skipVisibilityChecks) +639
   System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) +38
   System.RuntimeType.InvokeMember(String name, BindingFlags bindingFlags, Binder binder, Object target, Object[] providedArgs, ParameterModifier[] modifiers, CultureInfo culture, String[] namedParams) +3262
   System.Web.UI.WebControls.ValidatorCompatibilityHelper.RegisterExpandoAttribute(Control control, String controlId, String attributeName, String attributeValue, Boolean encode) +333
   System.Web.UI.WebControls.BaseValidator.AddAttributesToRender(HtmlTextWriter writer) +381
   System.Web.UI.WebControls.RequiredFieldValidator.AddAttributesToRender(HtmlTextWriter writer) +25
   System.Web.UI.WebControls.WebControl.RenderBeginTag(HtmlTextWriter writer) +32
   System.Web.UI.WebControls.BaseValidator.Render(HtmlTextWriter writer) +512
   System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +246
   System.Web.UI.WebControls.WebControl.RenderContents(HtmlTextWriter writer) +15
   System.Web.UI.WebControls.WebControl.Render(HtmlTextWriter writer) +52
   System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +246
   System.Web.UI.WebControls.WebControl.RenderContents(HtmlTextWriter writer) +15
   System.Web.UI.WebControls.WebControl.Render(HtmlTextWriter writer) +52
   System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +246
   System.Web.UI.WebControls.WebControl.RenderContents(HtmlTextWriter writer) +15
   System.Web.UI.WebControls.WebControl.Render(HtmlTextWriter writer) +52
   System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +246
   System.Web.UI.WebControls.WebControl.RenderContents(HtmlTextWriter writer) +15
   System.Web.UI.WebControls.WebControl.Render(HtmlTextWriter writer) +52
   System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +246
   System.Web.UI.WebControls.WebControl.RenderContents(HtmlTextWriter writer) +15
   System.Web.UI.WebControls.WebControl.Render(HtmlTextWriter writer) +52
   System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +246
   System.Web.UI.WebControls.WebControl.RenderContents(HtmlTextWriter writer) +15
   System.Web.UI.WebControls.WebControl.Render(HtmlTextWriter writer) +52
   System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +246
   Telerik.Web.UI.SchedulerFormContainer.Render(HtmlTextWriter writer) +453
   System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +246
   System.Web.UI.WebControls.WebControl.RenderContents(HtmlTextWriter writer) +15
   System.Web.UI.WebControls.WebControl.Render(HtmlTextWriter writer) +52
   System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +246
   System.Web.UI.WebControls.WebControl.RenderContents(HtmlTextWriter writer) +15
   System.Web.UI.WebControls.WebControl.Render(HtmlTextWriter writer) +52
   System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +246
   Telerik.Web.UI.RadScheduler.RenderContents(HtmlTextWriter writer) +65
   Telerik.Web.UI.RadDataBoundControl.Render(HtmlTextWriter writer) +127
   System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +246
   System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +246
   System.Web.UI.HtmlControls.HtmlForm.RenderChildren(HtmlTextWriter writer) +315
   System.Web.UI.HtmlControls.HtmlContainerControl.Render(HtmlTextWriter writer) +48
   System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +246
   System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +246
   System.Web.UI.Page.Render(HtmlTextWriter writer) +40
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +5274

Version Information: Microsoft .NET Framework Version:4.0.30128; ASP.NET Version:4.0.30128.1
Mike Taylor
Top achievements
Rank 1
 answered on 05 May 2010
3 answers
156 views
I think I've found a bug with the 2008.1.415 grid.  Here's a very simple sample:

<telerik:RadGrid ID="RadGrid1" runat="server" GridLines="None" 
        Skin="Default" OnNeedDataSource="RadGrid1_NeedDataSource"> 
    <MasterTableView Width="100%"> 
    </MasterTableView> 
    <ClientSettings EnableRowHoverStyle="true"> 
        <Resizing AllowRowResize="false" /> 
    </ClientSettings> 
</telerik:RadGrid> 
 

I noticed that EnableRowHoverStyle will cause flickering when moving the cursor between *columns* (hover color turns off, then turns on again immediately).  If the cursor stays on the same row, but I move from column to column within that row, the hover highlighting should not be flickering, but it does.

However, if AllowRowResize is enabled, for whatever reason, this flickering does not happen!  The Grid demo page (the skin chooser) which has row hover enabled also has row resize enabled, so the flicker isn't seen in the demos.


Pavel
Telerik team
 answered on 05 May 2010
2 answers
108 views
Hello Sir,

When i Open Rad Window and when i close it then i m firinng btnclick event on Client Close Of Window.
After parent page postback again rad window open Autometically.

How Can i avoid it.
my client close function is as below.

function

 

OnClientClose(oWnd, args) {

 

$get(

'<%=btnRefresh.ClientID%>').click();

 

}


Please Help Me

Thanks.
Chandan Kumar
Chandan Kumar
Top achievements
Rank 1
 answered on 05 May 2010
3 answers
314 views
hi,
        
      I am Doing Drag and Drop Between Node , after Drag and Drop , the nodes should be Sorted . 
i want to know how to do sorting in client side and serverside ..

I am using Asp.net ajax q1 2010 ,net 3.5
 

Thanks & Regards
lijijose
Veronica
Telerik team
 answered on 05 May 2010
1 answer
69 views

RadAjaxLoadingPanel image is not dispalying in Q1 2010, What's the new path on this version. 


<

 

 

telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server">

 

 

 

<img alt="Loading..."

 

 

 

src='<%= RadAjaxLoadingPanel.GetWebResourceUrl(Page, "Telerik.Web.UI.Skins.Default.Ajax.loading3.gif") %>'

 

 

 

style="border:0;" />

 

 

 

</telerik:RadAjaxLoadingPanel>

Thanks!

 

Pavlina
Telerik team
 answered on 05 May 2010
2 answers
104 views

Im trying to change the "javascript:___dopostback" message in the header linkbutton (sort column).

Im handling the ItemDataBound event, and using this code:

   if (e.Item is GridHeaderItem)
   {
    ((LinkButton)e.Item.Cells[2].Controls[0]).Attributes.Add("onmouseover", "window.status='';");
   }

But Its not working, someone tried it before?

 

 

 

 

André Freitas
Top achievements
Rank 1
 answered on 05 May 2010
2 answers
132 views
I found that I can set the MaxFileInputsCount property to only have a single upload control, but the remove and add buttons are still visible.  Can these be removed without resorting to script to hide them?

Thanks.
Jamie
Top achievements
Rank 1
 answered on 05 May 2010
1 answer
121 views
Hi,


I have implemented same functionality like explained in following link:

http://demos.telerik.com/aspnet-classic/grid/examples/AJAX/OutOfGrid/DefaultCS.aspx


But, I need one extra function in this on click of Reset button to reset the columns ordering if changes any ways.


Thanks

Ankesh
Tsvetoslav
Telerik team
 answered on 05 May 2010
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jake
Top achievements
Rank 1
RBarnes
Top achievements
Rank 1
Iron
Iron
Rami
Top achievements
Rank 1
Iron
Veteran
Nathan
Top achievements
Rank 1
Kumeri
Top achievements
Rank 1
Iron
Veteran
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jake
Top achievements
Rank 1
RBarnes
Top achievements
Rank 1
Iron
Iron
Rami
Top achievements
Rank 1
Iron
Veteran
Nathan
Top achievements
Rank 1
Kumeri
Top achievements
Rank 1
Iron
Veteran
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?