Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
94 views
Hello all,

I have a question I can hope you all can answer quick.  I am new to the AJAX controls and as a first app, I've created a little Site Map application.  It has a RadAjaxPanel, a RadSplitter, some RadPanes, etc.  In the left pane I have a RadTreeview.  Onnodeclick, it does an AJAX postback and populates a RadEditor in the right pane, which that page's content.  It's really simple and has allowed me to get familiar with some new controls.

This all works perfect in IE.  But I noticed that in Firefox, after you clicked the first node (causing the AJAX postback) the RadEditor would stop being clickable.  I remembered this issue from long ago, so I looked up the latest syntax to call the set_visible() method.  I implemented the following:

<script type="text/javascript"
    Sys.Application.add_load(function() { 
        var editor = $find("<%=RadEditor1.ClientID%>"); 
        editor.set_visible(true); 
        } 
    ); 
</script> 

Now it works great.  I can click in the editor and edit content.  BUT, the toolbars still do not work.  When I click them, nothing happens, and if I set the ToolbarMode to ShowOnFocus, it never comes up again after the first treeview node click.

Is there something I am missing, or need to do to re-enable the toolbar?

Thanks
Tervel
Telerik team
 answered on 06 Jan 2009
1 answer
141 views
I'm working through the RADControlsAJAXSoftware training, following instructions on page 31:

1.Add a

 

RadToolBar underneath the tab strip. Set the Skin property to "WebBlue". Set the Width property to

 

"70px" and the

 

Orientation property to Vertical.

 

2. Open the RadToolBar Smart Tag and select the

 

Build RadToolBar... option.

 

3. Add a

 

RadToolBarDropDown and a RadToolBarSplitButton with text "Edit" and "Print". Set the ImageUrl

 

properties for these items to "\images\EditInformationHS.png" and "\images\PrintHS.png" respectively.

4. Select the "Edit" item and add three

 

RadToolBarButton child items with Text "Cut", "Copy" and "Paste". Set

 

the ImageUrl properties for these items to "\images\CutHS.png", "\images\CopyHS.png" and

"\images\PasteHS.png" respectively.

5. Select the "Print" item and add two RadToolBarButton child items with Text "Print" and "Preview". Set the

ImageUrl properties for these items to "\images\PrintHS.png" and "\images\PreviewHS.png" respectively.

Step 3, The RadToolBarSplitButton, the ImageURL in design time displays a missing icon image, rather than the actual image. I've replaced it with a RadToolBarDropDown and the issue goes away. It does appear correctly at runtime. Is this a bug?

Please keep me posted, thanks!
-Vinny Davi

Yana
Telerik team
 answered on 06 Jan 2009
2 answers
117 views

Hi.. I have an ajax panel  and a radgrid within it... 
The ItemCommand calls the following.. But nothing is displayed.. what I am I doing wrong.?  thanks again



 

private void  ShowAlert()

 

{

 

string script = "<SCRIPT LANGUAGE='JavaScript'> ";

 

script +=

"alert('HELLO');";

 

 

script +=

"</SCRIPT>";

 

 

this.RadAjaxPanel1.ResponseScripts.Add(script);

 

}

Jon
Top achievements
Rank 1
 answered on 06 Jan 2009
1 answer
128 views
Hello,

I would like to use html text in a RadWindow.  I am working in VB.NET, and ideally, several sections of html text would be in the VB code so that when needed, one selection can be bound to a RadWindow. 
Any suggestions will be appreciated.

Tony
Georgi Tunev
Telerik team
 answered on 06 Jan 2009
2 answers
341 views
I have this code
<asp:CustomValidator id="valreqEditComment"
                                                                   ControlToValidate="reEditComment"
                                                                   ClientValidationFunction="TestWordCount"
                                                                   Display="Static"
                                                                   ErrorMessage="A value must be entered for the Comment field!"
                                                                   runat="server"/>

but it never gets here:

function TestWordCount(sender, args)
         {
            alert('hello world');
            if (sender.get_text().search("file://w%7b5/,}") == -1)
            {
               
               
                args.IsValid = false;
            }
            else
             {
                args.IsValid = true;
   

            }
          

Zed
Top achievements
Rank 1
 answered on 06 Jan 2009
1 answer
172 views
Hi, I have created a dynamic reporting web part that will execute a stored procedure and display the result in a RadGrid.  I have also added the option to export the data to a csv.  Everything works fine in the webpart until the export event is raised.  The file can be opened or saved as expected; however, you can no longer raise any events in the webpart.  Here are the main peices of my webpart:

 

Protected Overrides Sub CreateChildControls()

 

 

Try

 

 

MyBase.CreateChildControls()

 

 

Dim imgClear As New Image

 

 

Dim pbTrigger As New PostBackTrigger

 

pbTrigger.ControlID = btnDownload1.ID

 

'Set up the form for date parameters

 

pnlDates.ID =

"pnlDate" + Me.ID

 

lblBeginDate.CssClass =

"form"

 

lblEndDate.CssClass =

"form"

 

 

'Populate the date fields with the default values

 

txtBeginDate.CssClass =

"content"

 

txtEndDate.CssClass =

"content"

 

btnDownload1.ImageUrl =

"/Style Library/images/download1.gif"

 

btnRetrieve.ImageUrl =

"/Style Library/en-us/custom/retrieve.gif"

 

imgClear.ImageUrl =

"/Style Library/en-us/custom/clear.gif"

 

pnlDates.Controls.Add(lblBeginDate)

pnlDates.Controls.Add(txtBeginDate)

pnlDates.Controls.Add(lblEndDate)

pnlDates.Controls.Add(txtEndDate)

pnlDates.Controls.Add(

New LiteralControl("<div class=""subButton""><a href=""javascript:document.forms[0].reset()"">"))

 

pnlDates.Controls.Add(imgClear)

pnlDates.Controls.Add(

New LiteralControl("</a>"))

 

pnlDates.Controls.Add(btnDownload1)

pnlDates.Controls.Add(btnRetrieve)

pnlDates.Controls.Add(

New LiteralControl("</div><br /><br />"))

 

 

Me.Controls.Add(pnlDates)

 

 

'Set up the radgrid properties

 

oGrid.ID =

"oGrid"

 

oGrid.EnableEmbeddedSkins =

False

 

oGrid.Skin =

"NNG"

 

oGrid.Attributes.Add(

"runat", "server")

 

oGrid.AutoGenerateColumns =

True

 

oGrid.ShowHeader =

True

 

oGrid.PagerStyle.Mode = GridPagerMode.NextPrevAndNumeric

oGrid.PagerStyle.Position = GridPagerPosition.Bottom

 

' Display the download button if enabled

 

btnDownload2.ImageUrl =

"/Style Library/images/download2.gif"

 

pnlExport.ID =

"pnlExport" + Me.ID

 

pnlExport.Controls.Add(

New LiteralControl("<div class=""subButton"">"))

 

pnlExport.Controls.Add(btnDownload2)

pnlExport.Controls.Add(

New LiteralControl("</div><br /><br />"))

 

 

Me.Controls.Add(pnlExport)

 

 

Me.Controls.Add(oGrid)

 

 

Catch ex As Exception

 

 

Dim ctx As HttpContext = HttpContext.Current

 

childException = ex

 

End Try

 

 

End Sub

 

 


Protected
Sub btnDownload_Click(ByVal sender As Object, ByVal e As System.Web.UI.ImageClickEventArgs) Handles btnDownload1.Click, btnDownload2.Click

 

oGrid.ExportSettings.ExportOnlyData =

False

 

oGrid.ExportSettings.IgnorePaging =

True

 

oGrid.ExportSettings.OpenInNewWindow =

True

 

 

If fileName.Length > 0 Then

 

oGrid.ExportSettings.FileName = fileName

 

End If

 

oGrid.MasterTableView.ExportToCSV()

 

End Sub

 



 


 

 

Private Sub CustomReportingWebPart_PreRender(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.PreRender

 

 

Try

 

 

 

 

 

'We need to see if we should display the date forms fields

 

 

 

 

pnlDates.Visible = useDateParams

 

'If the date parameters are not visible, then we need to display the export panel, otherwise

 

 

 

 

 

' the export button is displayed with the clear and retreive buttons

 

 

 

 

 

If useDateParams Then

 

 

 

 

 

Me.pnlExport.Visible = False

 

 

 

 

 

Else

 

 

 

 

 

Me.pnlExport.Visible = True

 

 

 

 

 

End If

 

 

 

 

oGrid.AllowPaging = enablePaging

oGrid.AllowFilteringByColumn = enableFiltering

oGrid.AllowSorting = enableSorting

oGrid.ClientSettings.Scrolling.AllowScroll = enableScrolling

oGrid.ClientSettings.Scrolling.UseStaticHeaders = enableStaticHeaders

oGrid.PageSize = pageSize

oGrid.Width = Unit.Percentage(100)

 

'Populate the date fields with correct values

 

 

 

 

lblBeginDate.Text = beginDateLabel +

"<br>"

 

 

 

 

lblEndDate.Text =

"<br>" + endDateLabel + "<br>"

 

 

 

 

txtBeginDate.Text = dBeginDate.ToString(

"MM/dd/yyyy")

 

txtEndDate.Text = dEndDate.ToString(

"MM/dd/yyyy")

 

 

'Bind the datasource to get the latest changes

 

 

 

 

oGrid.DataSource = getDatavalues()

oGrid.DataBind()

 

Catch ex As Exception

 

 

Dim ctx As HttpContext = HttpContext.Current

 

childException = ex

 

End Try

 

 

 

 

 

End Sub

 

 

Any ideas on how to resolve this issue?

Thanks!

Sebastian
Telerik team
 answered on 06 Jan 2009
4 answers
517 views
Hi All

I would like to add a  HyperLink to a RadTextbox, but i cant find the documentation on how to do this, Can anyone help me with the links on where to find help on this.

Thank you
Omlac
Top achievements
Rank 1
 answered on 06 Jan 2009
1 answer
146 views
Hi,

I am using TimePicker control. I am using same screen for insert and edit record. For new add record, i can get the correct time. But for edit record, i assign the time(hh:mm) vale from db to TimePicker control and then change the value. But I still get the current system time. If i am not assign the value, i got the  correct time.

DateTime

? dt = Convert.ToDateTime(rtpStartTime.SelectedDate);

 



Please let me know how do i set the option.
Daniel
Telerik team
 answered on 06 Jan 2009
1 answer
84 views
Hi guys.
Im building a blog using the radeditor. Im trying to control the amount of images uploaded by any user using the FileUploadEvent.
The thing is im storing the ammount of images uploaded on the control (the blog control)'s viewstate. The thing is, when I ask for the viewstate (and actually for any other control contained on the Blog Control, for example a given text field) It returns me a null.
Here's the code:

int currentUploadedImages = Entry.ImageCount;
        currentUploadedImages++;
        if (currentUploadedImages > 4) {
            File.Delete(fileName);
            EntryMessage.ShowMessage("Lo sentimos, sólo puedes cargar 4 imágenes por relato. Elimina una de las imágenes ya cargadas e inténtalo de nuevo."
                , ModalMessageType.Forbidden);
        }
        Entry.ImageCount = currentUploadedImages;
        return true;

Also the rad editor is displaying the stylesheet loaded by the Masterpage/Page and I dont need it to do it.
Aditionally I have an Image wich displays a modal pop up extender that has the post's preview. In firefox works great, but in internet explorer the function isn't fired until any other control does a "postback" (for example I have a button that tags the entry, if I tag the entry and then press the preview works great, but If I haven't done anything it doesnt fires the javascript function

By the way. The Blog Control is inside an ajax update panel

Merry Xmas , Happy new Year and thanks for the help
Regards
Jaime.
Nikolay Raykov
Telerik team
 answered on 06 Jan 2009
1 answer
49 views
Quick and simple question, can I use FormDecorator in VS 2003 ?

If so how do i import it onto my toolbox, i've had no joy as yet and hoping im doing something simple very wrong.

rgds
Georgi Tunev
Telerik team
 answered on 06 Jan 2009
Narrow your results
Selected tags
Tags
+? more
Top users last month
Shiori
Top achievements
Rank 2
Iron
Tien
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Rob
Top achievements
Rank 4
Bronze
Bronze
Iron
Geoff
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Shiori
Top achievements
Rank 2
Iron
Tien
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Rob
Top achievements
Rank 4
Bronze
Bronze
Iron
Geoff
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?