Telerik Forums
UI for ASP.NET AJAX Forum
2 answers
242 views
hi i need to apply style cssclass at code behind for the last row in the rad grid. the grid may be binding the data dynamically.

any idea? please help
Jose Montero
Top achievements
Rank 1
 answered on 26 Mar 2010
8 answers
231 views
Hi

I am getting following error during load time after added the loading panel into the grid.
"Microsoft JScript runtime error: 'Sys.WebForms.PageRequestManager' is null or not an object".

And interrups the running of the program..
ASPX code is:

 

 

 

 <telerik:RadAjaxManager ID="radAjaxManager" runat="server" ClientEvents-OnRequestStart="requestStart" 
                OnAjaxSettingCreating="radAjaxManager_AjaxSettingCreating">  
                <AjaxSettings> 
                    <telerik:AjaxSetting AjaxControlID="RadGrid1">  
                        <UpdatedControls> 
                            <telerik:AjaxUpdatedControl ControlID="RadGrid1" LoadingPanelID="ajaxLoadingPanel" /> 
                        </UpdatedControls> 
                    </telerik:AjaxSetting> 
                </AjaxSettings> 
                <ClientEvents OnRequestStart="requestStart" /> 
            </telerik:RadAjaxManager> 
            <telerik:RadAjaxLoadingPanel ID="ajaxLoadingPanel" runat="server" Height="75px" 
                Width="75px" HorizontalAlign="Left" BackgroundPosition="BottomLeft" Direction="LeftToRight">  
                <div style="position: absolute; left: 500px; top: 200px">  
                    <img alt="Loading..." src='<%= RadAjaxLoadingPanel.GetWebResourceUrl(Page, "Telerik.Web.UI.Skins.Default.Ajax.loading.gif") %>' 
                        style="border: 0px;" /> 
                </div> 
            </telerik:RadAjaxLoadingPanel> 

I could not find out where i made mistake..so help me find out the issue
--Thanks

Bruno
Top achievements
Rank 2
 answered on 26 Mar 2010
4 answers
168 views
Dear Sir,
               
   I have to insert appointments in the website (web control) and retrieve the appointments in the windows application (win control). Is it possible ?

i am using both the web & win rad controls for a same project  which is created in the web & now it it converting that same project as window application. In that, RadSchedule control in both web & win rad control's recurrence rule field 's (format) data is varying while inserting a new appointment. But i am using a single database (sqlserver 2005). Can i insert  same type of recurrence rule field 's (format) data in both.

Please reply as soon as possible..

By S Suriya Narayanan
Vassil Petev
Telerik team
 answered on 26 Mar 2010
2 answers
93 views
Hello all -

I am new to using the Telerik controls and am encountering a problem that I cannot seem to find a solution to. It's probably a simple fix and am hoping someone can point me in the right direction.  I have added the RadAjaxPanel and a panel bar to one of my pages. Withing the ItemTemplate tags I have added a div with several labels and textboxes. When I look at the page in design view or through a browser the text for the labels does not appear? If I highlight the area in a browser I can see the text so it appears the its being rendered with the text color set to white. If in design view I set the skin attribute to "Default" then the text shows up.

Any thoughts?

Thanks in advance!
Simon
Top achievements
Rank 1
 answered on 26 Mar 2010
2 answers
869 views
I'm getting the following error and I can' track down the reason.  I have a screen where the user selects criteria. I build the query behind the scenes for the onneeddatasource event  when they click search. On initial load I just display a dummy grid. When I click on search the page postback, assembles and runs the query and returns the correct grid as  expected.  If I click on search a second time or peform any type of post back I get the Failed to load viewstate.

Hopefully you can help me solve this mystery.  Thanks

Error:
Server Error in '/AARates' Application.  
--------------------------------------------------------------------------------  
 
Failed to load viewstate.  The control tree into which viewstate is being loaded must match the control tree that was used to save viewstate during the previous request.  For example, when adding controls dynamically, the controls added during a post-back must match the type and position of the controls added during the initial request.   
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.   
 
Exception Details: System.Web.HttpException: Failed to load viewstate.  The control tree into which viewstate is being loaded must match the control tree that was used to save viewstate during the previous request.  For example, when adding controls dynamically, the controls added during a post-back must match the type and position of the controls added during the initial request.  
 
Source Error:   
 
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.    
 
Stack Trace:   
 
 
[HttpException (0x80004005): Failed to load viewstate.  The control tree into which viewstate is being loaded must match the control tree that was used to save viewstate during the previous request.  For example, when adding controls dynamically, the controls added during a post-back must match the type and position of the controls added during the initial request.]  
   System.Web.UI.Control.LoadViewStateRecursive(Object savedState) +306  
   System.Web.UI.Control.LoadChildViewStateByIndex(ArrayList childState) +134  
   System.Web.UI.Control.LoadViewStateRecursive(Object savedState) +221  
   System.Web.UI.Control.LoadChildViewStateByIndex(ArrayList childState) +134  
   System.Web.UI.Control.LoadViewStateRecursive(Object savedState) +221  
   System.Web.UI.Control.LoadChildViewStateByIndex(ArrayList childState) +134  
   System.Web.UI.Control.LoadViewStateRecursive(Object savedState) +221  
   System.Web.UI.Control.LoadChildViewStateByIndex(ArrayList childState) +134  
   System.Web.UI.Control.LoadViewStateRecursive(Object savedState) +221  
   System.Web.UI.Control.LoadChildViewStateByIndex(ArrayList childState) +134  
   System.Web.UI.Control.LoadViewStateRecursive(Object savedState) +221  
   System.Web.UI.Control.LoadChildViewStateByIndex(ArrayList childState) +134  
   System.Web.UI.Control.LoadViewStateRecursive(Object savedState) +221  
   System.Web.UI.Control.LoadChildViewStateByIndex(ArrayList childState) +134  
   System.Web.UI.Control.LoadViewStateRecursive(Object savedState) +221  
   System.Web.UI.Control.LoadChildViewStateByIndex(ArrayList childState) +134  
   System.Web.UI.Control.LoadViewStateRecursive(Object savedState) +221  
   System.Web.UI.Control.LoadChildViewStateByIndex(ArrayList childState) +134  
   System.Web.UI.Control.LoadViewStateRecursive(Object savedState) +221  
   System.Web.UI.Control.LoadChildViewStateByIndex(ArrayList childState) +134  
   System.Web.UI.Control.LoadViewStateRecursive(Object savedState) +221  
   System.Web.UI.Control.LoadChildViewStateByIndex(ArrayList childState) +134  
   System.Web.UI.Control.LoadViewStateRecursive(Object savedState) +221  
   System.Web.UI.Control.LoadChildViewStateByIndex(ArrayList childState) +134  
   System.Web.UI.Control.LoadViewStateRecursive(Object savedState) +221  
   System.Web.UI.Control.LoadChildViewStateByIndex(ArrayList childState) +134  
   System.Web.UI.Control.LoadViewStateRecursive(Object savedState) +221  
   System.Web.UI.Page.LoadAllState() +312  
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1661  
 
   
 

Aspx Grid:
            <telerik:RadPane ID="gridPane" runat="server" Height="400px" Scrolling="None" OnClientResized="ClientResized" > 
                <telerik:RadGrid ID="ARGrid1" runat="server" Width="97%" Height="95%" GridLines="None" PageSize="40" 
                     AllowSorting="true" AllowPaging="true" Visible="true" OnNeedDataSource="ARGrid1_NeedDataSource" OnItemCreated="ARGrid1_ItemCreated" 
                     OnItemCommand="ARGrid1_ItemCommand" ShowStatusBar="true" ShowGroupPanel="true" Skin="Outlook">  
                     <MasterTableView AllowFilteringByColumn="true" AllowMultiColumnSorting="true" Width="100%" CommandItemDisplay="Top" AutoGenerateColumns="true">  
                        <HeaderStyle Width="200px" /> 
                        <Columns></Columns>  
                        <CommandItemSettings AddNewRecordText="" ShowExportToPdfButton="true" ShowExportToWordButton="true" ShowExportToExcelButton="true" ShowExportToCsvButton="true" /> 
                     </MasterTableView> 
                     <ClientSettings AllowColumnsReorder="true" AllowDragToGroup="true" ColumnsReorderMethod="Reorder" EnableRowHoverStyle="true">  
                        <Scrolling AllowScroll="true" UseStaticHeaders="true" SaveScrollPosition="false" FrozenColumnsCount="1" ScrollHeight="100%" /> 
                        <Resizing ClipCellContentOnResize="false" AllowColumnResize="true" /> 
                     </ClientSettings> 
                     <GroupingSettings ShowUnGroupButton="true" /> 
                     <ExportSettings IgnorePaging="true" OpenInNewWindow="true">  
                        <Pdf AllowPrinting="true" /> 
                     </ExportSettings> 
                </telerik:RadGrid> 
            </telerik:RadPane> 

Code Behind:
        protected void btnSearch_Click(object sender, EventArgs e)  
        {  
            bool pageerrors = false;  
 
            //Clear any existing messages  
            PgMessage.ClearMessages();  
 
            //Run validation before running report  
            //Check date rage  
            if (rdpbegin.SelectedDate == null || rdpend.SelectedDate == null)  
            {  
                PgMessage.DisplayMessage(PageMessage.MessageType.Warning, "* Invalid dates. Date range must be input");  
                pageerrors = true;  
            }  
            if (rdpbegin.SelectedDate > rdpend.SelectedDate)  
            {  
                PgMessage.DisplayMessage(PageMessage.MessageType.Warning, "* Date range is not valid");  
                pageerrors = true;  
            }  
 
            //Check List Type  
            if (rcbListType.SelectedIndex == 0)  
            {  
                PgMessage.DisplayMessage(PageMessage.MessageType.Warning, "* List type must be selected");  
                pageerrors = true;  
            }  
 
            //Ensure at least one code is in rlbCodes  
            if (rlbCodes.Items.Count == 0)  
            {  
                PgMessage.DisplayMessage(PageMessage.MessageType.Warning, "* At least one code must be entered");  
                pageerrors = true;  
            }  
 
            //Run report if no page errors  
            if (!pageerrors)   
            {   
                 
                 //ARGrid1.Visible = true;  
                ARGrid1.Rebind();  
 
                lnkbtnSave.Enabled = true;  
                lnkbtnSaveAs.Enabled = true;  
            }  
        }  
 
        private DataSet BuildRptQuery()  
        {  
            bool pullDaily = true;  
            string strquery = string.Empty;  
            DataSet AADataRpt;  
             
 
//            last = new DateTime(DateTime.Today.Year, DateTime.Today.Month, 1).AddDays(-1);   
 
            //Get dates  
            if (rdpbegin.SelectedDate != null)  
            {  
                DateTime begindt = new DateTime(rdpbegin.SelectedDate.Value.Year, rdpbegin.SelectedDate.Value.Month, 1);  
 
                if (begindt <= DateTime.Today.AddDays(-90))  
                {  
                    pullDaily = false;  
                    intbegindt = rdpbegin.SelectedDate.Value.Year * 100 + rdpbegin.SelectedDate.Value.Month;  
                    intenddt = rdpend.SelectedDate.Value.Year * 100 + rdpend.SelectedDate.Value.Month;  
                }  
                else  
                {  
                    strbegindt = rdpbegin.SelectedDate.ToString();  
                    strenddt = rdpend.SelectedDate.ToString();  
                }  
 
 
                //Get field name to search code list on  
                UserListType ult = UserListType.getByKey(Convert.ToInt16(rcbListType.SelectedValue));  
 
                switch (ult.Code)  
                {  
                    case "MBUS":  
                        codetype = "MbuCode";  
                        break;  
                    case "BOB":  
                        codetype = "BookOfBusiness";  
                        break;  
                    case "LOB":  
                        codetype = "LineOfBusiness";  
                        break;  
                    case "MBU":  
                        codetype = "MbuCode";  
                        break;  
                    case "CASE":  
                        codetype = "CaseCode";  
                        break;  
                    case "CONTR":  
                        codetype = "ContractCode";  
                        break;  
                }  
 
                codelist = BuildCodeListQuery();  
 
                //Get fields to return from the grid  
                fieldlist = string.Empty;  
                IList<RadListBoxItem> collection = rlbFields.CheckedItems;  
                foreach (RadListBoxItem item in collection)  
                {  
 
 
                    if (!pullDaily)  
                    {  
                        switch (item.Value)  
                        {  
                            case "ProductionDate":  
                                fieldlistfieldlist = fieldlist + "YearMo " + " [" + item.Text + "],";  
                                break;  
 
                            case "AADataAuditID":  
                                fieldlistfieldlist = fieldlist + "0" + " [" + item.Text + "],";  
                                break;  
                            default:  
                                fieldlistfieldlist = fieldlist + item.Value + " [" + item.Text + "],";  
                                break;  
                        }  
 
                    }  
                    else  
                    {  
                        fieldlistfieldlist = fieldlist + item.Value + " [" + item.Text + "],";  
                    }  
                }  
                fieldlistfieldlist = fieldlist.TrimEnd(',');  
 
 
                //Set report query  
                if (pullDaily)  
                {  
                    strquery = "Select " + fieldlist + " from AAData where ProductionDate >= '" + strbegindt + "' AND ";  
                    strquerystrquery = strquery + "ProductionDate <= '" + strenddt + "' AND " + codetype + " IN (" + codelist + ")";  
                    AADataAADataRpt = AAData.getAAReport(strquery);  
                }  
                else  
                {  
                    strquery = "Select " + fieldlist + " from AADataMonthly where YearMo >= " + intbegindt + " AND ";  
                    strquerystrquery = strquery + "YearMo <= " + intenddt + " AND " + codetype + " IN (" + codelist + ")";  
                    AADataRpt = AADataMonthly.getAAReport(strquery);  
                }  
 
                Session["itemsCount"] = AADataRpt.Tables[0].Rows.Count;  // myDataTable.DefaultView.Count;  
            }  
            else  
            {  
                AADataAADataRpt = AAData.getAAReport("Select ProductionDate,CaseCode,ContractCode,MbuCode from AAData where ProductionDate = 01/01/1900");  
            }  
            return AADataRpt;  
 
        }  
 
        protected void ARGrid1_NeedDataSource(object source, Telerik.Web.UI.GridNeedDataSourceEventArgs e)  
        {  
            ARGrid1.DataSource = BuildRptQuery();   
        } 
Michael
Top achievements
Rank 1
 answered on 26 Mar 2010
6 answers
208 views
One of our key customers is having performance issues with our Scheduler. They mainly manifest themselves by locking up the Scheduler and occasionally crashing the browser that it is open within.

We have investigated this and found that whenever the mouse is moved around within the Scheduler, the memory and CPU resources spike, often to 100%. This is not while dragging or anything. Though we have a lot of custom client code, it looks to be caused by client mouse events that are native to the Scheduler control.

Has anyone else experienced similar issues?
Is it possible to turn off some/all of the Schedulers client events?
Are there any recommended best practices surrounding this?
Kamen Bundev
Telerik team
 answered on 26 Mar 2010
1 answer
101 views

Hi All,

I'd like to conditionally have a couple of images shown along with the subject of an appointment.  To that end I tried putting the following code into the subject from the AppointmentDataBound event. 

            Dim subject As String = e.Appointment.Subject  
            subject += " - " & dataRowView.Item("Title").ToString()  
 
            Dim Status As Integer = 0 
            Status = CInt(dataRowView.Item("Status"))  
            Dim errorImages As String = "" 
            If Status = 1 OrElse Status = 3 Then  
                errorImages = "<img src=""/images/icons/16/not_ok.png"" border=""0"" />" 
            End If  
            If Status = 2 OrElse Status = 3 Then  
                errorImages += "<img src=""/images/icons/16/not_ok_orange.png"" border=""0"" />"  
            End If  
 
            e.Appointment.Subject = errorImages & subject 

When this executes it works but the <img... is rendered as text in the appointment.  Is there a way to use this method to get the images rendered? 

I could use a AppointmentTemplate but given that the Status flag can affect two images I'm not sure how I could do it.  Any pointers?

Regards,

Jon

Jon
Top achievements
Rank 1
 answered on 26 Mar 2010
1 answer
66 views
I'm having a problem in IE 8 with the Width of combo boxes

    <div style="padding:10px;"> 
        <telerik:RadComboBox Width="250px" Label="Report Options" ID="RadComboBox1" runat="server" OnClientSelectedIndexChanging="LoadLanCodes" OnClientDropDownOpening="ClearBoxes"> 
            <Items> 
                <telerik:RadComboBoxItem runat="server" Selected="True" value="" Text="Any" /> 
                <telerik:RadComboBoxItem runat="server" Text="Lan Code" Value="lancode" /> 
                <telerik:RadComboBoxItem runat="server" Text="Support Team" Value="supportteam" /> 
            </Items> 
        </telerik:RadComboBox> 
        <telerik:RadComboBox Width="250px" OnClientItemsRequested="ItemsLoaded" ID="RadComboBox2" runat="server" OnClientSelectedIndexChanging="LoadStates"> 
        </telerik:RadComboBox> 
        <p> 
        </p> 
        <telerik:RadComboBox Label="State" Width="250px" OnClientItemsRequested="ItemsLoaded" ID="RadComboBox3" runat="server" OnClientSelectedIndexChanging="LoadCities"> 
        </telerik:RadComboBox> 
        <telerik:RadComboBox Label="City"  Width="250px" OnClientItemsRequested="ItemsLoaded" ID="RadComboBox4" runat="server"> 
        </telerik:RadComboBox> 
    </div> 

As you can see in the attached image FF works but not correctly
Chrome and IE 8 do not witht he combos taking up the available screen size

Wondering if I'm doing it wrong
Kalina
Telerik team
 answered on 26 Mar 2010
1 answer
84 views
Hello,

I would like to know if it's possible to have a new column (on the left) in the month view where it's written the number of the week.

And in this column, have a dropdownlist to switch  ressources for example.

Thank you
Peter
Telerik team
 answered on 26 Mar 2010
3 answers
112 views
I have a webpage encoded in UTF8 and i write greek. When this text is exported to pdf i get '####' instead of 'κατι'.

With english text is fine.
:(


Rumen
Telerik team
 answered on 26 Mar 2010
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jake
Top achievements
Rank 1
RBarnes
Top achievements
Rank 1
Iron
Iron
Rami
Top achievements
Rank 1
Iron
Veteran
Nathan
Top achievements
Rank 1
Kumeri
Top achievements
Rank 1
Iron
Veteran
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jake
Top achievements
Rank 1
RBarnes
Top achievements
Rank 1
Iron
Iron
Rami
Top achievements
Rank 1
Iron
Veteran
Nathan
Top achievements
Rank 1
Kumeri
Top achievements
Rank 1
Iron
Veteran
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?