This is a migrated thread and some comments may be shown as answers.

a is undefined

12 Answers 193 Views
TabStrip
This is a migrated thread and some comments may be shown as answers.
bala
Top achievements
Rank 1
bala asked on 02 Nov 2009, 08:51 AM

When tabstrip is used along with radajax manager error (a is undefined) is raised in "Sys.UI.Control.initializeBase(this);this._element=a;a.control=this" 

12 Answers, 1 is accepted

Sort by
0
Paul
Telerik team
answered on 02 Nov 2009, 02:21 PM
Hello bala,

Could you please open a support ticket and send a simple running project (incl. CSS, images, DB backup and so on) demonstrating the problems. In that way we can reproduce and pinpoint the problems you're facing on our side, understand the logic of your application and provide a solution.

Greetings,
Paul
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
Ravi Keshwani
Top achievements
Rank 1
answered on 15 Apr 2010, 11:46 AM
I am facing the same issue and stucked from past 3 hrs . please look into it urgent
0
Yana
Telerik team
answered on 15 Apr 2010, 12:08 PM
Hi Ravi,

We had a similar issue in on of the older versions, please try the latest Q1 2010 release.

Best regards,
Yana
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
0
Ravi Keshwani
Top achievements
Rank 1
answered on 19 Apr 2010, 11:54 AM
Dear Yana,

 I have downloaded the version but the issue is still persisting.There is one radgrid from which I when click on the "add new" icon cancells the process of adding a new record in the grid and adds a new pageview with a usercontrol and radtabstrip is set to selected. At this time this 'a is undefined' javascript error is coming.

 Please help for sure.
0
Yana
Telerik team
answered on 19 Apr 2010, 12:14 PM
Hi Ravi Keshwani,

Could you please paste some simple code which will help us reproduce the issue? Thanks

Regards,
Yana
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
0
Ravi Keshwani
Top achievements
Rank 1
answered on 19 Apr 2010, 12:53 PM

 

This is the usercontrol  which has a grid and On clicking Add new a usercontrol is added in the pageview.

 

 

protected void Page_Load(object sender, EventArgs e)

 

{

 

RadAjaxManager AjaxMan = this.Page.Master.FindControl("MasterAjaxManager") as RadAjaxManager;

 

 

if (!Page.IsPostBack)

 

{

 

RadMultiPage rmpUser = (this.Page.Master.FindControl("ContentPlaceHolder1").FindControl("RadMultiPage1") as RadMultiPage);

 

 

RadTabStrip rtsUser = (this.Page.Master.FindControl("ContentPlaceHolder1").FindControl("RadTabStrip1") as RadTabStrip);

 

AjaxMan.AjaxSettings.AddAjaxSetting(rgAttendeeList, rmpUser);

AjaxMan.AjaxSettings.AddAjaxSetting(rgAttendeeList, rtsUser);

AjaxMan.AjaxSettings.AddAjaxSetting(rgAttendeeList, rgAttendeeList);

 

 

}

 

}

 

protected

 

void rgAttendeeList_ItemCommand(object source, GridCommandEventArgs e)

 

 

{

 

RadTabStrip rtsUser = (this.Page.Master.FindControl("ContentPlaceHolder1").FindControl("RadTabStrip1") as RadTabStrip);

 

 

RadMultiPage rmpUser = (this.Page.Master.FindControl("ContentPlaceHolder1").FindControl("RadMultiPage1") as RadMultiPage);

 

 

 

Label lblInfo = (this.Page.Master.FindControl("ContentPlaceHolder1").FindControl("lblInfo") as Label);

 

ClearSession();

 

switch (e.CommandName)

 

{

 

case "InitInsert":

 

 

if (e.CommandArgument.ToString().Equals("Copy"))

 

{

 

////LastOperation = "Copy";

 

System.

Guid userId = new System.Guid(e.Item.OwnerTableView.DataKeyValues[e.Item.ItemIndex]["UserId"].ToString());

 

UserService.

UserClient proxyUser = new ePlannerPro2Client.UserService.UserClient();

 

System.

Guid eventId = new System.Guid(Session["EventId"].ToString());

 

 

try

 

{

Session.Add(

"CopyUser", proxyUser.LoadById(userId, eventId));

 

}

 

catch { }

 

 

finally

 

{

 

if (proxyUser != null)

 

{

proxyUser.Close();

proxyUser =

null;

 

}

}

}

 

else

 

{

LastOperation =

"Insert";

 

}

 

//e.Canceled = true;

 

DestroyOldPageViews();

GoToNextPageView(rtsUser.Tabs[1]);

 

 

break;

 

 

case "Edit":

 

 

 

if (Session["CreateUsers"] != null)

 

{

epp2ClientPL.

UsersProperties[] users = Session["CreateUsers"] as epp2ClientPL.UsersProperties[];

 

 

if (users != null && users.Count() > 0)

 

{

System.

Guid eventAttendeeId = new System.Guid(e.Item.Cells[4].Text);

 

epp2ClientPL.

UsersProperties user = users.Where(u => u.EventAttendeeId == eventAttendeeId).SingleOrDefault();

 

 

if (user != null && user.UserName.Length > 0)

 

{

lblInfo.Attributes[

"style"] = "visibility:visible";

 

lblInfo.Text =

"You are working for : " + user.SalutationName + " " + user.FullName;

 

 

 

rtsUser.Tabs[1].Enabled =

true;

 

rtsUser.Tabs[2].Enabled = user.EligibleForTravel;

rtsUser.Tabs[3].Enabled = user.EligibleForAccommodation;

rtsUser.Tabs[4].Enabled =

true;

 

rtsUser.Tabs[5].Enabled =

true;

 

rtsUser.Tabs[1].Selected =

true;

 

 

Session.Add(

"EditUser", user);

 

DestroyOldPageViews();

GoToNextPageView(rtsUser.Tabs[1]);

}

}

}

LastOperation =

"Edit";

 

e.Canceled =

true;

 

 

 

break;

 

 

case "Cancel":

 

 

//LastOperation = "Cancel";

 

 

break;

 

}

}

 

 

private void GoToNextPageView(RadTab radTab)

 

{

 

RadMultiPage multiPage = (this.Page.Master.FindControl("ContentPlaceHolder1").FindControl("RadMultiPage1") as RadMultiPage);

 

 

RadPageView PersonalInfoPageView = multiPage.FindPageViewByID("PersonalInfo");

 

radTab.Selected =

true;

 

radTab.Enabled =

true;

 

 

if (PersonalInfoPageView == null)

 

{

PersonalInfoPageView =

new RadPageView();

 

PersonalInfoPageView.ID =

"PersonalInfo";

 

 

multiPage.PageViews.Add(PersonalInfoPageView);

 

radTab.PageViewID = PersonalInfoPageView.ID;

}

 

PersonalInfoPageView.Selected =

true;

 

radTab.PageView.Selected =

true;

 

 

}

0
Ravi Keshwani
Top achievements
Rank 1
answered on 19 Apr 2010, 01:09 PM
Dear Yana,

 I have found the code which was doing the issue. The statement which is commented in the itemcommand event " e.Canceled = true; " was causing the issue. If u got what I am trying to achieve the functionality that A grid from which edit and new operations should be performed in the different tab and pageview using a usercontrol added dynamically.

How can I do this ? by adding a custom button in the grid ?
0
Yana
Telerik team
answered on 22 Apr 2010, 09:18 AM
Hello Ravi Keshwani,

I tried to reproduce the issue with the provided code and the latest release Q1 SP1 (2010.4.15) but to no avail. I've attached my test pages. Could please modify them so that we can observe this issue? Thanks
 
Best wishes,
Yana
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
0
Ravi Keshwani
Top achievements
Rank 1
answered on 22 Apr 2010, 09:53 AM
Dear Yana,

     When I tried to run the sample app sent by you I am getting below error when I click on "Add new record " of the grid.

    Microsoft JScript runtime error: Sys.InvalidOperationException: Two components with the same     id     'ctl00_ContentPlaceHolder1_RadMultiPage1' can't be added to the application.

Please be sure that I am loading the usercontrols dynamically in the pageviews as explained in "TabStrip / Load on Demand RadPageView " Sample.

Thanks

Ravi
0
Yana
Telerik team
answered on 22 Apr 2010, 10:00 AM
Hello Ravi Keshwani,

This is known issue in Q1 release, here it's described how to fix it.

All the best,
Yana
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
0
Ravi Keshwani
Top achievements
Rank 1
answered on 04 May 2010, 08:18 AM
Hi Yana,

 The solutions provided in the page does'nt work for me. Another case where this error is coming is say from a page I open a page in radwindow. Then I refresh a control of calling page using below code. This causes the a is undefined issue. I am sure that it was not in your previous versions.


 

function CloseAndRebind() {

 

 

// alert("In CloseAndRebind");

 

 

GetRadWindow().Close();

GetRadWindow().BrowserWindow.refreshTopics(

"RebindTopics");

 

}

 

function GetRadWindow() {

 

 

var oWindow = null;

 

 

if (window.radWindow) oWindow = window.radWindow; //Will work in Moz in all cases, including clasic dialog

 

 

else if (window.frameElement.radWindow) oWindow = window.frameElement.radWindow; //IE (and Moz as well)

 

 

return oWindow;

 

}

0
Yana
Telerik team
answered on 07 May 2010, 11:37 AM
Hi Ravi Keshwani,

Could you please send us the code? Thanks

Sincerely yours,
Yana
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
Tags
TabStrip
Asked by
bala
Top achievements
Rank 1
Answers by
Paul
Telerik team
Ravi Keshwani
Top achievements
Rank 1
Yana
Telerik team
Share this question
or