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

the upload element on my html is as:

<

telerik:RadUpload ID="cmp_ul" runat="server" ControlObjectsVisibility="None" MaxFileInputsCount="1" AllowedFileExtensions=".jpg,.gif,.tif,.bmp,.png" Skin="Telerik" Width="240" />

and on pageload (firefox) fireBug shows the error of
_2f.focus();
where _2f is undefined. This is in addFileInput javascript function.
I suppose, it is trying to focus on file add button, which does not exist.
Can you suggest a way to avoid from this error?
Thank you.
Erjan Gavalji
Telerik team
 answered on 06 Jun 2008
1 answer
129 views
Hello,

Is it possible to render a usercontrol containing an ASP.Net AJAX RadGrid via to string?  I have tried and failed and wanted to see if anyone has gotten it to work.  The code that I use to render is below.

public static string RenderView(string path, object data)  
{  
    Page pageHolder = new Page();  
    UserControl viewControl = (UserControl)pageHolder.LoadControl(path);  
 
    if (data != null)  
    {  
        Type viewControlType = viewControl.GetType();  
        PropertyInfo propertyInfo = viewControlType.GetProperty("DetailsDataSource");  
 
        if (propertyInfo != null)  
        {  
            propertyInfo.SetValue(viewControl, data, null);  
        }  
        else 
        {  
            throw new Exception("View file: " + path + " does not have a public Data property");  
        }  
    }  
 
    pageHolder.Controls.Add(viewControl);  
 
    StringWriter output = new StringWriter();  
    HttpContext.Current.Server.Execute(pageHolder, output, false);  
 
    return output.ToString();  
} 
Rosen
Telerik team
 answered on 06 Jun 2008
1 answer
207 views

Hi all,
i'm using version 2008.1.515 of  RadWindow for Asp.Net Ajax control.

ClientCallBackFunction event not firing with this version, below my code


                function ShowInsertForm(targetPage,callBackFunction,Title) 
                { 
                     
                    var oWindow = radopen (targetPage, "PopUp"); 
                     
                    oWindow.set_title (Title); 
                    oWindow.set_modal (true); 
                    oWindow.setSize(800,400); 
                    oWindow.center(); 
                    oWindow.ClientCallBackFunction = callBackFunction;                     
                     
                    return false; 
 
                } 
 


            function MyCallBackFunction(radWindow, returnValue) 
            { 
                 
                $get('<%= hidId.ClientID %>').value = returnValue.Id; 
                 
                var regione = $find('<%= txtRegione.ClientID %>'); 
                regione.set_value(returnValue.DescRegione); 
                 
            } 
 

PopUp form ok_clicked
function OK_Clicked() 
{ 
   var oWindow = GetRadWindow(); 
   var arg = new Object(); 
 
    arg.Id = '1'; 
    arg.DescRegione = 'aaaaaaa';                 
 
   oWindow.close(arg);       
 
} 

OpenPopUp
<asp:ImageButton ID="btnListaRegione"  
runat="server" SkinID="btnList" OnClientClick="return ShowInsertForm('PopUpRegioni.aspx','MyCallBackFunction','Elenco Regioni');" /> 

Any suggestions?

With RadControl Q3 2007 all works fine.

Thanks in advance,
Flavio
Georgi Tunev
Telerik team
 answered on 06 Jun 2008
3 answers
129 views

I'm doing a rename function and for this I want the old name to be shown in the radprompt. The user can then alter the old name and click OK.

How can this be done and where can I see the various constructors for the radpromt? Could not find it in the docs.

Thanks.
Georgi Tunev
Telerik team
 answered on 06 Jun 2008
5 answers
279 views
With the Q1 update, the way that the ReadOnly attribute affects the style of the RadInput has changed. Before it would lock the control but not change the style. Now it changes the style to match the "disabled" style, which is the "grayed-out" style.

This does not seem to be an improvement as I want a ReadOnly input not a disabled input. How do I change the style to reflect a locked/readonly input versus a gray-out disabled input?

Dennis
Top achievements
Rank 1
 answered on 06 Jun 2008
1 answer
160 views
Hi,

I have a rad grid in which first template column and checkbox control in that column.

I have set  AutoPostBack="false" and write one event   OnCheckedChanged="CheckChanged" at the server side.

in this event I am calculating the count of selected rows and stored it in VewSte("RowCount") variable.
When I select any record by checking that checkbox and change pageindex, then first fire "CheckChanged" event (no of times as many rows selected. e.g. 2 rows selected then 2 times goes to this event) and then pageindexchanged event fire. So I have getting correct result of view state. in these events at serveside.

There is a one button below the RadGrid which is enable disable based on no of rows selected. If no rows selected then that button is disble otherwise enable. So I need viewstate value for decide where button is enable or disable.

I have write client click event of checkbox like OnClick=fnClientClick(),
i which i am getting this viewstate varianble value by using
var count = ''<%=ViewState("RowCount")%>;

but always I get blank. I cannot get true value.

I have also try by replacing viewstate to hiden variable.
but I can not get value...

Can u give me suggetion how can I get the viewstate value at client side?

Thanks
Arti Khachariya






Prangadj
Top achievements
Rank 1
 answered on 06 Jun 2008
1 answer
121 views
First let me say that I am evaluating Telerik 2008 after being very disappointed with one of your competitors (after spending over $10,000 on seats and training).  So far I am very satisifed with Telerik and have convinced my management to buy a few developer seats.

Now, I am having trouble understanding how to use my own styles and skins.  For this conversation I will use the Radmenu.  I have seen examples that say put the styles in ~/RadControls/Menu/Skins and then I have seen examples that say ~/RadControls/Skins.  I have yet been able to get anything to work like this.  Maybe I am not turning on/off some other property but not sure.  Also looking at the samples in the c:\Program Files\Telerik\RadControls for ASPNET Q1 2008 structure there is a Skins folder followed by the different themes followed by the control folder as in C:\Program Files\Telerik\RadControls for ASPNET AJAX Q1 2008\Skins\Vista\Menu.  If I wanted to take - say Vista - and use it for a start of my on theme what would I pull out and how would I structure it in my app?  What confuses me is that at the Vista level there are styles for each control and the one for the menu is called   Menu.Vista.css.

Could someone please explain this to me.  I am afraid that I do not see a clear picture as to how to implement this.  The imbedded styles that come with the Telerik controls are all nice but unfortunately we have multiple clients that have many different themes and we have to create custom themes for each one.

Thanks in advance.

Tom Rigler
Tom
Top achievements
Rank 1
 answered on 06 Jun 2008
10 answers
231 views
Having an issue where Ajax Manager is combining a 'clean' url, with the output from a URL Rewriter.  I notice the non-Prometheus rad Ajax has an AjaxURL property that could correct this behavior, but I can't find anything like this in Ajax Manager documentation.

How do I correct URL Rewriting wierdness with Prometheus Ajax Manager?

this is what is happening:

Url in browser:

/Item/1234213/

Rewritten Url:

/item.aspx?id=1234213

ajax calls go to /Item/1234213/item.aspx?id=1234213 (which messes up the Url rewriter, and causes ajax calls to fail with 500 errors from the server)


David Silveria
Top achievements
Rank 1
 answered on 06 Jun 2008
5 answers
188 views

I am trying to implement load on demand on a tree.  For some reason the NodeExpand event is firing twice duplicating the nodes. 

Here is the ASPX code:

<%@ Page Language="VB" ValidateRequest="False" AutoEventWireup="true" CodeFile="layerProfiles.aspx.vb" Inherits="layerProfiles" %> 
<%@ 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>Layer Profiles</title> 
</head> 
<body> 
    <form id="form1" runat="server">  
    <asp:ScriptManager ID="ScriptManager1" runat="server"></asp:ScriptManager> 
    <div style="width: 250px; float:left">  
        <telerik:RadTreeView ID="availableLayersTree" runat="server" OnNodeExpand="availableLayersTree_NodeExpand">  
        </telerik:RadTreeView> 
    </div> 
    <div style="width: 250px; float:left">  
        <telerik:RadTreeView ID="userTree" runat="server">  
            <CollapseAnimation Type="OutQuint" Duration="100" /> 
            <ExpandAnimation Duration="100" /> 
        </telerik:RadTreeView> 
    </div> 
    </form> 
</body> 
</html> 
 

and the VB code, modified just to test adding a single node:
Imports Telerik.Web.UI  
 
Partial Class layerProfiles  
    Inherits System.Web.UI.Page  
 
    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load  
        If Not Page.IsPostBack Then  
            'generateTree()  
            loadRootNodes()  
        End If  
    End Sub  
 
    Private Sub loadRootNodes()  
        Dim oRootGroups As New GeoNet.LayerGroupsCollection  
        oRootGroups.LoadGroups(False)  
 
        Dim oGroup As GeoNet.LayerGroup  
        Dim oParentNode As RadTreeNode  
        For Each oGroup In oRootGroups  
            If oGroup.ShowInLegend = "true" Then  
                oParentNode = New RadTreeNode(oGroup.LegendLabel, oGroup.ID)  
                oParentNode.ExpandMode = TreeNodeExpandMode.ServerSideCallBack  
                availableLayersTree.Nodes.Add(oParentNode)  
            End If  
        Next  
        oParentNode = New RadTreeNode("New Layer Profile")  
        userTree.Nodes.Add(oParentNode)  
    End Sub  
 
    Protected Sub availableLayersTree_NodeExpand(ByVal sender As Object, ByVal e As Telerik.Web.UI.RadTreeNodeEventArgs) Handles availableLayersTree.NodeExpand  
        'Dim oAuxGroupsCollection As New GeoNet.LayerGroupsCollection  
        'Dim oOriginatingGroup As New GeoNet.LayerGroup(e.Node.Value)  
        'oOriginatingGroup.Children = oAuxGroupsCollection.BuildGroupTree(oOriginatingGroup)  
 
        'If Not oOriginatingGroup.Children Is Nothing Then  
        '    Dim oChildGroup As GeoNet.LayerGroup  
        '    For Each oChildGroup In oOriginatingGroup.Children  
        '        If oChildGroup.ShowInLegend = "true" Then  
        e.Node.Nodes.Add(New RadTreeNode("test", "100"))  
        '        End If  
        '    Next  
        e.Node.Expanded = True 
        e.Node.ExpandMode = TreeNodeExpandMode.ClientSide  
        'End If  
    End Sub  
End Class  
 

What setting am I missing?
Gordon Buxton
Top achievements
Rank 1
 answered on 06 Jun 2008
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?