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

I have a couple of columns which the data always returns the current qtr and the next quarter costs. I have labelled these CQ C and NQ C...as the quarter returned in these is based on todays date and which quarter we are in.

How can I, when the data is bound, rewrite the column headings to read Q1-08, Q2-08 - so I dont have to hard code the quarter names, and dont have to use cryptic descriptions.

Thanks 

Indy
Shinu
Top achievements
Rank 2
 answered on 24 Apr 2008
5 answers
319 views
I have a two-level hierarchy with rows in the master grid and then another GridTableViewin the DetailTables.  It all displays fine and lets me expand/collapse the detail as long as I do not enable row selection with postback.  I need to handle the event for row selection changed on the server side, but when I set my ClientSettings as follows:

<ClientSettings EnablePostBackOnRowClick="True" >
    
<Selecting AllowRowSelect="True" />
</ClientSettings>

then while I do now get my event handler called on row selection if I click anywhere on the row EXCEPT the expand/collapse arrow, I can no longer get the detail table to expand at all.  It seems very odd because basically clicking on the expand/collapse arrow now does nothing - neither postback a row selection changed event nor expand/collapse the detail table, yet clicking anywhere else on the row acts properly (event on server side).

Ed



Konstantin Petkov
Telerik team
 answered on 24 Apr 2008
1 answer
120 views
Is there a way to add a rad:RadPanelItem dynamically using java-script

 

Rosi
Telerik team
 answered on 24 Apr 2008
4 answers
341 views
Hi guys,

I have the following situation. I`m loading a radwindow which has a formview within it.
The formview has some textboxes and a delete button at the bottom of the page and is wrapped by a RadAjaxPanel. Once I click the delete button, I'm opening a radconfirm control which ask me whether to delete the current item or not.
If I click "yes" and for some reason, the system is not able to delete it, then I'm loading the status error by codebehind using this line of code:

ScriptManager.RegisterStartupScript(this, this.GetType(), "radalert", scriptstring, true);

However, I'm getting the following javascript error:

    "this._windows.length is nul or not an object"

If I remove the ajax panel, then I'm getting an "undefined" error in the following line (from the ScriptResource.axd)

        var _6=_5._getStandardPopup("alert",_1);

Do you have any idea what's going on here ?

Thanks in advance.
François.


creatif
Top achievements
Rank 2
 answered on 23 Apr 2008
3 answers
187 views

Hi

I've editted the ToolsFile.xml file that we use to add the following section at the end of the file to limit the paragraph styles available in the editor:
......
   <paragraphs>
    <paragraph name="&lt;h2>Heading 2&lt;/h2>" value="&lt;h2" />
    <paragraph name="&lt;h3>Heading 3&lt;/h3>" value="&lt;h3" />
    <paragraph name="&lt;h4>Heading 4&lt;/h4>" value="&lt;h4>" />
  </paragraphs>
</root>

In the editor we have some text that looks like this in html view
Hello <br />
<br />
This is our new site

When I highlight the 'Hello' line and select the Heading 2 style from the dropdown the style is not correctly applied.  The html created is:
<h>Hello </h><br />
<br />
This is our new site

What is wrong with the paragraph tags that I've added to the ToolsFile.xml?

Thanks
Peter

Lini
Telerik team
 answered on 23 Apr 2008
2 answers
506 views
Hi,

I am trying to create a Monday - Friday rotational schedule based on a three man team for a set month. 

Week 1: A,B,C,A,B
Week 2: C,A,B,C,A
Week 3: B,C,A,B,C
Week 4: A,B,C,A,B
etc, etc...

I know the pattern repeats every 4 weeks however each month can be the start of a new pattern meaning that the pattern does not continue from month to month and there are also holidays we need to consider ( I can Edit those individually).  Also, using the daily frequency rule I would create 1 entry/person  instead of 4 different entries/person.  The easiest way I felt in accomplishing this was to create a daily frequency with an Interval of three with an Abosolute start and end date. I created the following rule for 1 of the empoyees for the month of April.  

DTSTART:20080401T000000Z
DTEND:20080402T000000Z
RRULE:FREQ=DAILY;
UNTIL=20080501T000000Z;
INTERVAL=3;
BYDAY=MO,TU,WE,TH,FR

I changed the DaysOfWeekMask to WeekDays in the SQLDatasources Inserting Event.    Here is my code bellow
        Dim recRuleConverter As New Telerik.Web.UI.RecurrenceRuleConverter  
        Dim recRuleParamString As String = e.Command.Parameters("@RecurrenceRule").Value  
        If recRuleParamString <> "" Then  
            Dim recRule As Telerik.Web.UI.RecurrenceRule = recRuleConverter.ConvertFromString(recRuleParamString)  
            Select Case recRule.Pattern.Frequency  
                Case Telerik.Web.UI.RecurrenceFrequency.Daily  
                    With CType(recRule, Telerik.Web.UI.DailyRecurrenceRule)  
                        .DaysOfWeekMask = Telerik.Web.UI.RecurrenceDay.WeekDays  
                        With e.Command  
                            .Parameters("@RecurrenceRule").Value = recRule.ToString  
 
                        End With  
                    End With  
            End Select  
        End If 
The code makes sense to me however when the schedule gets loaded, RadSchedule ignores the interval and displays an Item on each day Monday Through Friday.

I want to use the daily frequency interval but ignore saturday and sunday.  Is this a bug or is there another way of doing this.  I dont think the daily frequency rule was intended to be used that way, but would be a good enhancemnet
Dimitar Milushev
Telerik team
 answered on 23 Apr 2008
1 answer
110 views
I am in the process of converting from the Q3 release of the Telerik controls to the new Q1 2008 release.  With the new editor, is it possible to allow the controls to reference a single app_data and app_globalresources folder? 

Here is the situation:

I have 12 distinct applications sitting on an IIS 6 web server.  Ideally I would like for each of those apps to reference a single, centralizeed instance of the two folders needed for the editor, rather than incorporating the folders in each of the applications.

Is this possible?

thanks for your help.
Kyle Parker 
Ubong
Telerik team
 answered on 23 Apr 2008
5 answers
267 views
Hi,

No matter what I do I can not set the width of a menu item.

Here's a cut down version of the markup.
rad:RadMenu ID="RadMenu1" runat="server" Skin="Web20" OnClientItemOpen="OnClientItemOpenHandler" 
                        Width="100%" OnClientLoad="removeDelay" CausesValidation="false" EnableScreenBoundaryDetection="false"> 
<Items> 
<rad:RadMenuItem ID="RadMenuItem4" runat="server" Text="OPTIONS" Style="text-align: left;"> 
    <Items> 
        <rad:RadMenuItem ID="RadMenuItem5" runat="server" Text="Export"> 
            <Items> 
                <rad:RadMenuItem ID="RadMenuItem6" runat="server" Value="MenuItemExportOptions" CssClass="StyleToSetMaxWidth"> 
                    <ItemTemplate> 
                        <div id="ExportData" class="margin"> 
                            Please note exports will include managers<br /> 
                            (where appropriate) 
                            <asp:RadioButtonList ID="ExportExcelOptionsMenu" runat="server"> 
                                <asp:ListItem Text="As one file" Value="0" Selected="True"> 
                                </asp:ListItem> 
                                <asp:ListItem Text="As individual files" Value="1"> 
                                </asp:ListItem> 
                            </asp:RadioButtonList> 
                            <div style="text-align: right"> 
                                <asp:LinkButton ID="MenuExportButton" runat="server" CssClass="GoButton" Text="Go" 
                                    OnClick="ExportButton_Click" OnClientClick=" return CheckSelectedRows()" /></div> 
                        </div> 
                    </ItemTemplate> 
                </rad:RadMenuItem> 
            </Items> 
        </rad:RadMenuItem> 
    </Item> 
</rad:RadMenu> 

The menu item ends up with a load of white space to the right of the RadButtonList which means the menu item goes off the edge of the screen.
If I set EnableScreenBoundaryDetection="true" then because then menu item would go off the edge of the screen it moves it to the top, and moves it off the screen anyway!
I'm happy to leave EnableScreenBoundaryDetection="false" if I can set the width of the menu item.

The style is here:
<style type="text/css">      
    .StyleToSetMaxWidth      
    {      
        width: 250px !important; 
        max-width: 250px !important; 
    }          
</style>  
Peter
Telerik team
 answered on 23 Apr 2008
5 answers
141 views
I have a RadGrid search which is embedded in a splitter in a semi-complex layout. I'll post an example at the end of this message. When I click a button, sending an AJAX request which rebinds it with a valid datasource, the grid expands just enough to stretch the page beyond its current width.

I've tried a few tricks - placing it inside a fixed-layout table didn't work, nor did setting the grid's layout to fixed, nor did placing it inside an absolutely-sized div tag. I'm out of ideas. I want the grid to remain at 100% width within the splitter, even when rebound. Even setting it to 100% takes it beyond the available size of the pane, however - I've had to put it at 99%, and then it expands past on refresh, as if the third pane weren't there at all.

Here's an example - content first, then master page. None of the CSS classes here change anything aside from color, border, margin/padding, and so on - very basic stuff which should not affect this. Skin-wise, I'm using a slightly modified (colors only) Outlook for the grid and a slightly modified (colors only) Office2007 for the splitter, so nothing major's hidden there.

Here's the content page:

<%@ Page Language="C#" MasterPageFile="~/MainFrame.Master" AutoEventWireup="true" 
   Codebehind="RetrieveDeal.aspx.cs" Inherits="SDPS.SearchPage" Title="Search Results" %> 
 
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %> 
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="server"> 
   <telerik:RadAjaxManagerProxy ID="RadAjaxManagerProxy1" runat="server"> 
      <AjaxSettings> 
         <telerik:AjaxSetting AjaxControlID="SearchButton"> 
            <UpdatedControls> 
               <telerik:AjaxUpdatedControl ControlID="LoadedPanel" LoadingPanelID="RadAjaxLoadingPanel1" /> 
            </UpdatedControls> 
         </telerik:AjaxSetting> 
         <telerik:AjaxSetting AjaxControlID="SearchResults"> 
            <UpdatedControls> 
               <telerik:AjaxUpdatedControl ControlID="LoadedPanel" LoadingPanelID="RadAjaxLoadingPanel1" /> 
            </UpdatedControls> 
         </telerik:AjaxSetting> 
      </AjaxSettings> 
   </telerik:RadAjaxManagerProxy> 
   <telerik:RadGrid ID="SearchResults" runat="server" AllowPaging="True" AllowSorting="True" 
      AlternatingItemStyle-CssClass="ReadOnlyAlt" AutoGenerateColumns="False" GridLines="None" 
      ItemStyle-CssClass="ReadOnly" OnNeedDataSource="SearchResults_NeedDataSource" 
      SkinID="RadGrid" Height="330px" Width="99%"> 
      <PagerStyle Mode="NextPrevAndNumeric" NextPageText="&gt;" PrevPageText="&lt;" /> 
      <SelectedItemStyle BackColor="Blue" /> 
      <MasterTableView> 
         <Columns> 
            <telerik:GridTemplateColumn DataField="IsTest" UniqueName="Mode" HeaderStyle-Width="20px"> 
               <ItemTemplate> 
                  <nobr><img src="/App_Themes/Default/Images/<%# (bool)Eval("IsTest") ? "Test" : "NotTest" %>.gif" alt="<%# (bool)Eval("IsTest") ? "Mode: Test" : "Mode: Not Test" %>" title="<%# (bool)Eval("IsTest") ? "Mode: Test" : "Mode: Not Test" %>" /></nobr> 
               </ItemTemplate> 
            </telerik:GridTemplateColumn> 
            <%-- Thirteen fairly wide Gridbound columns go here, plus one GridDropdown. 
                  These stretch well beyond the width of the window, but horizontal 
                  scrollbars do appear, so the number of columns doesn't appear to be 
                  the problem. --%> 
         </Columns> 
         <RowIndicatorColumn Visible="False"> 
            <HeaderStyle Width="20px" /> 
         </RowIndicatorColumn> 
         <ExpandCollapseColumn Resizable="False" Visible="False"> 
            <HeaderStyle Width="20px" /> 
         </ExpandCollapseColumn> 
         <EditFormSettings> 
            <PopUpSettings ScrollBars="None" /> 
         </EditFormSettings> 
      </MasterTableView> 
      <ClientSettings> 
         <Selecting AllowRowSelect="True" /> 
         <Scrolling AllowScroll="True" ScrollHeight="330px" /> 
      </ClientSettings> 
      <ItemStyle CssClass="ReadOnly" /> 
      <AlternatingItemStyle CssClass="ReadOnlyAlt" /> 
      <HeaderStyle Font-Bold="False" Font-Italic="False" Font-Overline="False" Font-Strikeout="False" 
         Font-Underline="False" Wrap="False" /> 
   </telerik:RadGrid> 
   <p> 
      <asp:ImageButton ID="SearchButton" runat="server" AlternateText="Search" 
         BackColor="transparent" ImageUrl="~/App_Theme/Default/Images/Search.gif" OnClick="SearchButton_Click" /> 
   </p> 
</asp:Content> 
 

SearchButton_Click is simple - it sets a RebindSearchResults boolean to true and calls for a rebind. The SearchResults_NeedDataSource event is also simple - if the boolean's true, it gets a dataset, stores it in a session variable, and, whether the boolean's true or not, sets the grid's datasource to the session variable. As with all NeedDataSource events, the necessary rebind is called automatically. The code works fine. (The session variable is necessary due to an overworked and underpaid SQL server which whines pitifully whenever it's asked to produce large groups of results - holding the dataset on the session side to save on re-queries was a kindness to the poor thing.)

Now, MainFrame.Master:

<%@ Master Language="C#" AutoEventWireup="true" Codebehind="MainFrame.master.cs" 
   Inherits="SDPS.MainFrame" %> 
<%@ 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> 
</head> 
<body> 
   <form id="form1" runat="server"> 
      <telerik:RadScriptManager ID="RadScriptManager1" runat="server"> 
         <Scripts> 
            <asp:ScriptReference Path="~/scripts/scripts.js" /> 
            <asp:ScriptReference Path="~/scripts/jslog.js" /> 
         </Scripts> 
      </telerik:RadScriptManager> 
      <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server" OnAjaxRequest="RadAjaxManager1_AjaxRequest"> 
         <AjaxSettings> 
            <telerik:AjaxSetting AjaxControlID="RadAjaxManager1"> 
               <UpdatedControls> 
                  <telerik:AjaxUpdatedControl ControlID="LoadingPanel" LoadingPanelID="RadAjaxLoadingPanel1" /> 
               </UpdatedControls> 
            </telerik:AjaxSetting> 
         </AjaxSettings> 
      </telerik:RadAjaxManager> 
      <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" BackColor="#FFFFFF" 
         Height="500px" Transparency="25" Width="100%"> 
         <p> 
            <br /> 
            <br /> 
            <asp:Image ID="LoadingImage" runat="server" SkinID="loading" /></p> 
      </telerik:RadAjaxLoadingPanel> 
      <asp:Panel ID="LoadingPanel" runat="server" Height="500px" Width="100%"> 
         <asp:Panel ID="LoadedPanel" runat="server" Visible="false"> 
            <telerik:RadSplitter ID="RadSplitter1" runat="server" EnableEmbeddedSkins="false" 
               Height="100%" OnClientLoaded="fnSizeSplitter" Skin="Default" Width="100%" LiveResize="false"> 
               <telerik:RadPane ID="RadPane1" runat="server" Width="21px" CssClass="DarkBG"> 
                  <telerik:RadSlidingZone ID="RadSlidingZone1" runat="server" Width="21px" CssClass="DarkBG"> 
                     <telerik:RadSlidingPane ID="RadSlidingPane1" runat="server" Title="Navigation" Width="345px" 
                        CssClass="DarkBG" EnableDock="false" EnableResize="false" PersistScrollPosition="true"> 
                        Large RadPanelBar goes here, roughly 320px wide and 500px tall. 
                     </telerik:RadSlidingPane> 
                  </telerik:RadSlidingZone> 
               </telerik:RadPane> 
               <telerik:RadPane ID="ContentPane" runat="server" CssClass="MainContent LightBG" Height="100%"> 
                  <asp:ContentPlaceHolder ID="ContentPlaceHolder1" runat="server"> 
                  </asp:ContentPlaceHolder> 
               </telerik:RadPane> 
               <telerik:RadPane ID="RadPane3" runat="server" Width="21px" CssClass="DarkBG"> 
                  <asp:ContentPlaceHolder ID="ContentPlaceHolder2" runat="server"> 
                  </asp:ContentPlaceHolder> 
               </telerik:RadPane> 
            </telerik:RadSplitter> 
         </asp:Panel> 
      </asp:Panel> 
      <telerik:RadScriptBlock ID="RadScriptBlock1" runat="server"> 
 
         <script language="javascript" type="text/javascript"> 
            <!-- 
               var strAjaxManager="<%=RadAjaxManager.GetCurrent(Page).ClientID %>"; 
               var strMainSplitter="<%=RadSplitter1.ClientID %>"; 
               var strContentPane="<%=ContentPane.ClientID %>"; 
               //Determines current width of the window and the height of the content 
               // document. 
               fnAddWindowEvent(fnSetDocSize); 
 
               //Adds a resize event that, if the window's width or the document's height 
               // change, reloads the page, which auto-sizes the splitter according to the 
               // window's width and the content document's height. 
               fnAddWindowEvent(fnResizeDoc, "resize"); 
 
               //Makes the LoadedPanel visible after a 100ms delay. 
               fnAddWindowEvent(fnLoadScreen); 
            //--> 
         </script> 
 
      </telerik:RadScriptBlock> 
   </form> 
</body> 
</html> 
 

That's it. What am I doing wrong?
Yavor
Telerik team
 answered on 23 Apr 2008
4 answers
106 views
Hi,

I am looking for a way to browse a document library in SharePoint in order to create a link from a document to Wiki article. So within a wiki article I'd like the user to open TreeView, locate the document, and select it to paste a link of that document into the specified field. Is that possible with TreeView?

I know I can do this via copy and paste into the link dialogue box but I want to make the process as seamless as possible with as few clicks as possible. 

Thanks very much in advance.
Peter
Telerik team
 answered on 23 Apr 2008
Narrow your results
Selected tags
Tags
+? more
Top users last month
Tien
Top achievements
Rank 1
Iron
Krasimir
Top achievements
Rank 3
Bronze
Iron
Iron
Cedar
Top achievements
Rank 1
Iron
Emil
Top achievements
Rank 1
Iron
Kyle Watson
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Tien
Top achievements
Rank 1
Iron
Krasimir
Top achievements
Rank 3
Bronze
Iron
Iron
Cedar
Top achievements
Rank 1
Iron
Emil
Top achievements
Rank 1
Iron
Kyle Watson
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?