Telerik Forums
UI for ASP.NET AJAX Forum
3 answers
115 views
For RadComboBoxes with CheckBoxes=true, when a RadComboBoxItem is added via client code (as indicated here: http://www.telerik.com/help/aspnet-ajax/combobox-items-client-side-code.html), the OnClientItemChecked event does not fire when the new RadComboBoxItem is checked.  Is this by design? If so, is there some sort of workaround? 
Nencho
Telerik team
 answered on 11 Dec 2012
3 answers
136 views
I have a master page containing a Treeview used as a menu, and a content area for the site pages. One site page has a summary-style RadGrid at the top of the page, and then a tabstrip with a Multiview. Each PageView contains a user control with the content for that PageView. I am unable to get the correct ajax behavior.

When I follow what I understand to be Telerik's guidance and list the tabview and multipage each as ajax initiators and updated controls, client-side validation breaks in all the page views. I could live with that, but one of the page view user controls contains a RadEditor, and whatever breaks the client-side validation also results in updated editor content not being saved when the rest of the page data is saved. Watching the server-side validation function for the custom validator assigned to the RadEditor always shows the original editor content and never shows the updated content. Maybe some necessary Javascript for the editor content retrieval is breaking, along with the client-side validation javascript? The client-side validation breaks in IE, Firefox and Chrome. The failure to update the RadEditor content only happens in IE.
<telerik:RadAjaxManagerProxy ID="RadAjaxManagerProxyTopic" runat="server">
    <AjaxSettings>
        <telerik:AjaxSetting AjaxControlID="RadTabStripTopic">
            <UpdatedControls>
                <telerik:AjaxUpdatedControl ControlID="RadTabStripTopic" />
                <telerik:AjaxUpdatedControl ControlID="RadMultiPageTopicSubforms" LoadingPanelID="RadAjaxLoadingPanel_Topic" />
                <telerik:AjaxUpdatedControl ControlID="userMessageDisplay" />
            </UpdatedControls>
        </telerik:AjaxSetting>
        <telerik:AjaxSetting AjaxControlID="RadMultiPageTopicSubforms">
            <UpdatedControls>
                <telerik:AjaxUpdatedControl ControlID="RadTabStripTopic" />
                <telerik:AjaxUpdatedControl ControlID="RadMultiPageTopicSubforms" LoadingPanelID="RadAjaxLoadingPanel_Topic" />
                <telerik:AjaxUpdatedControl ControlID="RadGridTopic" />
                <telerik:AjaxUpdatedControl ControlID="userMessageDisplay" />
            </UpdatedControls>
        </telerik:AjaxSetting>
    </AjaxSettings>
</telerik:RadAjaxManagerProxy>

If I remove the RadAjaxManagerProxy and instead surround the page's content with an AspPanel, client-side validation resumes working. Since the user controls on each PageView contain RadGrid controls, I need to ajaxify each of the user controls individually. That works- the client-side validation works, and the user control with the RadEditor successfully saves the updated editor content.

But since each user control is now individually ajaxified, the main page's summary RadGrid does not get updated when it should. Each user control raises an update event which is handled by the main page. I tried dynamically adding an ajax update for the summary RadGrid, but I get an internal error in Telerik Javascript when the code executes. This is the update event handler on the main page, which tries to assign the desired AjaxSetting. The rest of the event handler performs the appropriate updates to the main page's summary RadGrid, but the .AddAjaxSetting throws an internal exception.
protected void TopicTabForm_AfterUpdate(object sender, EventArgs e)
{
     RadAjaxManager ajaxManager = RadAjaxManager.GetCurrent(Page);
     ajaxManager.AjaxSettings.AddAjaxSetting(sender as Control, this.RadGridTopic);

Is there any way to force a control on the main page to update it's display like this? Or is there any better approach to ajaxifying a tabstrip containing user controls with RadGrids?
Angel Petrov
Telerik team
 answered on 11 Dec 2012
6 answers
510 views
I have written about  this subject before, but I have found a hack on how to call the c# code behind from javascript and when I do that, and call rebind from the c#, the grid is not rebinding. Here is what I am doing:

I have a grid and button outside the grid which creates a modal radwindow to generate a wizard to create users. When the wizard completes and the window closes, I have a javascript function to handle the window close and in that function, I have one line which clicks a hidden button so that the onclick server call for that button can get called automatically. The call gets called, and in that call all I have is a rebind. It runs according to my debugger, but the grid does not refresh. The users do get generated becasue if I then click the refresh button the grid refreshes.

 I have a radajaxmanager set up so that the button controls the grid.(the hidden button is called myServerButton. here is my code:

 <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server" DefaultLoadingPanelID="RadAjaxLoadingPanel1" >
       <ClientEvents OnRequestStart="centerUpdatePanel();"></ClientEvents>
       
                <AjaxSettings>
                    <telerik:AjaxSetting AjaxControlID="myServerButton">
                        <UpdatedControls>
                            <telerik:AjaxUpdatedControl ControlID="usersGrid" />
                        </UpdatedControls>
                    </telerik:AjaxSetting>
                    <telerik:AjaxSetting AjaxControlID="WizardButton">
                        <UpdatedControls>
                            <telerik:AjaxUpdatedControl ControlID="CompanyInfoGrid" />
                            <telerik:AjaxUpdatedControl ControlID="usersGrid" />
                        </UpdatedControls>
                    </telerik:AjaxSetting>
                    <telerik:AjaxSetting AjaxControlID="TopGrid">
                        <UpdatedControls>
                            <telerik:AjaxUpdatedControl ControlID="TopGrid" />
                        </UpdatedControls>
                    </telerik:AjaxSetting>
                    <telerik:AjaxSetting AjaxControlID="CompanyInfoGrid">
                        <UpdatedControls>
                            <telerik:AjaxUpdatedControl ControlID="CompanyInfoGrid" />
                        </UpdatedControls>
                    </telerik:AjaxSetting>
                    <telerik:AjaxSetting AjaxControlID="usersGrid">
                        <UpdatedControls>
                            <telerik:AjaxUpdatedControl ControlID="TextBoxOrderDetailID" />
                            <telerik:AjaxUpdatedControl ControlID="CompanyInfoGrid" />
                            <telerik:AjaxUpdatedControl ControlID="usersGrid" />
                        </UpdatedControls>
                    </telerik:AjaxSetting>
                </AjaxSettings>
    </telerik:RadAjaxManager>

.........  
<asp:Button ID="myServerButton" runat="server" style="display:none;"  OnClick="rebindUsers"  />

  <telerik:RadGrid ID="usersGrid" runat="server"
       DataSourceID="ContentCentralUsers" GridLines="None" Skin="Office2007" AutoGenerateColumns="False"
            ondatabound="usersGrid_DataBound" onitemdatabound="usersGrid_ItemDataBound"   OnItemCreated="usersGrid_ItemCreated"
            onitemevent="usersGrid_ItemDataBound" oniteminserted="usersGrid_ItemInserted" onitemupdated="usersGrid_ItemUpdated"
            ShowStatusBar="True" OnPreRender="usersGrid_PreRender" oninsertcommand="usersGrid_InsertCommand" OnItemCommand="usersGrid_ItemCommand"
            onupdatecommand="usersGrid_UpdateCommand"   >
     
       <MasterTableView  DataSourceID="ContentCentralUsers"  DataKeyNames="user_id,package_cd"
             AllowFilteringByColumn="True" AllowSorting="True"   
              InsertItemPageIndexAction="ShowItemOnFirstPage" CommandItemDisplay="Top"
             NoMasterRecordsText="No users to display.">
            <CommandItemSettings AddNewRecordText="Add new user"  />
            
            <RowIndicatorColumn>
            <HeaderStyle Width="20px"></HeaderStyle>
            </RowIndicatorColumn>
   
            <ExpandCollapseColumn>
            <HeaderStyle Width="20px"></HeaderStyle>
            </ExpandCollapseColumn>
            
   
     <Columns>
.....
<script type="text/javascript">

 function OnClientClose(oWnd) {
        document.getElementById('myServerButton').click(); // clicks hidden button to invoke c# call to rebind users
    }

 function openWin(OrderDetailID) {

        var urlArgs = cbeGetURLArguments();

        var sbOID = parseInt(urlArgs['sbOID']);
        var queryODID = parseInt(urlArgs['sbODID']);
        var sbproductid = parseInt(urlArgs['sbproductid']);
        var SAPID = urlArgs['SAPID'];

        var txtbxODID = document.getElementById('TextBoxOrderDetailID').value;
        var txtbxProduct = document.getElementById('TextBoxProduct').value;
        var licensePrice = document.getElementById('licensePrice').value;
        if (txtbxODID == null)
            sbODID = queryODID;
        else
            sbODID = txtbxODID;


        var windowURL = "v8Wizard_1.aspx?sbODID=" + sbODID + "&sbproductid=" + sbproductid + "&SAPID=" + SAPID +
                 "&lPrice=" + licensePrice + "&email=" + "" + "&ttt=" + "" + "&p_cd=" + "NTB" + "&sbOID=" + sbOID + "&numUsers=&packagePrice=0";

        var oWnd = radopen(windowURL, "RadWindow1");
        oWnd.setSize(900, 550);
        // oWnd.setSize(650, 600);
        oWnd.center();

        //set a function to be called when RadWindow is closed
        oWnd.add_close(OnClientClose);
    }
   
   </script>
......

  protected void rebindUsers(Object sender, EventArgs e)
    {
        usersGrid.Rebind();
       
    }
    
The rebind gets executed, but the grid does not refresh.







Maria Ilieva
Telerik team
 answered on 11 Dec 2012
1 answer
62 views
Hello.

There is a problem with rad telerik editor when using "Flash manager".
after flash file upload, Width and Height are default 150x150.
when I tried to change width and height in editor and Exit+Save, It's changed and everything is ok.
But, Every time I getting into flash manager editor, width and height shows 150x150 by default. even after changing.

Why height and width size did not changes after Save?
Rumen
Telerik team
 answered on 11 Dec 2012
1 answer
38 views
Hi,

I am binding RADGRID in client side with paging on search button click. it is working fine with paging. but when i bind grid again on search button click, the page index not reset..

So, i tried to reset the current page index using set_currentPageIndex(0) property.. But it recalls the bind function again and all the data does wrong.


 masterGrd.set_currentPageIndex(0);

Even i tried to rebind function but that too not worked.

 masterGrd.set_currentPageIndex(0);<br><span style="font-size: 13.63636302947998px;">masterGrd</span>.rebind();
Vasil
Telerik team
 answered on 11 Dec 2012
0 answers
25 views
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="products.aspx.cs" Inherits="products"%>
 
 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
 
<head>
    <title><%Response.Write(ConfigurationManager.AppSettings["AdminTitle"]); %></title>
    <link href="aStyleSheet.css" rel="stylesheet" type="text/css" />
    <link href="aMenuStyle.css" rel="stylesheet" type="text/css" />
    <link href="aPageDesign.css" rel="stylesheet" type="text/css"/>
    <link href="webworld_calendar.css" rel="stylesheet" type="text/css" />
    <script language="javascript" type="text/javascript" src="jscripts/webworld_calendar.js"></script>
    <script language="javascript" type="text/javascript">
        function confirmMsg(msg){
            if(!confirm(msg)){
                return false;
 
            } else {
                return true;
            }
        }
        function GetFileName() {
            var upload = $find("<%= RUCatImage.ClientID %>")
            var filePath = upload.getFileInputs()[0].value;
            var fileName = filePath.substring(filePath.lastIndexOf("\\") + 1);
            document.getElementById("<%= Txt_CatImage.ClientID %>").value = fileName;
        }
    </script>
</head>
<body>
    <form id="form1" runat="server">
    <telerik:RadStyleSheetManager ID="RadStyleSheetManager1" runat="server">
    </telerik:RadStyleSheetManager>
     <telerik:RadScriptManager ID="RadScriptManager1" runat="server"></telerik:RadScriptManager>
 
  <telerik:RadImageEditor ID="RadCatImgEdit" runat="server" ToolsFile="~/App_Data/ImageEditor.xml">
                                                    </telerik:RadImageEditor>
 
</form>
</body>
</html>

This is the source.
Would you please tell me why i did not get the tool dialog with properties. Just i see empty dialog
Annie
Top achievements
Rank 1
 asked on 11 Dec 2012
1 answer
129 views
Strange one here. I am using Combobox dll 2.8.4 (I know its old, its legacy stuff). On my Windows 2008 server here it works fine as expected. On a Windows 2003 server it misbehaves. We have narrowed it down to a class on the div created around the drop down being changed. On our 2K8 server the following line stays as is and all works well:

<div class="ComboBoxItem_Default" id="ctl00_cphBarCol_ddlFolder_Input" style="display:inline; white-space: nowrap;">

But on the client's 2003 server when the drop down is clicked in to it changes the class to "ComboBoxItemHover" and blows out the styling which results in us not being able to select anything in the drop down box.

<div class="ComboBoxItemHover_Default" id="cphBarCol_ddlFolder" style="display:inline; white-space: nowrap;">

I have attached two images. Dropdown_good.jpg shows the expected and correct behaviour. Dropdown_bad.jpg shows how the dropdown box turns out on 2k3 server.

How do I stop the js targeting the div? Please help before my head explodes.
Kalina
Telerik team
 answered on 11 Dec 2012
1 answer
100 views
Dear All!
I am working on a telerik report Q3 2010.I want to change the size the size of control by using stylesheet .I am familier with stylerules of telerik . now my question is 
"it is possible to change the size of the textfield/textbox using style sheet in telerik? if yes then how ?"

Please i need your guidance , if you have another idea to set the size of the control mentioned above dynamically then please do share with me.


Best Regards
Shinu
Top achievements
Rank 2
 answered on 11 Dec 2012
0 answers
1.1K+ views
Hello Community,

Recently lots of the developers reported that their sites are not working in IE10. Depending on what controls they have on the page, the errors can be:
  • "Unable to get property 'PageRequestManager' of undefined or null reference"
  • "__doPostBack" is undefined or not an object.
  • "'$get' is undefined"

If you have some of these errors only on IE10, and your site is working in other browser, it is most probably that the MicrosoftAjaxWebForms.js fails to be included in the scripts for your page. This is known to be caused by bug in the browser definition files in .NET 4.0 and .NET 2.0 used by the ASP.NET.

Since the RadControls are made on top of the AjaxWebForms,if the Microsoft's scripts are not loaded properly, the RadControls will not work as well. For example if you have RadAjaxManager in your page, it's initialization will fail, when PageRequestManager is requested, you might think at first that the problem is in the RadAjaxManager, but on later look you see that the PageRequestManager is defined inside the MicrosoftAjaxWebForms.js where is the actual problem.

You have several options to confirm that this is the issue:

  • Open the developer tools of IE10, capture the network traffic and see if the bot Microsoft scripts (MicrosoftAjax and MicrosoftAjaxWebForms) are included.
  • Run the sample web page attached to this post, click the "TestPostBack", if you get JavaScript error then the MicrosoftAjaxWebForms is not loaded properly.
  • Run your site in other browsers like IE9, Firefox, Chrome, Opera. If it works on all of them and not on IE10, then the problem is the definition files.

Luckily there is solution for the problem: .NET fix for your server released by Microsoft.
For .NET 4.0 check this one: http://support.microsoft.com/kb/2600088
For .NET 2.0:
http://support.microsoft.com/kb/2600100 for Win7 SP1/Windows Server 2008 R2 SP1, Windows Vista/Server 2008, Windows XP/Server 2003
http://support.microsoft.com/kb/2608565 for Win7/Windows Server 2008 R2 RTM

Since the problem is not particularity in the RadControls, you might find usable information out in the web, see this blog post by Scott Hanselman for more information:
Bug and Fix: ASP.NET fails to detect IE10 causing _doPostBack is undefined JavaScript error or maintain FF5 scrollbar position

All the best,
Vasil,
the Telerik team

Telerik Admin
Top achievements
Rank 1
Iron
 asked on 11 Dec 2012
2 answers
531 views
Hello,

Telerik radgrid is failling to import excel with 20000 thousand record.

can you please give me little demo or example or code for IMPORT Excel TO RADGRID 

Thanks in advance

Amit
Amit
Top achievements
Rank 1
 answered on 11 Dec 2012
Narrow your results
Selected tags
Tags
+? more
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?