Telerik Forums
UI for ASP.NET AJAX Forum
2 answers
195 views

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

 

Dobromir
Telerik team
 answered on 19 Jan 2011
3 answers
205 views

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();
        //        }
        //    }
        }
  
     }
}
Yana
Telerik team
 answered on 19 Jan 2011
1 answer
229 views
Is it possible to sort a column by first number then text? I have an ID column with the following data:

CE01
FE05
112
24
DE4
98

Is there any way to sort by first integer then character to give:

24
98
112
CE01
DE4
FE05

Obviously character sorting only will result in 112 being the first row, 24, then 98 etc.

Thanks,
Daniel.
Pavlina
Telerik team
 answered on 19 Jan 2011
2 answers
75 views
Hi
please find the attached the Screen capture.
We badly require to reomve blue colour from the image.
please find the attached ment
Vasil
Telerik team
 answered on 19 Jan 2011
1 answer
86 views
I am trying to add a radcombobox to every cell in the calender. but I get this error when I run the project:  
If I add a label as shown in one of your example it works fine but doesnt work with a radcombobox.
Page cannot be null. Please ensure that this operation is being performed in the context of an ASP.NET request.
 Protected Sub RadCalendar1_DayRender(ByVal sender As Object, ByVal e As Telerik.Web.UI.Calendar.DayRenderEventArgs)
            Dim ddl As New RadComboBox
            ddl.Items.Add(New RadComboBoxItem("", ""))
            ddl.Items.Add(New RadComboBoxItem("H", "H"))
            ddl.Items.Add(New RadComboBoxItem("V", "V"))
            ddl.Items.Add(New RadComboBoxItem("I", "I"))
            ddl.Items.Add(New RadComboBoxItem("T", "T"))
            e.Cell.Controls.Add(ddl)
    End Sub


Heres the calendar source
 <telerik:RadCalendar ID="RadCalendar1" Runat="server" MultiViewColumns="3"
                   SelectedDate="" ViewSelectorText="x" ondayrender="RadCalendar1_DayRender"
                   CssClass="RadCalendarMultiView RadCalendarMultiView_Default">
                   <dayoverstyle cssclass="rcHover" />
                   <fastnavigationstyle cssclass="RadCalendarMonthView RadCalendarMonthView_Default" />
                   <disableddaystyle cssclass="rcDisabled" />
                   <WeekendDayStyle CssClass="rcWeekend" />
                   <viewselectorstyle cssclass="rcViewSel" />
                   <SelectedDayStyle CssClass="rcSelected" />
                   <calendartablestyle cssclass="rcMainTable" />
                   <OtherMonthDayStyle CssClass="rcOtherMonth" />
                   <outofrangedaystyle cssclass="rcOutOfRange" />      
               </telerik:RadCalendar>


Please advice how can I show a rad combo box in there..
Marin
Telerik team
 answered on 19 Jan 2011
3 answers
212 views
Hi,

I'm using the numerictextbox control with autopostback set to true. This results in postsbacks on changes as expected.
However when the value was already 0 and the user then clears that field to an empty string no postback occurs. The other way around, from empty string to 0 does post back.

How can I make sure clearing a 0 value to an empty string still results in a postback?

Thanks,
Frank.
Frank
Top achievements
Rank 1
 answered on 19 Jan 2011
1 answer
404 views
Hi,

In my RadGrid HeaderTemplate one checkBox control is there.My requirement is i need to get this checkBox control id RadGrid_DataBound event.

Note:
I need to get this checkBox control id RadGrid_DataBound event,not in RadGrid_ItemDataBound event.

How can i achieve this requirement.Please help me...

Thanks in advance...
Princy
Top achievements
Rank 2
 answered on 19 Jan 2011
1 answer
260 views
I have a RadGrid where EditMode="popup" and the contents of the form is created dynamically by RadGrid.

If there is an error when the saves the data I'd like to show a message in the popup form and keep it open.

In the event UpdateCommand, i'm doing my logic.  If I get an error I set e.Canceled  = true and the popup stays open.
I haven't figured out how to add a message (for example a new LiteralControl) to the popup form.
Any ideas on how to do it?

Princy
Top achievements
Rank 2
 answered on 19 Jan 2011
1 answer
81 views
Hi,

In my RadGrid HeaderTemplate one checkBox control is there.My requirement is i need to get this checkBox control id RadGrid_DataBound event.

How can i achieve this requirement.Please help me...

Thanks in advance...

Shinu
Top achievements
Rank 2
 answered on 19 Jan 2011
1 answer
69 views
Hi Shinu,

 I am using RadCalendar and RadWindow in my app. I am displaying the holidays on my calendar.. when i am clicking on the date radwindow is opening...and immediately closed.. for that i given autopostback="false" in the RadCalendar... After giving that... the holidays is not dispalying on the calendar.. Tell me what is the solution for that..........could you please help me...
Mira
Telerik team
 answered on 19 Jan 2011
Narrow your results
Selected tags
Tags
+? more
Top users last month
Bohdan
Top achievements
Rank 3
Iron
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Elliot
Top achievements
Rank 1
Iron
Iron
Iron
Sunil
Top achievements
Rank 1
Cynthia
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Bohdan
Top achievements
Rank 3
Iron
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Elliot
Top achievements
Rank 1
Iron
Iron
Iron
Sunil
Top achievements
Rank 1
Cynthia
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?