Telerik Forums
UI for ASP.NET AJAX Forum
8 answers
174 views
2009.2.906.35  VS2008 SP1, XP, IE8.

I was able to isolate to minimally what is needed to reproduce the problem.

<%@ Page Language="vb" AutoEventWireup="false" enableEventValidation="false" CodeBehind="Default.aspx.vb" Inherits="TestAjax._Default" %> 
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %> 
 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 
 
<html xmlns="http://www.w3.org/1999/xhtml" > 
<head runat="server"
    <title>Test</title> 
 
</head> 
<body> 
    <form id="form1" runat="server"
 
    <telerik:RadScriptManager ID="ScriptManager1" runat="server" ScriptMode="Release"
    </telerik:RadScriptManager> 
     
    Use drop down, then put in value in first textbox, the focus will go to 2nd textbox but you cannot enter anything. 
<br /> 
If you click 2nd textbox again, type in, and also fill out 3rd textbox.  [Go], you'll see that the 2nd textbox value gets lost.          
<br /> 
If EnableAjax="false" then problem does not exist. 
<br /> 
<telerik:RadComboBox ID="cboFunction" EmptyMessage="Select a function" runat="server" AutoPostBack="true"
                        <Items> 
                            <telerik:RadComboBoxItem Text="" /> 
                            <telerik:RadComboBoxItem Text="test1" Value="test1" /> 
                        </Items> 
                        <ExpandAnimation  Type="None" /> 
                        <CollapseAnimation Type="None" /> 
                    </telerik:RadComboBox> 
 
<br />                     
                <asp:PlaceHolder ID="myPlaceHolder" runat="server"></asp:PlaceHolder> 
 
            <asp:Button ID="btnGo" runat="server" Width="100px" Text="Go" Enabled="true" /> 
     
            <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server" UpdatePanelsRenderMode="Inline" > 
            <AjaxSettings>        
                <telerik:AjaxSetting AjaxControlID="cboFunction"
                    <UpdatedControls> 
                        <telerik:AjaxUpdatedControl ControlID="myPlaceHolder" /> 
                    </UpdatedControls>               
                </telerik:AjaxSetting>                                                                        
            </AjaxSettings> 
        </telerik:RadAjaxManager> 
    </form> 
</body> 
</html> 
 
<%@ Control Language="vb" AutoEventWireup="false" CodeBehind="ucTest.ascx.vb" Inherits="TestAjax.ucTest" %> 
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %> 
     
<telerik:RadTextBox runat="server" ID="txtSubAccountNo" AutoPostBack="true" Width="450px"></telerik:RadTextBox> 
<br /> 
<telerik:RadTextBox runat="server" ID="txtSubAccountDesc" ReadOnly="true" BackColor="Gainsboro" TabIndex="-1" Width="450px"></telerik:RadTextBox> 
<br /> 
<telerik:RadTextBox runat="server" ID="txt2"  Width="450px"></telerik:RadTextBox> 
<br /> 
<telerik:RadTextBox runat="server" ID="txt3"  Width="450px"></telerik:RadTextBox> 
<br /> 

Vasil
Telerik team
 answered on 27 Feb 2012
1 answer
118 views

Hi guys.

I sometimes get "invalid xhtml" errors when exporting from radgrid.
This is actually not my problem per se.

I am allowing users to export tables from databases, and some of them do contain old and invalid markup. Verifying/editing the markup isn't really an option.

My problem is, that even after including all code execution within "Try" I'm still unable to catch the errors and letting users know what's wrong. For some reason I still always get the unfriendly (for regular users) .net error page.

There must be a way to catch the errors right?

Regards,
-DJ-
-DJ-
Top achievements
Rank 1
 answered on 27 Feb 2012
3 answers
114 views
I am about to add RadEditor to a page we use for creating a mail message.

The user wants to be able to generate HTML mail but also wants the Outlook-like ability to choose to send plain text mail.

My plan is to add a custom dropdown to the Editor toolbar to allow the user to choose the format and then modify the tools available in toolbar to an appropriate set dependent on the option chosen.

What I then need to do, if the user has selected Plain Text, is remove any formating that is inappropriate.

Looking at the functinality available in the radEditor demos, I can make a few calls to the Format Stripper to remove CSS, Font, Span and Word formating but I still need to remove any <a> tags.

I guess I need to leave any <p> and <br> tags 'til after the user has finished composing the message or else it's going to be just one big block of text.

Whilst I know that I could remove the <a> tags at the same time that I do the post-processing to convert the <p> and <br> tags the LFCR in the sent message, I'd prefer to do it in the editor so the user can see that tghere are no links in their message.

So, to my point. is there an example somewhere of code I can use to process the message to remove a set of tags? Or should I just discover a method of sucking out the editor's content, throw it at the HTML Agility Pack to process it and then put it back?

Or, better yet, is there an example of switching from full HTML editing to plan text already someplace?

--
Stuart (Founder member of LazyProgrammersRUs)
Stuart Hemming
Top achievements
Rank 2
 answered on 27 Feb 2012
5 answers
153 views
I upgraded Visual Studio 2010 RC to the final released version. Now when I open up a project for .NET 3.5, the toolbox shows radControls for .NET 4.0. If I click on show all in the toolbox then the radControls for .NET 3.5 is listed but it is dimmed out. How can I make the radControls for NET 3.5 show up for a .NET 3.5 project?
Andrey
Telerik team
 answered on 27 Feb 2012
2 answers
123 views
 Hello,

I'm trying to use the component RadTreeList and It works well !
I've just a small problem with the oRecordsTemplate. (see attached file image002.jpg). It generates two lines. Even when I try my own template.
Perhaps is ther something I'm doing wrong. The TreeList is generated dynamically in Page_Init().

Thanks for your help.
Regards
Bernard

protected void Page_Init()
        {
aRadTreeList = new RadTreeList();
            //aRadTreeList.NoRecordsTemplate = new XarcNoRecordsTemplate();
            aRadTreeList.ClientSettings.Scrolling.AllowScroll = true;
            aRadTreeList.ClientSettings.Scrolling.UseStaticHeaders = true;
            aRadTreeList.AutoGenerateColumns = false;
            aRadTreeList.ClientSettings.Scrolling.ScrollHeight = Unit.Pixel(180);
            aRadTreeList.ClientSettings.Scrolling.SaveScrollPosition = true;
            TreeListBoundColumn aTreeListBoundColumn = new TreeListBoundColumn();
            aTreeListBoundColumn.DataField = @"id";
            aTreeListBoundColumn.UniqueName = @"id";
            aTreeListBoundColumn.HeaderText = @"ID";
            aRadTreeList.Columns.Add(aTreeListBoundColumn);
            TreeListImageColumn aTreeListImageColumn = new TreeListImageColumn();
            aTreeListImageColumn.UniqueName = @"imageColumn";
            aTreeListImageColumn.HeaderText = @"Type";
            aTreeListImageColumn.ImageUrl = @"~/images/excel.png";
            //aTreeListImageColumn.ImageWidth = Unit.Pixel(20);
            //aTreeListImageColumn.ImageHeight = Unit.Pixel(20);
            aRadTreeList.Columns.Add(aTreeListImageColumn);
            aTreeListBoundColumn = new TreeListBoundColumn();
            aTreeListBoundColumn.DataField = @"name";
            aTreeListBoundColumn.UniqueName = @"name";
            aTreeListBoundColumn.HeaderText = @"Nom";
            aRadTreeList.Columns.Add(aTreeListBoundColumn);
            string[] aStringArr = new string[1];
            aStringArr[0] = @"id";
            aRadTreeList.DataKeyNames = aStringArr;
            aRadTreeList.ClientDataKeyNames = aStringArr;
            aStringArr = new string[1];
            aStringArr[0] = @"idPere";
            aRadTreeList.ParentDataKeyNames = aStringArr;
            aRadTreeList.NeedDataSource += new EventHandler<TreeListNeedDataSourceEventArgs>(RadTreeList_NeedDataSource);
            aRadTreeList.ItemDataBound += new EventHandler<TreeListItemDataBoundEventArgs>(RadTreeList_ItemDataBound);
            aRadTreeList.ClientSettings.ClientEvents.OnItemDblClick = @"ItemDblClick";
            aRadTreeList.Width = Unit.Percentage(100);
            RadTreeListDocDiv.Controls.Add(aRadTreeList);
 }
Bernard
Top achievements
Rank 1
 answered on 27 Feb 2012
2 answers
76 views
is it possible to have a loadingpanel in a radslidingpane activated by a button in the radslidingpane while trying to load a radgrid?

I've tried all sorts of things and have been unsuccessful.

thanks
Steven
Top achievements
Rank 1
 answered on 27 Feb 2012
1 answer
246 views
I have a RadGrid that shows or hides data in a certain row based on some logic in my RadGrid1_ItemDataBound method. 

I am trying to show the column and only certain rows on the export.

RadGrid
First Name   MVP
Fred             Yes
John             No
Bill
Stan             Yes
Jack             Yes

Export to Excel
First Name   MVP
Fred             Yes
John             No
Bill                Yes
Stan             Yes
Jack             Yes

As you can see I can hide "Yes" in the codebehind of the RadGrid1_ItemDataBind method, but it appears in the Export.

How can I get "Yes" to NOT appear in the export to excel?

protected void ButtonExcel_Click(object sender, System.EventArgs e)
   {
      ConfigureExport();
      RadGrid Grid1 = (RadGrid)Page.Master.FindControl("Main").FindControl("RadGrid1");
      Grid1.MasterTableView.GetColumn("mvp").Display = true;
      // Logic here to hide certain data in the based on the MVP value
      Grid1.MasterTableView.ExportToExcel();
   }


Richard
Top achievements
Rank 1
 answered on 27 Feb 2012
1 answer
120 views
Hi,
In my page I have used radtextbox to input password. I used code below
<telerik:RadTextBox ID="radtextbox1" runat="server" Width="400px"  TextMode="Password" >
</telerik:RadTextBox>
when using telerik 2009, the width is showing correctly, but when i changed to telerik Q1 2012,I cannot set the width when textmode is password.
Is there any solution for this?
Thanks in advance.
Bozhidar
Telerik team
 answered on 27 Feb 2012
1 answer
106 views
hi

Is it possible to show only month or year for the date navigation?

I want to navigate by month or year only without showing the calendar. Thanks a lot
Peter
Telerik team
 answered on 27 Feb 2012
1 answer
106 views
I have two RadCalendars inside a <div>. I want to be able to hide/show this div with jQuery, however anytime the <div> is shown/hidden the controls are causing a postback, which resets the state of the calendars. This even though the AutoPostBack property is set to "false" (both in the .aspx attribute, and Page_Load of code-behind. WHY? And how can I stop this behavior?

<div id="calendars" style="width: 450px" >
    <div style="float: left">
        <telerik:RadCalendar ID="dpStart" runat="server" AutoPostBack="false"
                                             UseColumnHeadersAsSelectors="False" UseRowHeadersAsSelectors="False" EnableMultiSelect="False"
                                             ShowFastNavigationButtons="False" ShowRowHeaders="False"
                                             RangeMaxDate="2050-12-31" RangeMinDate="2008-01-01" FocusedDate="2008-01-01"
                                             SelectedDate="" Skin="Metro" ViewSelectorText="x" >
                            <ClientEvents OnDateSelected="dpStart_OnDateSelected" OnCalendarViewChanging="OnCalendarViewChanging" />
                        </telerik:RadCalendar>
                    </div>
 
                    <div style="float: right">
                        <telerik:RadCalendar ID="dpEnd" runat="server" AutoPostBack="false"
                                             UseColumnHeadersAsSelectors="False" UseRowHeadersAsSelectors="False" EnableMultiSelect="False"
                                             ShowFastNavigationButtons="False" ShowRowHeaders="False"
                                             RangeMaxDate="2050-12-31" RangeMinDate="2008-01-01" FocusedDate="2008-01-01"
                                             SelectedDate="" Skin="Metro" ViewSelectorText="x" >
                            <ClientEvents OnDateSelected="dpStart_OnDateSelected" OnCalendarViewChanging="OnCalendarViewChanging" />
                        </telerik:RadCalendar>
     </div>
</div>
 
 <button id="button">Toggle</button>
 
<script type="text/javascript">
    $("#button").click(function() {
        $("#calendars").toggle();
     });
</script>
Vasil
Telerik team
 answered on 27 Feb 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?