Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
82 views

How to display custom text (in our case numeric value) with hyperlink in any of the date cell of the RadCalendar Control?

 

Refer to snap attached for the presentation we require.

 

Kindly suggest the way to achieve same. Please provide sample code if available which can be referred.

Sebastian
Telerik team
 answered on 09 May 2008
0 answers
102 views
Got an answer to this one, thx a lot!
Timo
Top achievements
Rank 1
 asked on 09 May 2008
1 answer
207 views
Hi all,

I have a radGrid on my page.  For each row, I have a delete button.  When I click the delete button, I call a method that determines if the row in the SQL table should be deleted or not.  I then want to display a simple popup that has a label and an OK button.  I want to be able to change the label text to something like: "Row deleted" or "Row cannot be deleted".

Should I use the radAlert or radWindow for this?  I have tried both and cannot get any popups to display.  I am using AJAX on my page so maybe that has something to do with it.

Can someone show me the ASPX and code behind to accomplish what I want to do?

Thanks,
Bob
Georgi Tunev
Telerik team
 answered on 09 May 2008
1 answer
375 views

I just upgraded my web site from from version 1.7.2.0 to version 2008.1415 of RadControls for ASP.Net Ajax and now I get this... There are no <script/> tags in my <head/> control. This is clearly an issue with the radcontrols. What is the fix?

The Controls collection cannot be modified because the control contains code blocks (i.e. <% ... %>).

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.Web.HttpException: The Controls collection cannot be modified because the control contains code blocks (i.e. <% ... %>).

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Stack Trace:

[HttpException (0x80004005): The Controls collection cannot be modified because the control contains code blocks (i.e. <% ... %>).]
   System.Web.UI.ControlCollection.AddAt(Int32 index, Control child) +218
   Telerik.Web.UI.RadAjaxControl.MoveUpdatePanel(Control initiator, Control updated) +171
   Telerik.Web.UI.RadAjaxControl.PerformRender() +373
   Telerik.Web.UI.RadAjaxControl.OnPageRender(HtmlTextWriter writer, Control page) +1311
   Telerik.Web.UI.RadAjaxControl.RenderPageInAjaxMode(HtmlTextWriter writer, Control page) +152
   System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +129
   System.Web.UI.Control.RenderChildren(HtmlTextWriter writer) +53
   System.Web.UI.Control.Render(HtmlTextWriter writer) +31
   System.Web.UI.Page.Render(HtmlTextWriter writer) +39
   System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +74
   System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) +290
   System.Web.UI.Control.RenderControl(HtmlTextWriter writer) +48
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +5390
Princy
Top achievements
Rank 2
 answered on 09 May 2008
1 answer
134 views
I have a simple menu using the Default2006 skin, like this:

<

telerik:RadMenu ID="RadMenu1" runat="server" Skin="Default2006">

I want to remove the background image (so that it's just a solid color), but nothing I do to the CSS file (...) has any effect. I've tried changing:

.RadMenu_Default2006


{
background: #ececec url(Menu/MenuItemBackground.gif) repeat-x;

to

.RadMenu_Default2006 
{
background: #bbbbbb ;

But I still see the same background image.
Peter
Telerik team
 answered on 09 May 2008
1 answer
155 views

Hi

I have 2 static raddockZones on a page and i load into them dynamic radDocks.
I can disable all the styles except the border around the raddock.

I have set the following on my dock to try and remove the line, which opnly appears if the raddock is in a raddockzone.

dock.DockMode = DockMode.Default
dock.EnableDrag = False
dock.BackColor = Drawing.Color.Transparent
dock.BorderColor = Drawing.Color.Transparent
dock.Title = ""


This has only happened as i have updated the project to the new asp.net AJAX version.
I am currently not using any other style sheets on the raddocks as the default fits my project.

Thanks for any help.
John

John Horlock
Top achievements
Rank 1
 answered on 09 May 2008
2 answers
110 views

I saw that it sould be possible to drag&drop rows between two grids, but i did not find any information how this works ?! I tried a few hours to find out how this could work, but i don't have a solution.

Does anyone know how to enable drag&drop functionallity between twho Radgrids with SQLDataSources?

Thank you!
Sebastian
Telerik team
 answered on 09 May 2008
4 answers
247 views
If you design a splitter layout you have to set the size of the panes to something specific to get something you want. If you leave the sizes unset then the panes are just sized in proportion; if you have 2 panes, each one will be around half the size of the splitter.

I have a setup that I'm working on ATM where I have a 'header', 'body' and 'footer' if you like. My 'body' section will always be a grid. I'm happy for the user to have to scroll the grid to see the data, but I want the 'header' and 'footer' to stay fixed. At the same time I want the maximum amount of screen available for my grid.

In an ideal world you'd be able to mark one or more panes to resize automagically according to their content, will maybe a maximum and minimun size for them. Any other panes in the splitter would automagically resize to use the available space.

Sadly the world is not an ideal place. Below is an example page that splits the screen in to 3. The top and bottom panes are resized to the height of the content and the middle pane is itself resized to use the rest of the space.
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="WebForm1.aspx.cs" Inherits="TestBed.WebForm1" %> 
 
<%@ 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>Untitled Page</title> 
    <style type="text/css"> 
      html, body, form { 
        width:100%; 
        height:100%; 
        padding:0; 
        border:0; 
        margin:0; 
      } 
    </style> 
  </head> 
  <body scroll="no"> 
    <form id="form1" runat="server"> 
      <telerik:RadScriptManager ID="RadScriptManager1" runat="server"> 
      </telerik:RadScriptManager> 
 
      <telerik:RadCodeBlock ID="RadCodeBlock1" runat="server"> 
      <script type="text/javascript"> 
        function resize(sender) { 
          var splitter = $find("<%= RadSplitter1.ClientID %>"); 
          var pane1 = splitter.getPaneById("RadPane1"); 
          var pane2 = splitter.getPaneById("RadPane2"); 
          var pane3 = splitter.getPaneById("RadPane3"); 
           
          var splittersplitterHeight = splitter.getInnerHeight(); 
          var h1 = pane1.getVarSize();  
          var h2 = pane2.getVarSize(); 
          var h3 = pane3.getVarSize(); 
                     
          var pane1ContentHeight = document.getElementById("content1").offsetHeight; 
          var pane3ContentHeight = document.getElementById("content3").offsetHeight; 
           
          var offset = 33; 
           
          var newH1 = ((pane1ContentHeight + offset) > splitterHeight/3) ? splitterHeight/3 : pane1ContentHeight + offset; 
          var newH3 = ((pane3ContentHeight + offset) > splitterHeight/3) ? splitterHeight/3 : pane3ContentHeight + offset; 
          var newH2 = h2 + (h1 - newH1) + (h3 - newH3); 
          pane1.setVarSize(newH1); 
          pane2.setVarSize(newH2); 
          pane3.setVarSize(newH3); 
        } 
      </script> 
      </telerik:RadCodeBlock> 
 
      <telerik:RadSplitter ID="RadSplitter1" runat="server"  
        Orientation="Horizontal"  
        Width="100%"  
        Height="100%"  
        OnClientLoaded="resize"  
        OnClientResized="resize"> 
        <telerik:RadPane ID="RadPane1" runat="server"> 
          <div id="content1"> 
            <p>Ullamcorper pretium suscipit scelerisque.</p> 
          </div> 
          
        </telerik:RadPane> 
 
        <telerik:RadPane ID="RadPane2" runat="server"> 
          <div id="content2"> 
            <p>Lorem ipsum dolor sit amet consectetuer In nunc interdum elit eu. Sem quis at tincidunt semper mauris at nascetur risus vitae porta. Elit lorem eros Morbi quam semper est amet porttitor Phasellus justo. Lorem velit convallis Nullam sagittis non sem netus magnis Mauris eu. Semper elit a Proin tellus dui ac id lacus justo Fusce. Quis Aenean ridiculus lacus.</p> 
            <p>Ullamcorper pretium suscipit scelerisque vestibulum tellus Phasellus semper condimentum pede Aliquam. Tellus justo gravida hac sodales fringilla sollicitudin at orci sem at. Eu sit elit cursus adipiscing et urna elit mus metus a. Felis semper facilisi vitae nisl auctor facilisi suscipit fames vitae cursus. Justo id massa In in pede orci.</p> 
            <p>Tincidunt dictum sagittis mi dictum vitae semper suscipit nunc Ut ipsum. Lorem ut Vestibulum wisi eget Quisque consequat Vestibulum lorem nibh id. Et fringilla malesuada at hendrerit elit ac Nam Proin interdum vel. Velit id condimentum lorem risus vitae mus et semper Vivamus Integer. Sagittis non consequat Phasellus consequat fringilla sem velit Ut vitae Curabitur. Pellentesque.</p> 
            <p>Et elit ut dictumst ipsum quis malesuada lorem vitae est Vivamus. Adipiscing orci eu elit nibh Pellentesque eros ante elit nisl morbi. Vel convallis semper nec congue In Aenean condimentum Nulla Lorem cursus. Eu pellentesque penatibus leo eget amet ornare Pellentesque sit adipiscing quis. Risus congue tortor cursus et orci ipsum fermentum felis Phasellus auctor. Pretium In ipsum.</p> 
            <p>Euismod Pellentesque urna ut ut vitae Sed tincidunt platea Nulla risus. Sit Vestibulum id purus quis senectus orci Nunc ut Phasellus justo. Id est Vivamus justo eget morbi laoreet leo nascetur Pellentesque Vestibulum. Nonummy pellentesque enim ipsum et elit justo Mauris venenatis wisi Pellentesque. Netus vitae Nullam laoreet neque fringilla felis consectetuer elit eu interdum. Phasellus nec Curabitur pretium turpis ipsum tincidunt.</p> 
            <p>Habitasse sit Vestibulum dolor id consequat vitae convallis interdum hendrerit est. Leo velit mauris semper magnis sit Nulla tempor pede non mollis. Hendrerit dignissim magna at lorem et Aenean Sed adipiscing eros sed. Nam pretium quis augue Vestibulum et metus Pellentesque gravida nulla sed. Eros Aenean et In fringilla ut cursus In amet Praesent sem. Ut euismod Fusce non habitasse Nam In amet.</p> 
          </div> 
        </telerik:RadPane> 
         
        <telerik:RadPane ID="RadPane3" runat="server"> 
          <div id="content3"> 
            <p>Lorem ipsum dolor sit amet consectetuer In nunc interdum elit eu. Sem quis at tincidunt semper mauris at nascetur risus vitae porta. Elit lorem eros Morbi quam semper est amet porttitor Phasellus justo. Lorem velit convallis Nullam sagittis non sem netus magnis Mauris eu. Semper elit a Proin tellus dui ac id lacus justo Fusce. Quis Aenean ridiculus lacus.</p> 
          </div> 
        </telerik:RadPane> 
      </telerik:RadSplitter> 
    </form> 
  </body> 
</html> 

Some points to note.
  • I originally thought to use the pane's getContentElement()'s offsetHeight property to find the height of the content, but it appears that that value represents the inner height of the pane and not really the content itself.
  • You have to expressly set the heights of all of the panes; just changing the height of the first and last will leave a gap on the screen.
  • I've only got very arbitrary settings for a max size of the upper and lower panes.
  • The 'offset' variable is to account for some hidden space that each pane needs. I don't know what it is, but set this figure lower than 33 and you'll end up with scrollbars on your upper and lower panes when you shouldn't.
I don't know that it would be that difficult for the boys and girls at telerik towers to build something in to the pane object to allow this kind of thing to happen without user code, but until then we have to do it ourselves.

I hope that this helps someone.
Dan
Top achievements
Rank 1
 answered on 09 May 2008
5 answers
262 views
Hello,

I wrote a usercontrol some time ago which opened a URL within a RadWindow.
I needed to return some values from that window to the parent page, so I used the online examples using a RadAjaxManager. And all worked fine.

However the situation has now arrisen where I need more than one of these usercontrols on a page at anyone time. So I would like to start using the RadAjaxManagerProxy in my control rather than an actual manager.

The problem I am having, is within the usercontrol, I have the following javascript:

function

refreshAddress(arg)

{

if(!arg)

{

$find(

"<%= RadAjaxManager1.ClientID %>").ajaxRequest("Rebind");

}

else

{

$find(

"<%= RadAjaxManager1.ClientID %>").ajaxRequest("RebindAndNavigate");

}

}

This doesnt seem to work, if I just switch the ID to the RadAjaxManagerProxys client ID.

Konstantin Petkov
Telerik team
 answered on 09 May 2008
3 answers
134 views
Hello,

I have a short question.

How can I change the style of the first level item in the Office 2007 skin?

I don't want that the first level item is styled like a header. I want that it is styled like the other items in the menu.

Thanks

Greetings
Tommy
Top achievements
Rank 1
 answered on 09 May 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?