Telerik Forums
UI for ASP.NET AJAX Forum
2 answers
492 views
Good Afternoon.

I realize there are a large number of threads on similar topics. However, none of the solutions I was able to find have worked.

I am given a list of structs from a function that accesses a database. The structs hold the absolute url path to a web site (potentially to an external site) and the desired text value of the link.  I use the information in this list to construct a string that holds the xml needed to render the rad menu control.  I do this so I can store the string as a session variable so I only need to access the database once.  I then bind the menu to the string:

                string linkMenuXML = Session["quicklinkXML"].ToString();
                LinksMenu.LoadXml(linkMenuXML);

The menu builds just fine but the urls are all relative. 

                 example: NavigateUrl = "www.telerik.com" but the href="http://localhost:5011/www.telerik.com"

I tried using the HrefBaseDir property with no luck.  Am I missing something?  The threads that give the HrefBaseDir property as a solution are all 3 years old or older from what I found.  Is there an updated propery I should use?  The following is an example fuction that builds the linkMenuXML string:



private string getLinksXmlString()
        {
            List<Links> LinksList = new List<Links>();
            string xmlString = "<?xml version=\"1.0\" encoding=\"utf-8\" ?><Menu EnableEmbeddedSkins=\"false\" HrefBaseDir=\"\" Skin=\"NavBarSkin\" EnableScreenBoundaryDetection=\"false\"><Group><Item Text=\"Links\"><Group Flow=\"Vertical\">";

            //putting stuff in the list
            for (int i = 0; i < 10; i++)
            {
                Links temp = new Links();
                temp.Name = "Link Number " + i.ToString();
                temp.NavigateUrl = "www.telerik.com";
                LinksList.Add(temp);
            }

            foreach (Link link in LinksList)
            {
                xmlString += "<Item Text=\"" + link.Name + "\" HrefBaseDir=\"\" NavigateUrl=\"" + link.NavigateUrl + "\"></Item>";
            }

            xmlString += "</Group></Item></Group></Menu>";

            return xmlString;

        }

Thank you in advance for any help you can provide!

Riley Griffin
Top achievements
Rank 1
 answered on 26 Jun 2009
1 answer
61 views
Hello,

i have the following problem with a RadGrid and RadComboBoxes in two template columns. If i choose the WebBlue Skin for all controls and use the RadGrid NextPrevAndNumeric Pager the RadComboBoxes and the pagesize radcombobox have no skin with no script working. I have solved this problem by using the NextPrevNumericAndAdvanced Pager.
Pavlina
Telerik team
 answered on 26 Jun 2009
1 answer
69 views
Hello all, sorry to ask for such a seeminly simple demo, but I am stumped with jquery and how I could go about creating a page that had a block of text (<div id="documentbody">) that I could click on and fire a RadEditor and edit the text.

I have seen the FCKeditor and others do it but I am unsure of how I can do this with the RadEditor.

Any links, info, suggestions would be appreciated.

Rumen
Telerik team
 answered on 26 Jun 2009
1 answer
89 views
I have an interesting scenario, which comes to play on PCs with small resolution.
I have 3 RadDockZones, and the content is placed within the first two.
I also have a RadToolbar which extands 100%.
However when user drag and drops it to the 3rd column, the width of the toolbar does not extand to fill up the now created white space. The only way I was able to fix it, but that is not the solution is to set the width to let's say 120%.
So is there a way, to extand/shrink the RadToolBar based on the drag and dropping that is taking place? Thanks.
Pero
Telerik team
 answered on 26 Jun 2009
1 answer
79 views
Hello,

I was able to enter "1 month ago" in the date field and the system translated the date to "6/1/2009". If I enter "2 days ago" it translated it to "6/20/2009." It seems as long as the first characters of the value entered is numeric the system translates that into a the particular date. Interestingly, if I enter "32 days ago", it translates that into "6/23/1932". To me this should be a classfied as bug since the control should not accept dates that includes this wide range of alpha characters. I use this control throughout my app and having to write handlers to trap this each time would be a great burden.

David
Nikolay Rusev
Telerik team
 answered on 26 Jun 2009
1 answer
110 views
I've read the some posts about this. I've looked at 2 demos, the web mail one and the one under docs titled Search on key press/button click. In both of these examples a seperate search box was used.

What I want to do seems fairly straight forward and revolved around the way the filtering is implemented. Most search screens from google to most apps out there have a number of search fields to fill out, then you click a search button. Using the AutoPostBackOnFilter, then clicking enter works great, except for the autopostback. Users want to be able to fill out several fields, then hit search to find what they are looking for.

What I need to do is use the existing autogenerated filter fields, or templated fields. Then on the click of a search button filter on those fields. Additionally, I want to disable the functionality that will filter when you select a filter type.

Can anyone point me in the right direction? Is there a single javascript funciton exposed, like doFilter() that I can call when the user clicks a button?

Thank you!
Yavor
Telerik team
 answered on 26 Jun 2009
1 answer
107 views
hi telerik people!

I have the following code although im getting stuck in making the listview refresh using ajax from an event within a telerik popup window.

please provide some guidance, many many thanks,

the markup is below:


// javascript

            function myfunction() {

                var oManager = GetRadWindowManager();
                var oMailWnd = oManager.getWindowByName("mywindow");
                oMailWnd.SetUrl(filename);
                oMailWnd.show();
                oMailWnd.setActive(true);
                oMailWnd.center();

                return false;
            }


<asp:PlaceHolder ID="PlaceHolderExistingTracks" runat="server" Visible="true">
                
                
            <script language="javascript" type="text/javascript">
                    
                function Close() {
                    var masterTable = $find("<%= ListView1.ClientID %>").get_masterTableView();
                    masterTable.rebind();
                }
                  
            </script>
               
<telerik:RadScriptManager ID="RadScriptManager1" runat="server">
        </telerik:RadScriptManager>

    <telerik:RadWindowManager EnableEmbeddedSkins="true" ID="RadWindowManager1" VisibleStatusbar="false" runat="server" Skin="Default">
        <Windows>
          <telerik:RadWindow ID="mywindow" Modal="true" Title="xxx" VisibleStatusbar="false" Width="90px" Height="90px" runat="server">
            </telerik:RadWindow>


    <asp:ListView ID="ListView1" runat="server">
       <LayoutTemplate>
          <asp:PlaceHolder runat="server" ID="itemPlaceholder"></asp:PlaceHolder>
       </LayoutTemplate>

       <ItemTemplate>
          <div style="float: left; width: 200px;">
            <a href=""><%# Eval("test") %></a>
          </div>
          <div style="float: left; width: 200px;">
            <%# Eval("test2") %>
          </div>
          <div style="float: left; width: 200px;">
            <a href="javascript:void(0);" onclick="myfunction()" />open window</a>
          </div>
          <div style="clear:both"></div>
       </ItemTemplate>
    </asp:ListView>

</asp:PlaceHolder>


in my popup aspx file
===================


// javascript

 <script type="text/javascript">
        function CloseAndRebind(args)
        {
            GetRadWindow().Close();
            GetRadWindow().BrowserWindow.refreshGrid(args);
        }
     
        function GetRadWindow()
        {
         var oWindow = null;
         if (window.radWindow) oWindow = window.radWindow;
         else if (window.frameElement.radWindow) oWindow = window.frameElement.radWindow;
       
         return oWindow;
        }        
    </script>


markup for popup
==============

<asp:Button ID="ButtonConfirm" runat="server" Text="Confirm" resourcekey="ButtonConfirm" OnClick="ButtonConfirm_Click" />



code behind for popup
==============

not sure what I need here if anything
       

==============
Sebastian
Telerik team
 answered on 26 Jun 2009
2 answers
105 views
This is probably a stupid question but...

I have a set of Telerik (or simply ASP.Net) controls on a page.
In Visual Studio, I can assign a server side event by double clicking on the object in the Design mode view.

Now, because I want to lay all this out nicely, I organise all this within an ASP Table... and I don't seem to have access to the events of all controls within the table.

Everything seems fine if I use an HTML table instead.

Is that by design? Is it because the ASP Table grabs all the (click) events instead of the control inside?


Sorry if the question is a bit basic but this is not my main expertise...


Many thanks


Eric
Eric
Top achievements
Rank 1
 answered on 26 Jun 2009
2 answers
112 views
I have a page with several dynamically added RadEditors inside an ajax panel, which is inside a RadSplitter. When ever an Ajax request is complete, I resize the splitter so that the panes are equal height.

function resizeDashboardSplitter() { 
    var contentHeight = $('#cms-content-pane').height(); 
    var treeHeight = $('#cms-site-explorer').height(); 
    var newHeight; 
    newHeight = contentHeight > treeHeight ? contentHeight : treeHeight; 
    dashboardSplitter.set_height(newHeight + 15); 
function dashboardSplitterLoaded(splitter, args) { 
    dashboardSplitter = splitter; 
    var prm = Sys.WebForms.PageRequestManager.getInstance(); 
    prm.add_endRequest(resizeDashboardSplitter); 
    resizeDashboardSplitter(); 

The RadEditor loads before the resize, causing the content area to sometimes be squished if the page gets taller. (this is in firefox 3, ie8 seems to work fine.)

Screenshot: squished

If i call the RadEditor method _resizeContentArea from the console of Firebug, it seems to fix the issue. So I added the following javascript:
var radEditors = new Array(); 
function resizeRadEditors() { 
    for (i = 0; i < radEditors.length; i++) { 
        radEditors[i]._updateEditorSize(); 
        radEditors[i]._resizeContentArea(); 
 
    } 
function onEditorLoaded(editor, args) { 
   addEditorStylesheet(editor, args); // not relevant 
   editor.add_modeChange(addEditorStylesheet); // not relevant 
   radEditors.push(editor); 

However, this just made the RadEditor jump to 750px tall, even though it was set at 300px. Any suggestions on how I can fix it?

Thanks!


dlamprey
Top achievements
Rank 2
 answered on 26 Jun 2009
3 answers
106 views
Hi there,

We are using the Rad editor ..It works very nicely,My only concern is that when I click on Apply CSS it lists a long list of CSS.We do have a couple of web applications on this server and it gets the CSS from everywhere.Can I restrict the Apply CSS tab to get only the CSS from this current web application,or canI hide the CSS i don't need.

Any help would be much Appreciated .

Thanks in Advance
Arjita

Rumen
Telerik team
 answered on 26 Jun 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?