protected void RadScheduler1_OnDataBound(object sender, EventArgs e) { foreach (Resource res in RadScheduler1.Resources.GetResourcesByType("User Name")) { RadScheduler1.Resources.Remove(res); } List<Resource> list = new List<Resource>(); foreach (Telerik.Web.UI.Appointment a in RadScheduler1.Appointments.GetAppointmentsInRange(RadScheduler1.VisibleRangeStart, RadScheduler1.VisibleRangeEnd)) { Resource userName = a.Resources.GetResourceByType("User Name"); if (userName != null && !list.Contains(userName)) { list.Add(userName); } foreach (ListItem l in cblUsers.Items) { if (l.Selected) { Resource name = new Resource("User Name", int.Parse(l.Value), l.Text); if (!list.Contains(name)) { list.Add(name); } } } //using (ProNetData d = new ProNetData()) //{ // var users = (from c in d.AppointmentUsersAssigned.Include("User") // select new { UserID = c.UserID, UserName = c.User.LastName + ", " + c.User.FirstName.Substring(0, 1) }).ToList(); // foreach (var v in users) // { // Resource name = new Resource("User Name", v.UserID, v.UserName); // if (!list.Contains(name)) // { // list.Add(name); // } // } //} } list.Sort(delegate(Resource resA, Resource resB) { return resA.Text.CompareTo(resB.Text); }); RadScheduler1.Resources.AddRange(list); RadScheduler1.ResourceTypes.FindByName("User Name").AllowMultipleValues = true; }<
telerik:RadToolTipManager ID="PLToolTipManager" runat="server" Position="BottomCenter" Animation="Fade" OnAjaxUpdate="OnAjaxUpdateToolTip" Skin="Web20" Width="380px" Height="250px" Style="font-size: 18px; text-align: center; font-family: Arial;">
</telerik:RadToolTipManager>
<telerik:RadAjaxManagerProxy ID="RadAjaxManager3" runat="server">
<AjaxSettings>
<telerik:AjaxSetting AjaxControlID="fvEdit">
<UpdatedControls>
<telerik:AjaxUpdatedControl ControlID="chkPL" />
<telerik:AjaxUpdatedControl ControlID="PLToolTipManager" />
</UpdatedControls>
</telerik:AjaxSetting>
</AjaxSettings>
</telerik:RadAjaxManagerProxy>
I used a proxy because I already have an Ajax manager on the page with the grid. Here is the aspx for the grid
Here is the code behind that adds the control to the tooltiplist
protected
void chkPLOnDataBinding(object sender, EventArgs e)
{
CheckBox chkPL = (CheckBox)sender;
string myClientID = chkPL.ClientID;
RadToolTipManager RadToolTipManager1 = (RadToolTipManager)this.FindControl("PLToolTipManager");
int itemid = (int)fvEdit.DataKey.Value;
PLToolTipManager.TargetControls.Add(myClientID, itemid.ToString(), true);
}
The OnAjaxUpdateToolTip event never happens.
Here is the aspx code of the page with the grid. - this works fine
<
telerik:RadAjaxManager ID="RadAjaxManager1"
runat="server">
<AjaxSettings>
<telerik:AjaxSetting AjaxControlID="RadGrid1">
<UpdatedControls>
<telerik:AjaxUpdatedControl ControlID="RadGrid1" />
<telerik:AjaxUpdatedControl ControlID="RadToolTipManager1" />
</UpdatedControls>
</telerik:AjaxSetting>
</AjaxSettings>
</
telerik:RadAjaxManager>
<telerik:RadToolTipManager ID="RadToolTipManager1" OffsetY="-1" HideEvent="LeaveToolTip"
Width="200" Height="200" runat="server" EnableShadow="true" OnAjaxUpdate="OnAjaxUpdate" RelativeTo="Element"
Position="MiddleRight">
</telerik:RadToolTipManager>
I would really appreciate help with this. I have spent many hours on this already
Thanks
Judith
GridPagerItem pagerItem = e.Item as GridPagerItem; RadButton newButton = new RadButton(); newButton.ID = "btnSaveNext"; newButton.Text = "Save & Next"; newButton.CommandName = "SaveNext"; newButton.Icon.PrimaryIconUrl = "../images/icons/save16x16.gif"; ((Table)e.Item.Cells[0].Controls[0]).Rows[0].Cells[0].Controls.Add(newButton);SpellChecker spellChecker = new SpellChecker("~/App_Data/RadSpell");spellChecker.Text = "Some sample text tecct";SpellCheckErrors errors = spellChecker.Errors;SpellChecker spellChecker = new SpellChecker("~/App_Data/RadSpell");spellChecker.Text = "Some sample text tecct";SpellCheckErrors errors = spellChecker.CheckText();spellChecker.CustomDictionarySource.DictionaryPath"~/App_Data/RadSpell"spellChecker.CustomDictionarySource.Language"en-US"
System.NullReferenceException: Object reference not set to an instance of an object. at Telerik.Web.Apoc.Pdf.PdfFontCreator.CreateBase14Font(String pdfFontID, Base14Font base14) at Telerik.Web.Apoc.Pdf.PdfFontCreator.MakeFont(String pdfFontID, Font font) at Telerik.Web.Apoc.Pdf.FontSetup.AddToResources(PdfFontCreator fontCreator, PdfResources resources) at Telerik.Web.Apoc.Render.Pdf.PdfRenderer.StopRenderer() at Telerik.Web.Apoc.StreamRenderer.StopRenderer() at Telerik.Web.Apoc.Fo.FOTreeBuilder.Parse(XmlReader reader) if (e.Item is GridDataItem) { //e.Item.Style["color"] = "white"; //Default color for headeritem/dataitem foreach (TableCell cell in e.Item.Cells) { cell.Style["font-family"] = "Arial Unicode MS"; cell.Style["font-size"] = "10px"; } } if (e.Item is GridFooterItem) { foreach (TableCell cell in e.Item.Cells) { cell.Style["font-family"] = "Arial Unicode MS"; cell.Style["color"] = "#000"; cell.Style["font-size"] = "8px"; } } if (e.Item is GridCommandItem) { //.Style["font-weight"] = "bolder"; e.Item.Style["font-size"] = "10px"; e.Item.Style["font-family"] = "Arial Unicode MS"; //Set UNICODE font //e.Item.Style["color"] = "#990099"; }I am using radeditor in view
My view is in update panel and multiview is also in update panel
i have published the website and when i check on live then that editor first time expands and get out of table boundries
when refersh the page then it get corrects.
when i disable all the update panels then see that after clearing the history then that problem does not come
what to do i have to use update panel for partial post back
Regards
Awais
I am getting the following message in a user control I have created:
Script control 'rrLocationRationg' is not a registered script control. Script controls must be registered using RegisterScriptControl() before calling RegisterScriptDescription().
Parameter name: scriptControl
I have the following code working, however if I uncomment the code in RadCBLocations_ItemsRequested I get the above error. I need to be able to do this as the data pulled back is to large unless there is some type of filtering done. Any suggestion would be greatley appreciated.
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="LocationDDL.ascx.cs" Inherits="Phoenix.UserControls.LocationDDL" %> <%@ Register TagPrefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI" %> <asp:ScriptManagerProxy ID="ScriptManagerProxy1" runat="server"> </asp:ScriptManagerProxy> <telerik:RadAjaxPanel ID="rapRefNo" runat="server"> <telerik:RadComboBox ID="RadCBLocations" Runat="server" EmptyMessage="Choose a Location" HighlightTemplatedItems="true" EnableLoadOnDemand="true" DropDownWidth="755px" Height="200px" Width="253px" onitemsrequested="RadCBLocations_ItemsRequested"> <HeaderTemplate> <table style="width: 730px" cellspacing="0" cellpadding="0"> <tr> <td style="width: 200px;"> Name</td> <td style="width: 200px;"> Address</td> <td style="width: 150px;"> City</td> <td style="width: 30px;"> State</td> <td style="width: 150px;"> Rating</td> </tr> </table> </HeaderTemplate> <ItemTemplate> <table style="width: 730px" cellspacing="0" cellpadding="0"> <tr> <td style="width: 200px;"> <%# DataBinder.Eval(Container, "Text")%> </td> <td style="width: 200px;"> <%# DataBinder.Eval(Container, "Attributes['Address']")%> </td> <td style="width: 150px;"> <%# DataBinder.Eval(Container, "Attributes['City']")%> </td> <td style="width: 30px;"> <%# DataBinder.Eval(Container, "Attributes['State']")%> </td> <td style="width: 150px;"> <telerik:RadRating ID="rrLocationRating" runat="server" ItemCount="5" OnRate="rrLocationRating_Rate" Value = <%#Convert.ToDouble(DataBinder.Eval(Container, "Attributes['Rating']"))%> SelectionMode="Continuous" Precision = "Item" Orientation="Horizontal" AutoPostBack="true" ClientIDMode="Predictable"> </telerik:RadRating> </td> </tr> </table> </ItemTemplate> </telerik:RadComboBox> </telerik:RadAjaxPanel> if (_userId != 0) { _searchString = "alab"; if (_searchString.Length > 1) { //Fill the Locations list List<Location> currentLocations = PhoenixData.getLocations(_searchString, false, true, false, false, false); //Sort the locations by name currentLocations.Sort(delegate(Location location1, Location location2) { return location2.Name.CompareTo(location1.Name); }); //Create the favorites class to retrieve favorite locations FavoritesRetriever myFavorites = new FavoritesRetriever(FavoritesRetriever.favoriteTables.Location, _userId); //get the locations back sorted by rating ratedLocations = myFavorites.RetrieveRatedEntities<Location>(currentLocations); if (!Page.IsPostBack) { string emptyStr = ""; //Populate the rated items in the list foreach (Location loc in ratedLocations) { RadComboBoxItem item = new RadComboBoxItem(); item.Text = loc.Name; item.Value = loc.Id.ToString(); if (loc.Address != null) { item.Attributes.Add("Address", emptyStr + loc.Address.Address1); item.Attributes.Add("City", emptyStr + loc.Address.City); item.Attributes.Add("State", emptyStr + loc.Address.State); } item.Attributes.Add("Rating", loc.Rating.ToString()); RadCBLocations.Items.Add(item); item.DataBind(); } } } } else { throw (new MissingFieldException("UserID is required")); } } /// <summary> /// Method rrStopRating_Rate created on 1/11/2011 /// </summary> /// <remarks> /// Saves the changed rating back to the database /// </remarks> protected void rrLocationRating_Rate(object sender, EventArgs e) { //Gets the stop id by parsing the id of the changed rating to get the index, which is then applied to ratedstops to get the stop id int objectid = ratedLocations[int.Parse(((RadRating)sender).Parent.ClientID.Substring(((RadRating)sender).Parent.ClientID.LastIndexOf('i') + 1))].Id; //Gets the new value of the favorite int value = int.Parse(((RadRating)sender).DbValue.ToString()); PhoenixData.SaveFavorite(2, objectid, _userId, value); } /// <summary> /// </summary> /// <value></value> /// <remarks> /// The unique id of the user you want the list to retrieve the favorites for. /// </remarks> public int UserId { set { _userId = value; } } public string SearchString { set { _searchString = value; } } protected void RadCBLocations_ItemsRequested(object sender, RadComboBoxItemsRequestedEventArgs e) { // _searchString = e.Text; // if (e.Text.Length > 1) // { // //Fill the Locations list // List<Location> currentLocations = PhoenixData.getLocations(_searchString, false, true, false, false, false); // //Sort the locations by name // currentLocations.Sort(delegate(Location location1, Location location2) { return location2.Name.CompareTo(location1.Name); }); // //Create the favorites class to retrieve favorite locations // FavoritesRetriever myFavorites = new FavoritesRetriever(FavoritesRetriever.favoriteTables.Location, _userId); // //get the locations back sorted by rating // ratedLocations = myFavorites.RetrieveRatedEntities<Location>(currentLocations); // //if (!Page.IsPostBack) // //{ // string emptyStr = ""; // //Populate the rated items in the list // foreach (Location loc in ratedLocations) // { // RadComboBoxItem item = new RadComboBoxItem(); // item.Text = loc.Name; // item.Value = loc.Id.ToString(); // if (loc.Address != null) // { // item.Attributes.Add("Address", emptyStr + loc.Address.Address1); // item.Attributes.Add("City", emptyStr + loc.Address.City); // item.Attributes.Add("State", emptyStr + loc.Address.State); // } // item.Attributes.Add("Rating", loc.Rating.ToString()); // RadCBLocations.Items.Add(item); // item.DataBind(); // } // } } } }