Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
183 views
Hi,

I use RadMaskedTextBox and was working fine when I needed to change the settings of the system encoding to UTF-8 to ISO-8859-1.

If you use UTF-8 encoding does not present the problem or
If you remove all RadMaskedTextBox not have the problem.


The problem happens in Internet Explorer 8 and Mozilla Firefox, Google Chrome already in the system works perfectly.


Log Error Internet Explorer 8:


Details of the errors of the Web page

User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; Trident/4.0; SLCC2;. NET CLR 2.0.50727;. NET CLR 3.5.30729;. NET CLR 3.0.30729; Media Center PC 6.0;. NET4.0C;. NET4.0; InfoPath.3)
Stamp Date / Time: Mon, 13 Dec 2010 19:01:40 UTC


Message: Invalid range in character set
Line: 26
Character: 76
Code: 0
URI: http://endereço.com.br/ScriptResource.axd?d=vu_KwIqaAfV9OW64BCKs1CQ1eAMk3v8Y9lx5gmdjsW_2Y1X7LOcJwe7pxr2ek9aXkQFGXlNyc1bir62R7N4gGRzjs-EiQBolW7eFkaBepkE1&t=56e9f4e3


Message: Object expected
Line: 167
Char: 5
Code: 0
URI: http://endereço.com.br/


line 26

function __doPostBack(eventTarget, eventArgument) {
    if (!theForm.onsubmit || (theForm.onsubmit() != false)) {
        theForm.__EVENTTARGET.value = eventTarget;
        theForm.__EVENTARGUMENT.value = eventArgument;
        theForm.submit();
    }

line 167

Sys.Application.add_init(function() {
    $create(Telerik.Web.UI.RadMaskedTextBox, {"_enableOldBoxModel":false,"_focused":false,"_initialMasks":[new Telerik.Web.UI.RadDigitMaskPart(),new Telerik.Web.UI.RadDigitMaskPart(),new Telerik.Web.UI.RadDigitMaskPart(),new Telerik.Web.UI.RadLiteralMaskPart('.'),new Telerik.Web.UI.RadDigitMaskPart(),new Telerik.Web.UI.RadDigitMaskPart(),new Telerik.Web.UI.RadDigitMaskPart(),new Telerik.Web.UI.RadLiteralMaskPart('.'),new Telerik.Web.UI.RadDigitMaskPart(),new Telerik.Web.UI.RadDigitMaskPart(),new Telerik.Web.UI.RadDigitMaskPart(),new Telerik.Web.UI.RadLiteralMaskPart('-'),new Telerik.Web.UI.RadDigitMaskPart(),new Telerik.Web.UI.RadDigitMaskPart()],"_originalValue":"___.___.___-__","_shouldResetWidthInPixels":true,"clientStateFieldID":"login_ClientState","enabled":true,"styles":{HoveredStyle: ["font-family:Arial;font-size:13px;width:300px;", "riTextBox riHover text"],InvalidStyle: ["font-family:Arial;font-size:13px;width:300px;", "riTextBox riError text"],DisabledStyle: ["font-family:Arial;font-size:13px;width:300px;", "riTextBox riDisabled text"],FocusedStyle: ["font-family:Arial;font-size:13px;width:300px;", "riTextBox riFocused text"],EmptyMessageStyle: ["font-family:Arial;font-size:13px;width:300px;", "riTextBox riEmpty text"],ReadOnlyStyle: ["font-family:Arial;font-size:13px;width:300px;", "riTextBox riRead text"],EnabledStyle: ["font-family:Arial;font-size:13px;width:300px;", "riTextBox riEnabled text"]}}, null, null, $get("login"));
});


Setting charset:

<?xml version="1.0" encoding="ISO-8859-1"?>
 
<globalization requestEncoding="ISO-8859-1" responseEncoding="ISO-8859-1" culture="pt-BR" uiCulture="pt-BR" />


RadMaskedTextBox:

<Telerik: Mask RadMaskedTextBox ="###.###.###-##" id = "login" CssClass = "text" runat = "server"TabIndex = "1" WIDTH = "300"></ Telerik: RadMaskedTextBox>



Anyone know any way to solve the problem?

Thanks,
Martin
Telerik team
 answered on 17 Dec 2010
7 answers
463 views
We have a radgrid which when adding or editing records, opens a separate form in a radwindow with it's own .aspx page.  We have run into an issue when attempting to add a new, or edit a record from a radwindow and upon clicking the save button in the window, we cannot get the corresponding radgrid to refresh the data properly.  The data saves properly in the database, the window closes, the ajax request method server side runs, and rebind method server side for the grid also runs when called from the ajax request method.

This used to work on the older RadControls back before we upgraded the site to the ASP.NET AJAX RadControls.  The following sets of code are how we open the radwindow, save the data and close the radwindow, call the ajaxrequest method, and call the grid rebind method.

We open the radwindow dynamically through the itemcommand event of the radgrid as such:
Private Sub radgPayRequest_ItemCommand(ByVal source As ObjectByVal e As GridCommandEventArgs) Handles radgPayRequest.ItemCommand 
        If LCase(e.CommandName) = LCase("AddNewPaymentRequest"Then 
            'Set the cache values to pass to the window 
            Common.Cache.CacheSiteInfo.Cache_PageMode = EnumUI.PageMode.AddNew 
 
            'Open the radwindow 
            Call RadWindowSettings_AdminPilotPayRequest() 
End If 
End Sub 
 
Private Sub RadWindowSettings_AdminPilotPayRequest() 
        Dim rwPilotPayRequest As New RadWindow 
 
        rwPilotPayRequest.InitialBehaviors = WindowBehaviors.None 
        rwPilotPayRequest.NavigateUrl = "Pilot/AdminPilotPayRequest.aspx" 
        rwPilotPayRequest.Height = System.Web.UI.WebControls.Unit.Pixel(500) 
        rwPilotPayRequest.Width = System.Web.UI.WebControls.Unit.Pixel(725) 
        rwPilotPayRequest.VisibleStatusbar = False 
        rwPilotPayRequest.Modal = False 
        rwPilotPayRequest.Behaviors = WindowBehaviors.Close 
        rwPilotPayRequest.DestroyOnClose = True 
        rwPilotPayRequest.VisibleOnPageLoad = True 
 
        radwWindowMan.Windows.Add(rwPilotPayRequest) 
    End Sub 

This is the save button method from the window, which saves the new or existing record, and closes the window:
Private Sub btnSave_Click(ByVal sender As System.ObjectByVal e As System.EventArgs) Handles btnSave.Click 
        Try 
            'We run the save event here, which saves the data correctly to the database 
 
            'Close the window 
            ClientScript.RegisterStartupScript(Page.GetType](), "CloseWindow""<script language=""javascript"">CloseRadWindow();</script>"
        End Try 
    End Sub 

This is our javascript method, located in an external .js file which closes the radwindow:
function GetRadWindow() 
    { 
        var oWindow = null
        if (window.radWindow) oWindow = window.radWindow; 
        else if (window.frameElement.radWindow) oWindow = window.frameElement.radWindow; 
        return oWindow; 
    } 
 
function CloseRadWindow() 
    { 
        var oWindow = GetRadWindow(); 
 
        oWindow.Close(); 
    } 

After the save button event runs from the aspx page in the radwindow, it accessed the refreshGrid() javascript method on the aspx page which contains the radgrid.  This is our code to get the id of the radajaxmanager to begin the Ajax Request:
<telerik:RadCodeBlock ID="RadCodeBlock1" runat="server"
<script TYPE="text/javascript">              
            function refreshGrid(arg) 
            { 
                if(!arg) 
                { 
                    $find("<%=radaManager.ClientID %>").ajaxRequest("Rebind"); 
                } 
                else 
                { 
                    $find("<%=radaManager.ClientID %>").ajaxRequest("RebindAndNavigate"); 
                } 
            } 
        </script> 
    </telerik:RadCodeBlock> 

The Ajax Manager we have on the same .aspx page as the radgrid has the following settings applied:
<telerik:RadAjaxManager ID="radaManager" RUNAT="server" OnAjaxRequest="radaManager_AjaxRequest"
        <AjaxSettings> 
            <telerik:AjaxSetting AJAXCONTROLID="radaManager"
                <UpdatedControls> 
                    <telerik:AjaxUpdatedControl CONTROLID="radgPayRequest"></telerik:AjaxUpdatedControl> 
                </UpdatedControls> 
            </telerik:AjaxSetting> 
            <telerik:AjaxSetting AJAXCONTROLID="radgPayRequest"
                <UpdatedControls> 
                    <telerik:AjaxUpdatedControl CONTROLID="radgPayRequest"></telerik:AjaxUpdatedControl> 
                </UpdatedControls> 
            </telerik:AjaxSetting> 
        </AjaxSettings> 
    </telerik:RadAjaxManager> 

The following code is the Ajax Request run server side:
Protected Sub radaManager_AjaxRequest(ByVal sender As ObjectByVal e As AjaxRequestEventArgs) Handles radaManager.AjaxRequest 
        Select Case e.Argument 
            Case "Rebind" 
                radgPayRequest.MasterTableView.SortExpressions.Clear() 
                radgPayRequest.MasterTableView.GroupByExpressions.Clear() 
                radgPayRequest.MasterTableView.Rebind() 
            Case "RebindAndNavigate" 
                radgPayRequest.MasterTableView.SortExpressions.Clear() 
                radgPayRequest.MasterTableView.GroupByExpressions.Clear() 
                radgPayRequest.MasterTableView.Rebind() 
        End Select 
    End Sub 

Then the rebind hits our NeedsDataSource Method and in theory should rebind the grid and refresh the data.  However, after we run this process the grid does not refresh the data, unless we hit the refresh command link in the command header we created on the grid.

We have confirmed through testing that our Ajax Request event is being accessed and running the grid rebind method in the server side code.  We are not receiving any javascript errors either.

On the older RadControls we had to force the postback on the page to get the AjaxManager to properly reload the grid data, which we found through the forums:
Protected Overrides Sub RaisePostBackEvent(ByVal sourceControl As IPostBackEventHandler, ByVal eventArgument As String
        MyBase.RaisePostBackEvent(sourceControl, eventArgument) 
 
        If TypeOf sourceControl Is RadAjaxManager Then 
            Select Case eventArgument 
                Case "Rebind" 
                    radgPayRequest.MasterTableView.SortExpressions.Clear() 
                    radgPayRequest.MasterTableView.GroupByExpressions.Clear() 
                    radgPayRequest.MasterTableView.Rebind() 
                Case "RebindAndNavigate" 
                    radgPayRequest.MasterTableView.SortExpressions.Clear() 
                    radgPayRequest.MasterTableView.GroupByExpressions.Clear() 
                    radgPayRequest.MasterTableView.Rebind() 
            End Select 
        End If 
    End Sub 'RaisePostBackEvent 

Has anyone run into this issue before with the ASP.NET AJAX controls?  If so, how were you able to get the grid to refresh the data?  Is it possible that the way we are opening the radwindow could cause the grid not to refresh?

We appreciate any help or suggestions.
Jonx
Top achievements
Rank 2
 answered on 17 Dec 2010
2 answers
175 views
Hi,

I have used 8 radgrid in my application. when i open the page in IE7 it is taken nearly 60,000K memory used in my system. but when click any add button in my radgrid it is increased 2,000K like this 62,000K. then when i canceled add option memory doesn't decreased. then i open add option in same grid memory increased another 2,000K like 64,000. whenever using add button memory increased but whenever closed memory doesn't decreased.

How to resolved this problem. i used CarbageCollecter in my application like CG.Collect(). but doesn't any changes. please give me tips for this Performance issue.

Otherwise any other option like CG.Collect().

Thanks in Advance,
Dhamu.
Dhamodharan
Top achievements
Rank 1
 answered on 17 Dec 2010
2 answers
182 views
Hello,
I'm attempting to perform server side filtering on a RadGrid.  I'm trying to follow your examples on filtering as well as some blog posts found here and here.  On intial page load I load the Grid using a SQL data set. This loads fine.  I then load filters for the status column of "All, Active, and Working".  These values match exactly to what is returned in the data. When I click on the filter for the status column the server side event is called but the data is removed from the grid. 
Can you tell me what I'm doing wrong?
thanks
pete

ASPX
<rad:RadGrid id="RadGrid1" 
 OnItemCreated="RadGrid1_ItemCreated" 
 OnPreRender="RadGrid1_PreRender" 
 OnItemCommand="RadGrid1_ItemCommand"                                 
 ShowStatusBar="true" runat="server" AllowPaging="False" AllowSorting="True"
 AllowMultiRowSelection="True" AutoGenerateColumns="false"  
 ClientSettings-Resizing-ResizeGridOnColumnResize="false" 
 EnablePostBackOnRowClick="true"
 Width="100%"   Height="92%"  Skin="Windows7" AllowFilteringByColumn="true" EnableLinqExpressions="false">
        <MasterTableView PageSize="10" Width="100%" TableLayout="Fixed" EnableViewState="false">
              <Columns>                        
                    <rad:GridTemplateColumn UniqueName="CheckBoxTemplateColumn"  
                                           HeaderStyle-Width="10%" 
                                           HeaderStyle-HorizontalAlign="Center" 
                                           AllowFiltering="false">
                                               <HeaderTemplate>
                                                <asp:CheckBox id="headerChkbox" Text="Select All" OnCheckedChanged="ToggleSelectedState" AutoPostBack="True" runat="server"></asp:CheckBox>
                                               </HeaderTemplate>
                                               <ItemTemplate >
                                                   <asp:CheckBox id="CheckBox1" OnCheckedChanged="ToggleRowSelection" AutoPostBack="True" runat="server" Width="65"></asp:CheckBox>
                                               </ItemTemplate>                                            </rad:GridTemplateColumn>                                                         <rad:GridBoundColumn 
                                               DataField="DISCUSSION" 
                                               DataType="System.String" 
                                               HeaderText="Discussion"    
                                               Visible="False"                                                   
                                               UniqueName="DISCUSSION">
                                               <ItemStyle />
                                           </rad:GridBoundColumn>                        
                                           <rad:GridBoundColumn 
                                               DataField="KEY" 
                                               DataType="System.String" 
                                               HeaderText="ID"                                                 Visible="True"                                                   
                                               UniqueName="KEY"
                                                 
                                               HeaderStyle-HorizontalAlign="Center" 
                                               ItemStyle-HorizontalAlign="Center" 
                                               AllowFiltering="false">
                                               <ItemStyle />
                                           </rad:GridBoundColumn>
                                           <rad:GridBoundColumn 
                                               DataField="NAME" 
                                               DataType="System.String" 
                                               HeaderText="Name"                                                       
                                               UniqueName="NAME" 
                                               HeaderStyle-HorizontalAlign="Center" 
                                               ItemStyle-HorizontalAlign="Center" 
                                               HeaderStyle-Width="40%" 
                                               AllowFiltering="false">
                                               <ItemStyle />
                                           </rad:GridBoundColumn>
                                                                                       <rad:GridBoundColumn 
                                               DataField="STATUS" 
                                               DataType="System.String" 
                                               HeaderText="Status"                                                       
                                               UniqueName="STATUS"                                               
                                               SortExpression="STATUS"                                                
                                               ShowSortIcon="true"  
                                               HeaderStyle-HorizontalAlign="Center" 
                                               ItemStyle-HorizontalAlign="Center" 
                                               HeaderStyle-Width="10%" 
                                               AllowFiltering="true"
                                               AutoPostBackOnFilter="true" >
                                               <ItemStyle />
                                               <FilterTemplate>                                                    
                                                   <rad:RadComboBox ID="RadComboBoxStatus"  OnSelectedIndexChanged="FilterCombo_SelectedIndexChanged" 
                                                       DataTextField="STATUS" 
                                                       AutoPostBack="true"
                                                       DataValueField="STATUS" Width="70px"                                                          
                                                       runat="server" 
                                                       AppendDataBoundItems="true">                                                         <Items>                                                             <rad:RadComboBoxItem Text="All"  Value="All" /> 
                                                           <rad:RadComboBoxItem Text="Active"  Value="Active"/> 
                                                           <rad:RadComboBoxItem Text="Working" Value="Working" />  
                                                                                 
                                                       </Items>
                                                   </rad:RadComboBox>                                                   
                                               </FilterTemplate>
                                           </rad:GridBoundColumn>
                                                                                                                                                                          </Columns>
                                   </MasterTableView>
                                   <ClientSettings EnableRowHoverStyle="true" 
                                                   Resizing-AllowColumnResize="true"
                                                   Resizing-AllowRowResize="true"  
                                                   Resizing-EnableRealTimeResize ="false" 
                                                   Resizing-ResizeGridOnColumnResize="false" 
                                                   Resizing-ClipCellContentOnResize ="false">                                                    
                                       <Scrolling AllowScroll ="true" UseStaticHeaders="true" />
                                       <ClientEvents OnColumnResized="OnColumnResized" />                                        
                                   </ClientSettings>
                                   <PagerStyle Mode="Slider"></PagerStyle>
                               </rad:RadGrid>

CS
protected void FilterCombo_SelectedIndexChanged(object o, RadComboBoxSelectedIndexChangedEventArgs e) 
    {
        string filterExpression;
        filterExpression = "([STATUS] = \'" + e.Text + "\')";
        RadGrid1.MasterTableView.FilterExpression = filterExpression;
        RadGrid1.MasterTableView.Rebind();
    }
Pete
Top achievements
Rank 1
 answered on 17 Dec 2010
2 answers
65 views
how to set the cell alignment in export pdf
Daniel
Telerik team
 answered on 17 Dec 2010
2 answers
152 views
How can I create a tooltip on a menu item?

Here's how I'm creating the menu right now...
for(var i=0; i< menuItems.length; i++){
                    var item = menuItems[i];   
                 
                    var newItem = new Telerik.Web.UI.RadMenuItem(); //Create a new Menu Item
                    newItem.set_text(item.Text);
                    newItem.set_value(item.Value);
                    newItem.set_expandMode(item.ExpandMode);
                    newItem.set_navigateUrl(item.NavigateUrl);
 
                    _menu.get_items().add(newItem); //Add the item to the collection
                }

sitefinitysteve
Top achievements
Rank 2
Iron
Iron
Veteran
 answered on 17 Dec 2010
1 answer
82 views
Anyone successfully use the Mega Drop-Down menu in DotNetNuke? I realize it can't be dynamic but wondering what the best approach is. Would I create a skin object, etc?
Digital Man
Top achievements
Rank 2
 answered on 17 Dec 2010
1 answer
72 views
All,

Is there a way to set the combobox to re-run the webservice when the box is focused on, on the client side?  My implementation involves a possibility for a user to have text in the box, go to another control on the page, and then use the Tab key to regain focus on the control.  The problem I'm running into is that when the comboBox receives focus, it's not re-running the webservice.

Is this even possible?
Thanks!
-Luke
Kalina
Telerik team
 answered on 17 Dec 2010
10 answers
357 views
Good Morning,
if I set the "OutputCompression" in the RadScriptManager Control to "AutoDetect" or "Forced" there is no different in the size of the "Telerik.Web.UI.WebResource.axd" File (about 500kb!!!).

I have everytime the same Filesize of 500kb, what ever which value ("Disabled", "AutoDetect" or "Forced") I use.

My System:
Win 2008 Server
IIS 7
Telerik 2009.2.701.35

Any ideas how to fix that? Must I configure something else to enable the OutputCompression?

Thanks in advance.

Regards Dirk
Helen
Telerik team
 answered on 17 Dec 2010
1 answer
126 views

I have followed this simple example and implemented similarly:-

http://www.telerik.com/help/aspnet-ajax/tree_databindinghierarchical.html

The problem:- GetDataSet() method returns a DataSet with the complete Ques table with all the rows and columns(QuesID,QuesParentID,QuesAns,Active,QuesTypeID and so on)

Now the probelm is that the RadTreeview is not binding well. Like The root node displays Questions but the the child nodes are not displaying the correspoding answer. Also, some root nodes do not have a child node at all. Those root nodes that DO have a child node are displaying Questions as their text and not Answers. I surmise it's something wrong with the BindTree() method only. What could it be? I mean RADTreeView is implemented in a very simple manner in that link above. I only followed accordingly. What is wrong??

aspx page;-

<asp:Content ID="Content3" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">

<telerik:RadTreeView runat="server" ID="tree1" OnNodeDataBound="tree1_NodeDataBound"></telerik:RadTreeView>

</asp:Content>

Code Behind :-

 public partial class TestTree :
   
System.Web.UI.Page {
       
protected void Page_Load(object sender, EventArgs e)
       
{
           
if (!IsPostBack)
           
{
               
BindTree(tree1);
           
}
       
}

       
private DataSet GetDataSet()
       
{
            bllQues objbllQues
= new bllQues();
           
var ds = new DataSet();
           
return objbllQues.GetQues();

       
}

       
protected void BindTree(RadTreeView treeView)
       
{
           
DataSet ds = new DataSet();
            ds
= GetDataSet();
            tree1
.DataTextField = "Ques";
            tree1
.DataValueField = "QuesAns";
            tree1
.DataFieldID = "QuesID";
            tree1
.DataFieldParentID = "QuesParentID";
            tree1
.DataSource = ds;
            tree1
.DataBind();
       
}

       
protected void tree1_NodeDataBound(object sender,
   
RadTreeNodeEventArgs e)
       
{
            e
.Node.ToolTip = (e.Node.DataItem as
   
DataRowView)["QuesAns"].ToString();
       
} }

Cori
Top achievements
Rank 2
 answered on 17 Dec 2010
Narrow your results
Selected tags
Tags
+? more
Top users last month
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?