Telerik Forums
UI for ASP.NET AJAX Forum
0 answers
143 views

Hello

I have a tabstrip on a page.  On a few applications I need to do a complete postback to upload files or reload data.

I want to remember the tab they were on and reload that page.

 

I have the following code working in page load

 

        If Not Page.IsPostBack Then  
            Dim TheTab As String = "" 
            TheTab = Session("Tab")  
 
            If TheTab <> "" Then  
 
                Try  
                    ' Set Tabstrip  
                    RadTabStrip1.FindTabByText(Session("Tab")).Selected = True 
                    'Set MultiPagePage  
                    RadMultiPage1.FindPageViewByID(RadTabStrip1.SelectedTab.PageViewID).Selected = True 
                    Session("Tab") = ""  
                Catch  
                    ' OK if it fails  
                End Try  
            End If  
        End If  
 
        'Reset Tab Session  
        Utilities.SetSession("Tab", RadTabStrip1.SelectedTab.Text) 

However i have to set the tabstrip to autopostback to get this. The tabs perform WAY ! better clicking between them w/o it and there is absolutely no need to do a postback on just clicking between pages.

I am bad at Javascript - probably why i write in VB  Is there an easy conversion of this method on the client side ?
Or an example i am not finding ?




David
Top achievements
Rank 1
 asked on 31 Jul 2009
3 answers
242 views
Hi,

I have a RadGrid to which I am applying custom paging and filtering. Radgrid only fetches and displays data depending on the page size. For example, If I have a display 1million records and my pagesize is 10, then my view will fetch and displays only 10 records filling virtualItemCount as 1million.

Now, I want to export this data to CSV, PDF and Excel. Export settings is exporting only data(in this case 10records) as ouput to a file but I want to export 1million records in this case.

Is there anyway to give another set to the export settings to export to a file.

Thanks,
Mahesh
Pavlina
Telerik team
 answered on 31 Jul 2009
2 answers
208 views
Hi i have created menu using Panel bar of Rad controls. And i am loading it dynamicaly from the database. But i can manage to load only the main menu. Not the sub menus inside the main menu. Can you give an example to solve this. Moereover i need this expan and collapase on mouse hover,.
Vijayaragavan
Top achievements
Rank 1
 answered on 31 Jul 2009
3 answers
142 views
I want to have a calendar where a date selection causes a user to be redirected to an appropriate page. So, I set AutoPostBack="true" for the RadCalendar control and handle the SelectionChanged event on the server-side. Although, if user navigates from the page back to the calendar and hover the mouse over the previously selected date it appears selected.

How to replicate...

Markup:
<html xmlns="http://www.w3.org/1999/xhtml"
<head runat="server"
    <title>Untitled Page</title> 
    <meta http-equiv="expires" content="-1" /> 
    <meta http-equiv="Pragma" content="no-cache" /> 
</head> 
<body> 
    <form runat="server"
    <asp:ScriptManager runat="server" /> 
    <telerik:RadCalendar ID="RadCalendar1" runat="server" AutoPostBack="true" /> 
    </form> 
</body> 
</html> 

Codebehind:
    Private Sub RadCalendar1_SelectionChanged(ByVal sender As ObjectByVal e As Telerik.Web.UI.Calendar.SelectedDatesEventArgs) Handles RadCalendar1.SelectionChanged 
        Dim d As String = e.SelectedDates(0).Date.ToShortDateString() 
        RadCalendar1.SelectedDates.Clear() 
        Response.Redirect("WebForm1.aspx?date=" + d) 
    End Sub 

 When the user presses the browser back button I want the calendar to be "fresh" and not have the hidden selection.

Thanks.

Martin
Telerik team
 answered on 31 Jul 2009
1 answer
91 views
Hello,

I am using a RadEditor control which loads for the first time as a result of a partial postback.
When I'm using Firefox (3.5.1), the button causes the Editor to render with the text area locked for editing, and sometimes the text area is also much smaller then expected.

Here is the source code of an ASPX and ASCX file which reproduces the problem:

RadEditorAjax.aspx:

<%

@ Page Language="C#" AutoEventWireup="true" %>

 

<%

@ Register TagPrefix="uc" TagName="radAjax" Src="radAjax.ascx" %>

 

<%

@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>

 

 

<!

 

DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">

 

<

 

html xmlns="http://www.w3.org/1999/xhtml" >

 

<

 

head runat="server">

 

 

<title></title>

 

<

 

script runat=server>

 

 

protected void btn1_Click(object sender, EventArgs e)

 

{

ucradAjax.Visible =

true;

 

}

</

 

script>

 

</

 

head>

 

<

 

body>

 

 

<form id="form1" runat="server">

 

 

 

<telerik:RadScriptManager ID="TheScriptManager" EnablePartialRendering="true" AsyncPostBackTimeout="3600" runat="server" >

 

 

<Services>

 

 

<asp:ServiceReference Path="UserSession.asmx" />

 

 

</Services>

 

 

</telerik:RadScriptManager>

 

 

 

<telerik:RadAjaxPanel ID=upMain runat=server RenderMode=Inline UpdateMode=Conditional>

 

 

<ContentTemplate>

 

 

 

<uc:radAjax ID=ucradAjax runat=server Visible=false />

 

 

<asp:Button ID="btn1" runat=server OnClick="btn1_Click" />

 

 

 

</ContentTemplate>

 

 

</telerik:RadAjaxPanel>

 

 

 

 

</form>

 

</

 

body>

 

</

 

html>

 


radAjax.ascx:

<%

@ Control Language="C#" AutoEventWireup="true" %>

 

<%

@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>

 

<

 

telerik:RadAjaxManagerProxy ID="AjaxManagerProxy1" runat="server"></telerik:RadAjaxManagerProxy>

 

 

<telerik:RadEditor ID="rdeProctPolicy" Runat="server"

 

 

Width="800px" Height="400px"

 

 

DialogsScheme="Default"

 

 

ToolsOnPage="True"

 

 

Language="en-US"

 

 

ShowHtmlMode="True"

 

 

SaveInFile="True"

 

 

SaveAsXhtml="True"

 

 

DocumentsPaths="~/Docs, ~/Marketing"

 

 

StripAbsoluteImagesPaths="True"

 

 

CausesValidation="True" />

 


Thanks for your help,
Lior
Rumen
Telerik team
 answered on 31 Jul 2009
1 answer
139 views

Hi there

 

We’re pretty new to RadEditor, however, we’re seeing some inconstancies when pasting plain text paragraphs into the editor.

 

Anyway, sometimes when I paste (ctrl v paste) three plain text paragraphs  the resulting HTML paras will be wrapped in <p> tags, some times there will be no <p> tags and the lines will be separated with <br /> tags and sometimes one paragraph will have <p>’s and another will not.

 

I’m assuming there is a setting I can configure to produce consistent results?!

 

Historically clients have a habit of messing up the formatting when using Rich Text editors so our advise is always ‘paste to plain text then paste to the editor’, hence the question.

 

Many thanks

 

Stephen


Rumen
Telerik team
 answered on 31 Jul 2009
11 answers
129 views
Hello,
I want to avoid displaying the navigateurl when mouse is over a menuitem (or RadPanelBarItem) and I try to use, as explained in doc the OnClientMouseOver and OnClientMouseOut
client messages to trigger a javascript displying the menuItem Text as

function OnClientMouseOver(panelbar, args)   
{  
    window.status  =   args.get_item().get_text();   

but it has no effect: still the href of anchor is displayed.
Is there some security trick  or a bug in my code ? when I insert alert, I really get correct text.

Notice that I think this should be an option for radMenu and RadPanelBar ?
Thanks for help.


CS
Paul
Telerik team
 answered on 31 Jul 2009
1 answer
102 views

We are trying to use the RadPanelBar to create an FAQ.  The result intended would have the question in the in the panel bar and when you click on it, the answer is shown in the expanded section.  In the answer we also want to have some ‘See also’ questions that would be also be panel items that can be expanded to show the answer.  We are running into a problem on expanding the ‘See Also’ answers.  When we click on the ‘See Also’ answer, the JavaScript error “this.getLinkElement() is null or not an object” occurs.  The generation of the RadPanelBar is all generated in the code-behind.  The code is as follows:

 

HTML

            <td>

                <telerik:RadPanelBar ID="TestPanelBar" runat="server" Width="100%" Height="100%" Style="white-space: normal" ExpandMode="SingleExpandedItem" AllowCollapseAllItems="true" EnableEmbeddedSkins="false">

                </telerik:RadPanelBar>

            </td>

 

 

Code- Behind

 

            for (int i = 0; i < 10; i++)

            {

                Telerik.Web.UI.RadPanelItem questionItem = new Telerik.Web.UI.RadPanelItem(string.Format("{0} Question", i.ToString()));

                Telerik.Web.UI.RadPanelItem answerItem = new Telerik.Web.UI.RadPanelItem();

                answerItem.Controls.Add(new Label() { Text = "this is the answer" });

 

                for (int j = 0; j < 3; j++)

                {

                    Telerik.Web.UI.RadPanelItem relatedQuestionItem = new Telerik.Web.UI.RadPanelItem(string.Format("See Also {0}", j.ToString()));

                    Telerik.Web.UI.RadPanelItem relatedAnswerItem = new Telerik.Web.UI.RadPanelItem();

 

                    relatedQuestionItem.Width = Unit.Percentage(95);

                    relatedAnswerItem.Width = Unit.Percentage(95);

 

 

                    Label answerLabel = new Label();

                    answerLabel.Text = string.Format("See Also Answer {0}", j.ToString());

                    relatedAnswerItem.Controls.Add(answerLabel);

 

                    relatedQuestionItem.Items.Add(relatedAnswerItem);

                    answerItem.Items.Add(relatedQuestionItem);

 

                }

 

                answerItem.Expanded = true;

 

                questionItem.Items.Add(answerItem);

 

                TestPanelBar.Items.Add(questionItem);

                TestPanelBar.Width = Unit.Percentage(100);

            }

 

            TestPanelBar.Items[0].Expanded = true;

 

 

The exact line of code that is causing the problem is relatedAnswerItem.Controls.Add(answerLabel);.  As soon as we add a control to the RadPanelItem, this error occurs.

 

Is there a way to add a control (note we are adding a user control, not a label, the code is above is so you can reproduce the error) to a RadPanelItem and still be able to add a ‘sub’ item.  Or do you have another suggestion how to accomplish this.

Paul
Telerik team
 answered on 31 Jul 2009
1 answer
89 views
Folks,

Here is the Scenario.

I have a Master Page (Main.Master) and 2 Content Pages(Default & Default1.aspx). Master Page page has Company Header Logo and Other controls that are common to both .aspx Pages.. When I add both .aspx pages in the Project, I indicated Main.Master is their Master Page.

I have  Link Buttons controls in Both Pages for Navigation Purposes. For Default.aspx Link1 Button On Click Event, Resonse.redirect("Default1.aspx") and Vice Versa.

My question is there any sample site or example in Radcontrols for Asp.Net Ajax to accomplish the Task? That will be appreciated.. I looked at Live Demos/Menu/Examples/Functionality/Templates/DefaultVB.aspx, tried to implement in Master Page. But the problem is that If I click the content pages Navigation Buttons, I loose my Master Page header contents (TEMPLATES logo in this example). I do not want to loose the header content of my Master Page, I want to retain them as I navigate between content pages.   In the Past, I did this type of Job via SiteMapDataSource but did not find any samples in so far in Rad Contols..I am using RadControls for ASP.NET AJAX Q2 2009.

Thanks

Ghulam

Paul
Telerik team
 answered on 31 Jul 2009
1 answer
222 views
Hello Team,

I am having a grid with template column and having two data field to be displayed in it like
  <telerik:GridTemplateColumn DataField="Subject"  HeaderText="Coaching Activities & Relationship" 
                            UniqueName="Subject" SortExpression="Subject" FilterControlWidth="95%" AutoPostBackOnFilter="true"  CurrentFilterFunction="Contains" > 
                             <HeaderStyle HorizontalAlign="Center" Width="300px"  /> 
                            <ItemStyle HorizontalAlign="left" Width="300px" /> 
                            <ItemTemplate> 
                                <b> 
                                    <asp:Label ID="lblSubject" runat="server" Text='<%# DataBinder.Eval( Container, "DataItem.Subject") %>'></asp:Label><br /> 
                                </b> 
                                <asp:Label ID="lblNoteDetail" runat="server" Text='<%# DataBinder.Eval( Container, "DataItem.NoteDetail") %>'></asp:Label> 
                            </ItemTemplate> 
                        </telerik:GridTemplateColumn> 
I need the filter for both the data field with single text box,
Please let me know if you have any way for this.

Thanks
Amol
Princy
Top achievements
Rank 2
 answered on 31 Jul 2009
Narrow your results
Selected tags
Tags
+? more
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?