Telerik Forums
UI for ASP.NET AJAX Forum
3 answers
561 views
I am loading user controls dynamically while using tabstrip. On one of the tab user control I have save button.

<

 

asp:Button ID="btnSave" runat="server" Text="Save" OnClientClick="return validate();" onclick="btnSave_Click" />
the javascript function is written in external .js file.

In one scenario, if the javscript validations pass, I want the server side click event to execute and open radwindow on server side using the below code. But the server side event is not executing. if I take out onClientClick event then only server side event is firing. Also the  radalert doesnt pop out.

 

string

 

openWindow = "<script language='javascript'>function f(){var navUrl = 'http://www.telerik.com';var oWindow = radopen(navUrl);oWindow.set_width(300);oWindow.set_height(300);oWindow.center();Sys.Application.remove_load(f);};Sys.Application.add_load(f);</script>";

 

Page.ClientScript.RegisterStartupScript(

this.GetType(), "radalert", openWindow);

here is the validate function in javascript file:

function validate()

 

if

 

(!rdChecked) {

 

    radalert('Validation failed

', 300, 100, '');

 

 

return false;

 

}

else {

 

 

 

return true;

 

}

 


any ideas?

cognos s
Top achievements
Rank 1
 answered on 13 Oct 2009
7 answers
142 views
Hi Telerik supporter,

Even though, i saw Rayan has asked about unable selecting a range of items in ListBox control by Shift+click in previously. It's same issue with me in the latest Telerik controls release. Would you pls. help to give a tip to work around or confirm that is still in To-do list of Telerik development team?

The orginal post of Rayan is at http://www.telerik.com/community/forums/aspnet-ajax/listbox/multiple-item-selection-quot-shift-quot-key.aspx

Many thanks,
Triet Pham.
Paul
Telerik team
 answered on 13 Oct 2009
2 answers
75 views
Hello,

I've a problem by diasable ContextMenu in a dynamic generated RadWindow.
Here is my Code:

function OnClientFileOpen(sender, args)  
            {  
               var item = args.get_item();  
               if (item && !item.isDirectory())  
               {  
                    var image = new Image();  
                    image.src = item.get_url();                      
                    var oWnd = $find("<%= RadWindow1.ClientID %>");  
                    oWnd.setUrl(item.get_url());  
                    oWnd.set_width(image.width + 37);  
                    oWnd.set_height(image.height + 70);  
                    oWnd.show();  
                    image.onContextMenu = 'return(false)';  
               }  
            }  

<telerik:RadFileExplorer ID="RadFileExplorer1" runat="server" 
                Height="487px" Width="450px" EnableOpenFile="false" OnClientFileOpen="OnClientFileOpen" 
                OnClientItemSelected="OnClientItemSelected" Skin="Black"   
                EnableCreateNewFolder="False" EnableTheming="False" EnableViewState="False"   
                VisibleControls="TreeView, Grid, Toolbar">  
            <Configuration SearchPatterns="*.jpg"></Configuration> 
            </telerik:RadFileExplorer> 
            <telerik:RadWindow ID="RadWindow1"  runat="server" Skin="Black" Behavior="Close" VisibleStatusbar="false" > 
            </telerik:RadWindow> 

 


At the Image in the RadWindow I want to disable Contextmenu.

Any Ideas?

Thanks,
Best Regards

 

 

 

 

 

 

 

 

 

Fiko
Telerik team
 answered on 13 Oct 2009
1 answer
270 views
Please find the the requirements I am working on:

  1. On click of header column text, sorting should nothappen.
  2. Header should display default sort icon - Up and Down arrows.
  3. On click on up arrow and down arrow icons column should be sorted in ascesding and descending order respectively.

 

Challanges - 
  
  1. How to disable sorting command triggering on column header click? It's rendered as a link button I believe. Not sure where exactly it's hooking the click event.
  2. Default sort icon is a single image containing both up and down arrows - How we can segregate the sort behavior on up and down arrows?

    Would appreciate any inputs.

    Thanks,
    Aneesh
Pavlina
Telerik team
 answered on 13 Oct 2009
1 answer
126 views
First off, this doesn't affect FF.  So far, it only affects IE 8.  I'm not sure why this is happening, but I wanted you to be aware.

SCENARIO:
I have a RadGrid with a PopUp edit form and a RadWindowManager on the page.  The PopUp edit form has an anchor that, when clicked, executes a Javascript that opens the RadWindow. Currently the Javascript is in an external file, however, I've tried it in the external source file and in the .net form <head /> as well.  Both deliver the same results.

ISSUE:
It works great the first time the anchor is clicked, however, after the RadWindow is closed, every time I click the link (whether its on the currently edited item or another), IE throws the Javascript error "The object does not support this property or method" on the line:

Sys.WebForms.PageRequestManager._initialize('ctl00$ScriptManager1'document.getElementById('aspnetForm')); 

I tried both ways in opening the window:

function manageCategories() {  
    var oWnd = window.radopen("./ManageCategories.aspx""manageCategories");  

And the incorrect way (removing the RadWindowManager and opening the window directly)

function manageCategories() {  
    var oWnd = $find(PageControls.manageCategories.id);  
    oWnd.setUrl("./ManageCategories.aspx");  
    oWnd.show();      

Both throw the same error.  I've even put in a temporary "alert('hello');" command inside the function and, again, its displayed once, but every time afterwards, I get the exception.  I have to reload the page in order to "find" the manageCategories function again.

Before I give you the fix, here's additional sample code snippets:

PopUp Form Template (notice the Javascript call at the end of line 9):
                    <FormTemplate>  
                        <table cellspacing="10" style="margin-left:10px;">  
                            <tr>  
                                <td valign="top" align="right" style="width:100px;">Note: </td>  
                                <td colspan="2"><asp:TextBox ID="tbNote" runat="server" TextMode="MultiLine" Rows="6" Columns="50" Text='<%# Bind("note") %>'></asp:TextBox></td>  
                            </tr>  
                            <tr>  
                                <td valign="top" align="right" style="width:100px;">Category: </td>  
                                <td><asp:DropDownList ID="ddlCategory" runat="server" SelectedValue='<%# Bind("categoryID") %>' AppendDataBoundItems="true" DataTextField="category" DataValueField="categoryID" DataSourceID="sqlCategories" ><asp:ListItem></asp:ListItem></asp:DropDownList>&nbsp;&nbsp;&nbsp;[<a onclick="javascript:manageCategories();">Manage Categories</a>]</td>  
                                <td align="right"><asp:Button ID="btnUpdate" runat="server" Text='<%# (Container is GridEditFormInsertItem) ? "Add" : "Update" %>' Width="65" CommandName='<%# (Container is GridEditFormInsertItem) ? "PerformInsert" : "Update" %>' /><asp:Button ID="btnCancel" runat="server" Text="Cancel" Width="65" CausesValidation="false" CommandName="Cancel" /></td>  
                            </tr>  
                        </table>  
                    </FormTemplate> 

RadWindowManager:
    <telerik:RadWindowManager id="radWindowManager" runat="server">  
    <windows>  
        <telerik:RadWindow id="manageCategories" Behaviors="Close" EnableEmbeddedSkins="false" Skin="Elevate" ReloadOnShow="true" 
            Left="250px" Modal="true" Runat="server" Width="275px" Height="300px" Title="Manage Categories" ClientCallBackFunction="categoriesCallback" VisibleStatusBar="false" IconUrl="/favicon.ico" >  
        </telerik:RadWindow>  
    </windows>  
</telerik:RadWindowManager> 


FIX:
Again, the issue is, as far as I can tell, only in IE.  The only way I could fix it was to change the code:

From:
[<onclick="javascript:manageCategories();">Manage Categories</a>

To:
[<onclick="javascript:window.radopen('./ManageCategories.aspx', 'manageCategories');">Manage Categories</a>


So, instead of calling another Javascript function, I'm calling the radopen method directly.  This works in both FF and IE.

It seems that somehow IE is losing the manageCategories function after the radWindow has been opened and closed once.

Don't know, but hopefully this solution may help others and again, pinpoint a small bug?

Thanks guys.
Joshua
Georgi Tunev
Telerik team
 answered on 13 Oct 2009
3 answers
94 views
For some reason, not all of the CSS for my Edit Form Template is being applied.  The containing pop up window is too narrow for the input labels and textboxes and, as a result, they spill outside of the window.  There are also div's within the template which have CSS associated with them that is being lost.  Any idea why this might be?

Thanks,
Tim
Dimo
Telerik team
 answered on 13 Oct 2009
1 answer
88 views

When I want to upload images with the image manager, the upload path seems incorrect. Although the view- and uploadpath are set to the same directory, and I see the correct path when entering the image manager, the uploaded files are being uploaded in an different directory. They're being uploaded in the directory where the user control with the radeditor is in.

How can I fix this?



<telerik:RadEditor id="RadEditor1" runat="server" >     
                 <ImageManager UploadPaths="~/Upload/Industry/New" ViewPaths="~/Upload/Industry/New"  /> 
</telerik:RadEditor> 

Tnx.
Rumen
Telerik team
 answered on 13 Oct 2009
1 answer
122 views
hi
Please help me .
can I download visual style builder for web ?
i have telerik component  from year 2007.and have not style builder , now for create new skins for radMenu need to change it's style
but don't find any link or description for buy or download visual style builder for webforms.
i saw it's video and read this tool but i guess this tool is online and not for buy . :( i don't know 
please help me.


Paul
Telerik team
 answered on 13 Oct 2009
1 answer
87 views
Hi all,

I just need this one and don't 799 to buy the whole collection. Is it possible to only purchase this control from Telerik?

thanks,
Oguzhan
Lin
Telerik team
 answered on 13 Oct 2009
1 answer
138 views
Hi

Using Rad menu in horizontal style across a web page of 900 pixels and there are 6 menu choices and using sitemap to drive choices

Problem is all widths of are just a bit bigger than text and when they are lined up they only go half way across the 900 pixels so a big empty space at end of the menu bar

I would like to be able to spread menu choice width evenly so no space at end - is this possible?

Rgds
stephen
Yana
Telerik team
 answered on 13 Oct 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?