Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
168 views

Hi,

I have a PageBase class that inherits from System.Web.UI.Page. I also use web user controls extensively. The RadSkinManager skins all the RadControls consistently if the RadFormDecorator is commented out. But as soon as I uncomment the RadFormDecorator sections, all the RadControls on the page acquire the "Default" skin and all ASP controls acquire the desired skin. (i.e. "Forest"). The behavior I want is for all controls to be skinned consistently. How should I modify it so that it works correctly?

Additional Information:
Using Q3 2011
I am also not allowed to use a master page but web user control solutions are ok.
The PageBase class also contains a RadAjaxManager and ScriptManagerProxy if that is of any relevance??

public abstract class PageBaseControl : Page
    {
           public RadSkinManager DefaultSkinManager;
        //public RadFormDecorator DefaultFormDecorator;
 
        protected override void OnInit(EventArgs e)
        {
            base.OnInit(e);
            DefaultSkinManager = new RadSkinManager();
            DefaultSkinManager.ID = "DefaultSkinManager";
            //DefaultFormDecorator = new RadFormDecorator();
            //DefaultFormDecorator.ID = "DefaultFormDecorator";
 
            DefaultSkinManager.Skin = "Forest";
                //DefaultFormDecorator.Skin = "Forest";
            DefaultSkinManager.ShowChooser = false;
            DefaultSkinManager.PersistenceKey = "Skin";
            DefaultSkinManager.PersistenceMode = RadSkinManagerPersistenceMode.Session;
            //DefaultFormDecorator.DecoratedControls = FormDecoratorDecoratedControls.All;
 
               Form.Controls.Add(DefaultSkinManager);
            //Form.Controls.Add(DefaultFormDecorator);
        }
}
Niko
Telerik team
 answered on 05 Jun 2012
1 answer
68 views
Hi,
I'm create an application with the trial version 2011.3.1115.35.
Now I have a licence and I upgrade assembly with the lastest version "Telerik.Web.UI_2012_1_411_Dev_hotfix".
This application has now fonctionnal regression with this version and I want to download DEV version of trial version 2011.3.1115.35
Where I can find it ?

Thanks,
Antoine L.
Rumen
Telerik team
 answered on 05 Jun 2012
0 answers
77 views
Hello,

Were working with Q1 2011 ASP.NET AJAX Controls and we have an issue with DatePicker when we try to select Sept 2nd 2012 we cantt select it, this date is the only one we cant pick in september this year... 

Is there any implicit validation we cannot set (we think is the labor day in US, but It supposed to be the first septembers monday!!) ? I tried to set all the properties of the DatePicker control without success

Please Help!!!

Víctor 
Victor
Top achievements
Rank 1
 asked on 05 Jun 2012
2 answers
65 views
I have an app with a RadScheduler that I am displaying in an Iframe in Sharepoint. For some reason, through the IFrame, the dialogs that open when I insert/update/delete appts are very low on the screen, so that the user has to scroll down to interact with them. This doesn't happen when I use my app directly, only through the IFrame, so I am guessing it is a CSS issue. Any ideas on which Css classes I would need to modify to fix this? Or, perhaps the problem is something else?

Thanks!
acola
Top achievements
Rank 1
 answered on 05 Jun 2012
3 answers
77 views

Hi Everyone,

I am using RadEditor, and I am trying to create an insert/upload image dialog. It works great in FF, Chrome, IE7/8 and before, but in IE9 it throws JavaScript error

“Line: 792

Error: DOM Exception: INVALID_CHARACTER_ERR (5)”  

Built in debugger is throwing error at

}}else{var o=($telerik.isIE)?document.createElement("<iframe name='"+c+"'>"):document.createElement("iframe");

o.name=c;

 

And console is showing:

SCRIPT5022: DOM Exception: INVALID_CHARACTER_ERR (5)
ScriptResource.axd?d=rJkSr8ttpP52D876ZF1WeNxnHE6aTSXEyuHB1Xl6uJ1zBgTteHkHuv7Y2iAt9aZv9uah5nKxT6ylXPwwQHwgyljpNIHN3Q0-kSVosKQoQ2uPIfQme2LiD3_reNMfI8mZGncmOhVbL4j51EIh2kStPmT25r81&t=ffffffff987f999b, line 792 character 8

This is JavaScript used

<script type="text/javascript">

                Telerik.Web.UI.Editor.CommandList["InsertCustomImage"] = function(commandName, editor, args) {

                    var myCallbackFunction = function(sender, args) {

                        editor.pasteHtml(String.format("<img src='{0}' border='0' align='middle' alt='Custom Image' /> ", args.image));

                    }

                    editor.showExternalDialog(

                                        "UploadEmailImage.aspx",

                                        {},

                                        400,

                                        310,

                                        myCallbackFunction,

                                        null,

                                        "Insert Image",

                                        true,

                                        Telerik.Web.UI.WindowBehaviors.Close + Telerik.Web.UI.WindowBehaviors.Move,

                                        false,

                                        true);

                };

           </script>

And aspx is:

<telerik:RadEditor ID="txtEmailMessage" runat="server" Width="99%" Height="300px">

                                    <Tools>

                                        <telerik:EditorToolGroup>

                                            <telerik:EditorTool Name="InsertCustomImage" Text="Insert Image" />

                                        </telerik:EditorToolGroup>

                                    </Tools>

                                </telerik:RadEditor>

Any help welcome

If you need anything else, please ask. 

Cheers

S

Rumen
Telerik team
 answered on 05 Jun 2012
7 answers
223 views
Hi,

 I am using  Rad Scheduler and rad calender to display Appointment .I want to restrict the user for particular time slot.please let me know how can i restrict to add appointment  at that time.
for example today at 12 am i don't want to access the user to add appointment how can i do this let me know how can resolve this issue

regards,
venkateswararao
Plamen
Telerik team
 answered on 05 Jun 2012
1 answer
125 views
Hello,

I want the Grid to be collapsed when it is initialized the first time. So I set 
MasterTableView.GroupsDefaultExpanded = false;
But if the user expands one group and sorts or reorders a column, all groups are collapsed, even the node the user just expanded.
Do I have to keep track myself which nodes were expanded by the user?

Shinu
Top achievements
Rank 2
 answered on 05 Jun 2012
1 answer
103 views
For reasons not worth going into, I'm stuck on ASP.Net 2.0 with Ajax Extensions v1.0.61025, so I'm also stuck using RadControls 2010 Q3.  And I've also only been using Telerik for a couple months, so I'm still pretty green.

I'd like to get some kind of support working for browser history with Ajax.  I've been banging my head against it for a few days now and not making much progress.  The only moderate success I've had is using Nikhil's old UpdateHistory control, although it has some issues with RadGrid.

So as just a sanity check, given my ASP.Net 2.0 constraint, what's the best way to get history working?
Maria Ilieva
Telerik team
 answered on 05 Jun 2012
0 answers
107 views
Hi friends ,

In our application we are binding grid on client side.
On binding the grid the records are not displying.I am not getting what's wrong in our code.
Bellow is the code i have written,

-----------------test.aspx -----------------------
<telerik:RadCodeBlock ID="RadCodeBlock1" runat="server">
        <script type="text/javascript">      
 function pageLoad(sender, eventArgs) {          
          
           var tableView = $find("<%= RadGrid1.ClientID %>").get_masterTableView();
           $find("<%= RadAjaxLoadingPanel1.ClientID %>").show("<%= RadGrid1.ClientID %>");
           PageMethods.GetData(0, tableView.get_pageSize(),
                tableView.get_sortExpressions().toString(), tableView.get_filterExpressions().toList(),
                    updateGrid);
                   
           PageMethods.GetCount(tableView.get_filterExpressions().toList(), updateVirtualItemCount);
       }
function updateGrid(result) {          
           var tableView = $find("<%= RadGrid1.ClientID %>").get_masterTableView();
           tableView.set_dataSource(result);
           tableView.dataBind();          
 
           $find("<%= RadAjaxLoadingPanel1.ClientID %>").hide("<%= RadGrid1.ClientID %>");
          
        }
 function updateVirtualItemCount(result)
        {
           var tableView = $find("<%= RadGrid1.ClientID %>").get_masterTableView();
           tableView.set_virtualItemCount(result);
        }
  function RadGrid1_Command(sender, args) {         
            args.set_cancel(true);                       
            var pageSize = sender.get_masterTableView().get_pageSize();
            var sortExpressions = sender.get_masterTableView().get_sortExpressions();
            var filterExpressions = sender.get_masterTableView().get_filterExpressions();           
            var currentPageIndex = sender.get_masterTableView().get_currentPageIndex();               
            if (args.get_commandName() == "Filter")
                currentPageIndex = 0;
            var sortExpressionsAsSQL = sortExpressions.toString();
            var filterExpressionsAsSQL = filterExpressions.toString();
            $find("<%= RadAjaxLoadingPanel1.ClientID %>").show("<%= RadGrid1.ClientID %>");
            PageMethods.GetData(currentPageIndex * pageSize, pageSize, sortExpressionsAsSQL, filterExpressions.toList(), updateGrid);         
          
        }
</script>

    </telerik:RadCodeBlock>

<telerik:RadScriptManager ID="ScriptManager1" EnablePageMethods="true" runat="server" />
<telerik:RadGrid ID="RadGrid1" EnableViewState="false" runat="server" AllowPaging="true"
            AllowSorting="True" AllowFilteringByColumn="true" GridLines="None">
            <ItemStyle Wrap="false" />
            <MasterTableView AllowMultiColumnSorting="true" TableLayout="Fixed">
                <Columns>
                    <telerik:GridBoundColumn DataField="EmployeeID" HeaderText="EmployeeID" HeaderStyle-Width="100px"
                        FilterControlWidth="50px" />
                    <telerik:GridBoundColumn DataField="ENAME" HeaderText="ENAME" />
                    <telerik:GridBoundColumn DataField="SALARY" HeaderText="SALARY" />
                </Columns>
            </MasterTableView>
            <PagerStyle AlwaysVisible="true" Mode="NumericPages" />
            <ClientSettings>
                <ClientEvents OnCommand="RadGrid1_Command"  />
            </ClientSettings>
        </telerik:RadGrid>
        <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" />
-----------------test.aspx.cs -----------------------
[WebMethod]
    public static int GetCount(List<GridFilterExpression> filterExpressions)
    {
        int count = 0;

        using (SqlConnection connection =
            new SqlConnection(
                ConfigurationManager.ConnectionStrings["sqlConstr"].ConnectionString))
        {           

            StringBuilder sqlBuilder = new StringBuilder();
            sqlBuilder.Append("SELECT COUNT(*) FROM Employee");        
          
            SqlCommand command = new SqlCommand(sqlBuilder.ToString(),
                    connection);

            parameters.ForEach(
                delegate(DbParameter parameter) { if (parameter != null) command.Parameters.Add(parameter); });

            connection.Open();

            SqlDataReader reader = command.ExecuteReader();

            while (reader.Read())
            {
                count = reader.GetInt32(0);
            }

            reader.Close();

        }
        return count;
    }

    [WebMethod]
    public static List<Employee> GetData(int startIndex, int maximumRows,
        string sortExpressions, List<GridFilterExpression> filterExpressions)
    {

        List<Employee> list = new List<Employee>();
        StringBuilder sqlBuilder = new StringBuilder();
        sqlBuilder.AppendLine(" SELECT * FROM Employee");     
        sqlBuilder.AppendLine(" Order By EID ASC");
        using (SqlConnection connection =
            new SqlConnection(
                ConfigurationManager.ConnectionStrings["sqlConstr"].ConnectionString))
        {
            SqlCommand command = new SqlCommand(sqlBuilder.ToString(), connection);           
            connection.Open();
            SqlDataReader reader = command.ExecuteReader();
            try
            {
                while (reader.Read())
                {
                    Employee newEmployee = new Employee();
                    for (int i = 0; i < reader.FieldCount; i++)
                    {
                        switch (reader.GetName(i))
                        {
                            case "SALARY":
                                newEmployee.SALARY  = reader.GetInt32(i);
                                break;
                            case "ENAME":
                                newEmployee.ENAME  = reader.GetString(i);
                                break;
                            case "EID":
                                newEmployee.EID  = reader.GetString(i);
                                break;                           
                            default:
                                break;
                        }
                    }
                    list.Add(newEmployee);
                }
            }
            finally
            {
                reader.Close();
            }
        }
        return list;
    }

public class Employee
    {
        private string _EID;
        private string _ENAME;
        private int _SALARY;  

        public Employee()
        {

        }
        public string EID
        {
            get
            {
                return this._EID;
            }
            set
            {
                if ((this._EID != value))
                {
                    this._EID = value;
                }
            }
        }

        public string ENAME
        {
            get
            {
                return this._ENAME;
            }
            set
            {
                if ((this._ENAME != value))
                {
                    this._ENAME = value;
                }
            }
        }

        public int SALARY
        {
            get
            {
                return this._SALARY;
            }
            set
            {
                if ((this._SALARY != value))
                {
                    this._SALARY = value;
                }
            }
        }
    
    }

 

 Thanks in advance
  Anwar


Anwar
Top achievements
Rank 2
 asked on 05 Jun 2012
0 answers
84 views

I have custom page in SP2010 where I have used RadEditor Control which is working in IE 8.0  but not working in IE 9.0.

In IE 9.0, its thowing error following error.

Error 1: When page load
Webpage error details

Message: Unable to get value of the property 'addEventListener': object is null or undefined

Error 2: When trying to choose option of custom context menu.
Message: Unable to get value of the property 'set_activePopup': object is null or undefined

Please reply as early as possible. Due to this issue, product release is on hold.

Please see the Telerik version detail in attached file.

Thanks in advance.

Regards,
Hitendra


Hitendra
Top achievements
Rank 1
 asked on 05 Jun 2012
Narrow your results
Selected tags
Tags
+? more
Top users last month
Boardy
Top achievements
Rank 2
Veteran
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
ivory
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ClausDC
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Boardy
Top achievements
Rank 2
Veteran
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
ivory
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ClausDC
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?