Spesivtsev
Top achievements
Rank 1
Spesivtsev
asked on 04 Feb 2008, 11:10 AM
Hello, all!
Now I test scenario where I dynamically load user control with Grid. Sorting and paging of grid work good, but Filtering don't work and IE return error on page: " 'null' is null or not an object ".
If I use RadControls this scenario work without errors.
Please, help me in this problem.
3 Answers, 1 is accepted
0
Hi Spesivtsev,
Unfortunately I am not able to reproduce your problem. I am attaching here a working project following your scenario. Please review it and tell us if you are doing something different or paste your code in this thread for further review. Thus we will be able to advice you further.
Best regards,
Iana
the Telerik team
Instantly find answers to your questions at the new Telerik Support Center
Unfortunately I am not able to reproduce your problem. I am attaching here a working project following your scenario. Please review it and tell us if you are doing something different or paste your code in this thread for further review. Thus we will be able to advice you further.
Best regards,
Iana
the Telerik team
Instantly find answers to your questions at the new Telerik Support Center
0
Spesivtsev
Top achievements
Rank 1
answered on 05 Feb 2008, 04:24 PM
Hi, Iana,
In my scenario I must load different user controls, so I save name of control in Session and reload it during every postback, also I use AjaxManager to ajaxify this process.
Here is code of my default page, in my latest test I used your user control.
| <%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %> |
| <%@ 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>Untitled Page</title> |
| </head> |
| <body> |
| <form id="form1" runat="server"> |
| <asp:ScriptManager ID="ScriptManager1" runat="server" /> |
| <table> |
| <tr> |
| <td> |
| <asp:Button ID="LoadButton" runat="server" Text="Load Grid" |
| onclick="LoadButton_Click" /> |
| </td> |
| </tr> |
| <tr> |
| <td> |
| <asp:Panel ID="LoadingPanel" runat="server"> |
| </asp:Panel> |
| </td> |
| </tr> |
| <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server"> |
| <AjaxSettings> |
| <telerik:AjaxSetting AjaxControlID="LoadButton"> |
| <UpdatedControls> |
| <telerik:AjaxUpdatedControl ControlID="LoadingPanel" /> |
| </UpdatedControls> |
| </telerik:AjaxSetting> |
| </AjaxSettings> |
| </telerik:RadAjaxManager> |
| </table> |
| </form> |
| </body> |
| </html> |
| using System; |
| using System.Configuration; |
| using System.Data; |
| using System.Web; |
| using System.Web.UI; |
| using System.Web.UI.HtmlControls; |
| using System.Web.UI.WebControls; |
| using System.Web.UI.WebControls.WebParts; |
| public partial class _Default : System.Web.UI.Page |
| { |
| private string CurrentControl |
| { |
| get |
| { |
| return Session["CurrentControl"] == null ? string.Empty : (string)Session["CurrentControl"]; |
| } |
| set |
| { |
| Session["CurrentControl"] = value; |
| } |
| } |
| protected void Page_Init(object sender, EventArgs e) |
| { |
| LoadCurrentControl(); |
| } |
| protected void Page_Load(object sender, EventArgs e) |
| { |
| } |
| private void LoadCurrentControl() |
| { |
| if (CurrentControl != "") |
| { |
| Control lvControlForLoad = (Control)LoadControl(CurrentControl); |
| string lvsUserControlID = CurrentControl.Split('.')[0]; |
| lvControlForLoad.ID = lvsUserControlID.Replace("/", "").Replace("~", ""); |
| LoadingPanel.Controls.Clear(); |
| LoadingPanel.Controls.Add(lvControlForLoad); |
| } |
| } |
| protected void LoadButton_Click(object sender, EventArgs e) |
| { |
| CurrentControl = "WebUserControl.ascx"; |
| LoadCurrentControl(); |
| } |
| } |
0
Hi Yuriy,
You are correct that there were problems with the grid filtering in the presented scenario. This was a bug which is already fixed. Please find the latest Telerik.WebUI.dll file as an attachment. Add the Telerik.Web.UI assembly to the /bin folder of your application and let us know if this helps.
Best regards,
Maria Ilieva
the Telerik team
Instantly find answers to your questions at the new Telerik Support Center
You are correct that there were problems with the grid filtering in the presented scenario. This was a bug which is already fixed. Please find the latest Telerik.WebUI.dll file as an attachment. Add the Telerik.Web.UI assembly to the /bin folder of your application and let us know if this helps.
Best regards,
Maria Ilieva
the Telerik team
Instantly find answers to your questions at the new Telerik Support Center