12 Answers, 1 is accepted
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.
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.
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.
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.
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;
}
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 ?
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.
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
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.
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;
}
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.