Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
115 views
hi,

i ve a javascript function in master page like.

function ShowLoginWindow() {
    var url = "LoginRegistration.aspx";
    var oWnd = radopen(url, "LoginRegistration");
    oWnd.center();
}

i am opening the page  properly from  root folder, but while accessing from different folder error is showing. My LoginRegistration.aspx page is in root folder.

How to open LoginRegistration.aspx page in each path in a rad window.

thanks.




Fiko
Telerik team
 answered on 24 Apr 2009
7 answers
252 views
The drill down facility is not working for line chart series. How to achieve drill down functionality if I want the user to be redirected to different pages when they click on different line chart series?

I have tried using RadChart1_Click event but its not working.
Ves
Telerik team
 answered on 24 Apr 2009
5 answers
170 views
Hi,

I'm using the rad editor in a MOSS environment.
But I can't scroll in my CSS dropdown anymore (Picture).

Any idea how this is possible?

Toolsfile.xml
<root> 
  <tools name="MossTools1"
    <tool name="InsertSymbol" /> 
    <tool name="FormatStripper" /> 
    <tool name="InsertTable" /> 
    <tool name="Undo" /> 
    <tool name="Redo" /> 
    <tool name="Cut" /> 
    <tool name="Copy" /> 
    <tool name="Paste" /> 
    <tool name="PasteFromWord" /> 
    <tool name="PasteFromWordNoFontsNoSizes" /> 
    <tool name="PastePlainText" /> 
    <tool name="Print" /> 
    <tool name="FindAndReplace" /> 
    <tool name="SelectAll" /> 
    <tool name="InsertGroupbox" /> 
    <tool name="InsertHorizontalRule" /> 
    <tool name="InsertSnippet" /> 
    <tool name="InsertDate" /> 
    <tool name="InsertTime" /> 
    <tool name="ImageManager" /> 
    <tool name="ImageMapDialog"/> 
    <tool name="FlashManager" /> 
    <tool name="DocumentManager" /> 
    <tool name="AbsolutePosition" /> 
    <tool name="LinkManager" /> 
    <tool name="Unlink" /> 
  </tools> 
  
  <tools name="MossTools2"
    <tool name="FormatBlock" />     
    <tool name="Bold" /> 
    <tool name="Italic" /> 
    <tool name="Underline" /> 
    <tool name="StrikeThrough" /> 
    <tool name="JustifyLeft" /> 
    <tool name="JustifyCenter" /> 
    <tool name="JustifyRight" /> 
    <tool name="JustifyFull" /> 
    <tool name="JustifyNone" /> 
    <tool name="Superscript" /> 
    <tool name="Subscript" /> 
    <tool name="ConvertToLower" /> 
    <tool name="ConvertToUpper" /> 
    <tool name="Indent" /> 
    <tool name="Outdent" /> 
    <tool name="InsertOrderedList" /> 
    <tool name="InsertUnorderedList"/>> 
    <tool name="FontSize" /> 
    <tool name="RealFontSize"/> 
    <tool name="InsertCustomLink"/> 
    <tool name="ApplyClass"/> 
  </tools> 
  
  
  <tools name="EnhancedEditToolbar" dockingZone="Bottom" dockable="true" enabled="true"
    <tool name="ToggleScreenMode" /> 
    <tool name="ToggleTableBorder" /> 
    <tool name="Zoom" /> 
  </tools> 
  
  <contextMenus> 
    <contextMenu> 
      <tool name="Cut"/> 
      <tool name="Copy"/> 
      <tool name="Paste"/> 
      <tool name="Indent" /> 
      <tool name="Outdent" /> 
      <tool name="InsertOrderedList" /> 
      <tool name="InsertUnorderedList"/> 
      <tool name="LinkManager" /> 
    </contextMenu> 
  </contextMenus> 
  
  <links> 
    <link name="Internet DSM" href="http://www.dsm.com"
  
    </link> 
    <link name="Intranet DSM" href="http://intranet.my-dsm.com"
  
    </link> 
  </links> 
  
  
  
  
  
  <snippets> 
    <snippet name="Text Teaser with Image"
      <![CDATA[
  <table class="ms-rteTable-TextTeaserImage-ContentArea">
      <tr>
          <td>
              <table class="ms-rteTable-TextTeaserImage-ContentArea">
                   <tr>
                        <td class="ms-rteTableHeaderFirstCol-TextTeaserImage-ContentArea">
                            <a href="http://intranet.my-dsm.com">
                                    <img alt="" src="/PublishingImages/TeaserImageContentArea.jpg" />
                            </a>
                        </td>
                    </tr>
                    <tr class="ms-rteTableFooterRow-TextTeaserImage-ContentArea">
                        <td class="ms-rteCustom-TextDefault">
                            Image subtitle
                        </td>
                    </tr>
                </table>
            </td>
            <td class="ms-rteTableLastCol-TextTeaserImage-ContentArea">
                <table class="ms-rteTable-TextTeaserImage-ContentArea">
                    <tr>
                        <td>
                            <a href="http://intranet.my-dsm.com/"><span class="ms-rteCustom-Headline">Company Profile</span></a>
                        </td>
                    </tr>
                    <tr>
                        <td class="ms-rteCustom-TextDefault">
                            DSM is active worldwide. The <a href="http://intranet.my-dsm.com">company</a> creates innovative products and service that help improve the quality of life.<br />
                            <a href="http://intranet.my-dsm.com"><span class="dsm-LinkIndicator">more</span></a></div>
                        </td>
                    </tr>
                </table>
            </td>
        </tr>
</table>
 
]]> 
    </snippet> 
    <snippet name="Accentuated Text Teaser with Image"
      <![CDATA[
<table class="ms-rteTable-TextTeaserImage-Accentuated-ContentArea">
         <tr>
            <td class="ms-rteTableFirstCol-TextTeaserImage-Accentuated-ContentArea"> 
 
                   <img alt="" src="PublishingImages/TeaserImageContentAreaAssentuated.jpg"/>
 
            </td>
            <td class="ms-rteTableHeaderLastCol-TextTeaserImage-Accentuated-ContentArea">
                <table class="ms-rteTable-TextTeaserImage-Accentuated-ContentArea">
                            <tr>
                                <td class="ms-rteTableHeaderLastCol-TextTeaserImage-Accentuated-ContentArea">
                                    <span class="ms-rteCustom-Headline-TeaserArea-AccentuatedText">Content Teaser</span>
                                </td>
                            </tr>
                            <tr class="ms-rteTableHeaderRow-TextTeaserImage-Accentuated-ContentArea">
                                <td class="ms-rteTableHeaderLastCol-TextTeaserImage-Accentuated-ContentArea">
                                    DSM is active worldwide.<br />
                                    The company creates innovative <br />
                                    products and service that help improve the 
                                    quality of life.
                             </td>
                        </tr>
 
                </table>
            </td>
        </tr>
   </table>
 
]]> 
    </snippet> 
    <snippet name="Text Teaser"
      <![CDATA[
      <table class="ms-rteTable-TextTeaser-ContentArea">
       <tr>
           <td>
                <span class="ms-rteCustom-Headline">Corporate Governance</span>
           </td>
       </tr>
       <tr>
           <td class="ms-rteCustom-TextDefault">
                The Dutch Corporate Governance code prescibes that quite a number of documents
                relating to corporate Governance should be published on the company's website. We gladly
                adhere to this practice in order to inform our stakeholders and other interested parties
                of the way our company has embedded its Corporate Governance policies.Here you can find that
                DSM is applying all 113 Best Practices of this code with one exception.
            </td>
       </tr>
       <tr>
           <td>
                <span class="ms-rteCustom-SubHeadline">Sub Headline</span>
           </td>
       </tr>
       <tr>
           <td class="ms-rteCustom-TextDefault">
            We gladly adhere to this practice in order to inform our stakeholders and other interested parties
            of the way our company has embedded its Corporate Governance policies. Here you can find that 
            DSM is applying all 113 Best Practices of this code with one exception.<br />
            <a href="http://intranet.my-dsm.com"><span class="dsm-LinkIndicator">more</span></a></div>
           </td>
       </tr>
   </table>
 
]]> 
    </snippet> 
  </snippets> 
  
  <paragraphs> 
    <paragraph name="&lt;span class='ms-rteCustom-Headline'>Headline&lt;/span>" value="&lt;span class='ms-rteCustom-Headline'>" /> 
    <paragraph name="&lt;span class='ms-rteCustom-Headline-TeaserArea'>Headline-TeaserArea&lt;/span>" value="&lt;span class='ms-rteCustom-Headline-TeaserArea'>" /> 
    <paragraph name="&lt;span class='ms-rteCustom-Headline-TeaserArea-AccentuatedText' style='background-color: #336fa3;'>Headline-TeaserArea-AccentuatedText&lt;/span>" value="&lt;span class='ms-rteCustom-Headline-TeaserArea-AccentuatedText'>" /> 
    <paragraph name="&lt;span class='ms-rteCustom-SubHeadline'>SubHeadline&lt;/span>" value="&lt;span class='ms-rteCustom-SubHeadline'>" /> 
    <paragraph name="&lt;span class='ms-rteCustom-TextAccentuation'>TextAccentuation&lt;/span>" value="&lt;span class='ms-rteCustom-TextAccentuation'>" /> 
    <paragraph name="&lt;span class='ms-rteCustom-TextDefault'>TextDefault&lt;/span>" value="&lt;span class='ms-rteCustom-TextDefault'>" /> 
  </paragraphs> 
  
</root> 
  

Stanimir
Telerik team
 answered on 24 Apr 2009
1 answer
106 views
I have a grid that hosts a user control containing another grid and a few other controls in a nestedtabletemplate.  This user control has a button that invokes the ExportToPdf() function of the grid within the user control.  It works fine when the parent grid is not using AJAX, but when the parent grid is AJAXified, it no longer works. 

I have the following code in the Page_Load function of the user control....

 

if (!IsPostBack)

 

{

 

PostBackOptions options = new PostBackOptions(this);

 

Page.ClientScript.GetPostBackEventReference(options);

PdfButton.Attributes.Add(

"onclick",

 

 

string.Format("realPostBack('{0}', ''); return false;", PdfButton.UniqueID));

 

}

This is based on the documentation, but it clears the grid I am attempting to export when it is clicked instead of doing an export..

Pavlina
Telerik team
 answered on 24 Apr 2009
1 answer
67 views
Hi All,

My H Grid's Detail table, has the Alternating Rows being indented by about a character.
I have tried on MV and DetaulTable View properties with it and then on each column ...Horizontal-align = "left" ....No Go,..similarly Align=:right"...does not align correctly..(Worse actually)
("Right particularly for Money type Fields)
Centering seems close though.

Any Ideas/Help ??

Thanks all
Neal
Lenny_shp
Top achievements
Rank 2
 answered on 24 Apr 2009
1 answer
84 views
Hi,
in my pages I have radtoolbar.
When I click RadToolBarDropDown submenu appears, but I can't click in items. Why?
I'm using custom skins.
Is there any errors in mu css files? What should I change?
Image shows this behaviour:
http://img23.imageshack.us/img23/3104/clipboard03uel.jpg
Of course, there is in all IE(6, 7, 8).
Yana
Telerik team
 answered on 24 Apr 2009
4 answers
228 views
Hi,

I have a very strange problem where on every click on a RadContextMenu, my page alternates between doing a Full Page Postback and Ajax Partial Page Postback.  Here is the scenario:

- I'm using the RadAjaxManager and loading my ajaxsettings in Page_Load.  They do load correctly on every postback (full and partial).
- I am attempting to ajaxify a RadContextMenu, so that all items on the context menu do an ajax partial page postback.
- My RadContextMenu is displayed by clicking on an asp ImageButton (OnClientClick calls the show method).  I got the javascript to show it, directly from your PopUp menu demo at http://demos.telerik.com/aspnet-ajax/Menu/Examples/ContextMenu/PopupMenu/DefaultCS.aspx
- The ImageButton is inside of an ASP Panel, while the RadContextMenu is outside of that panel.  Don't know if that information is relevant.

Here is the behavior I see:
- My page loads for the first time and I click the image button.  The context menu is displayed and I click an item on it.
RESULT:  I get a FULL page postback.

- I immediately click on the image button again.  The context menu is displayed and I click an item on it.
RESULT:  I then get a partial page postback that updates only the controls that I want to update.

From then on, I can just keep repeating the above test and my results alternate between the first result (full page postback) and the second result (partial page postback).

MORE INFORMATION:
- I just noticed that the problem is also happening on a grid filter on this same user control.  So, it isn't just a problem with my contextmenu.

Also, let me add that this is a usercontrol inside of an aspx page, where the aspx page contains a tabstrip and a multipage control, and I am ajaxifying both of them as below, because my tabstrip does a postback:

SecurityMainRadAjaxManager.AjaxSettings.AddAjaxSetting(tabStrip, tabStrip,

null);

 

SecurityMainRadAjaxManager.AjaxSettings.AddAjaxSetting(tabStrip, tabMultiPage, SecurityRadAjaxLoadingPanel);


Could ajaxifying the tabstrip and multipage have something to do with this.  It seems like those ajax settings are conflicting / messing up other ajax settings within user controls that are displayed in pages of the multipage.

What on earth could be happening?  What could I be doing wrong?  Any ideas on what to try?

Thanks In Advance,
Brent
Georgi Krustev
Telerik team
 answered on 24 Apr 2009
1 answer
76 views
Hello, I have a page that contains a radwindow when it loads everything is fine but when I look to generate some action on it is not the ajax working and makes me postback.

 
In the  radwindow page have a RadAjaxManager and RadScriptManager, the radajaxmanager have all the controls that must be allocated with ajax, but even so the loadingpanel not shown me and continues doing postback.

Theres some tip to put to work the radajaxmanager in a radwindow page ?

Pavlina
Telerik team
 answered on 24 Apr 2009
0 answers
192 views
I recently had to develop a multi-select dropdownlist with a checkbox control for each item. There must also be a value in each dropdown for "ALL" that checks all the controls when checked and unchecks them all when "ALL" is unchecked. When delivered to the client they noticed the tab order is WAY off when you do this. Here is the solution I came up with to get more of the natural tab order that a web page should have.

First set a template for the RadComboBoxItem Control in the code behind and set all the Client JavaScript methods.

//rcb is the RadComboBox

rcb.ItemTemplate = new CheckBoxTemplate();
rcb.OnClientDropDownOpening = "OnClientDropDownOpening";
rcb.OnClientDropDownClosing = "OnClientDropDownClosing";
rcb.OnClientSelectedIndexChanging = "OnClientSelectedIndexChanging";
rcb.OnClientBlur = "OnClientBlur";
rcb.OnClientLoad = "OnClientLoad";
rcb.OnClientFocus = "OnClientFocus";
rcb.OnClientKeyPressing = "OnClientKeyPressing";
rcb.MarkFirstMatch = true;
rcb.CloseDropDownOnBlur = true;


Here is the template Class

// =======================================================================================================
    class CheckBoxTemplate : CheckBox, ITemplate
    {
        public void InstantiateIn(Control container)
        {
            CheckBox checkBox = new CheckBox();
            checkBox.ID = "CheckBox";
          
            checkBox.DataBinding += new EventHandler(checkBox_DataBinding);
             
            RadComboBoxItem item = container as RadComboBoxItem;
            if (item != null)
            {
                if (!string.IsNullOrEmpty(item.Value))
                    container.Controls.Add(checkBox);
            }
        }
                 
        private void checkBox_DataBinding(object sender, EventArgs e)
        {
            CheckBox target = (CheckBox)sender;
               
            RadComboBoxItem item = (RadComboBoxItem)target.BindingContainer;
            string itemText = (string)DataBinder.Eval(item, "Text");
            target.Text = itemText;
            
            target.Attributes.Add("onKeyDown", "return OnClientKeyPressing(event, '" + target.Parent.Parent.ClientID + "');");
            bool itemSelected = (bool)DataBinder.Eval(item, "Selected");
            target.Checked = itemSelected;
            target.Attributes.Add("onclick", "checkboxClick('" + target.Parent.Parent.ClientID + "', '" + target.Text + "');");
        }
    }

// ==================================================================================================

Here is the javascript for the client events. Some of this was "borrowed" from another forum post and extended.


var supressDropDownClosing = false;

function OnClientKeyPressing(evt, sender) {

    if (sender != null) {
        var key = (evt.which) ? evt.which : event.keyCode;

        if (!event.shiftKey) {
        //Treat enter and tab the same so the form doesn't submit.
            if (key == 9 || key == 13) {

                
                var s;
                try {
                    s = $find(sender);
                }
                catch (err) {
                    s = sender;
                }



                try {
                    //get the input element of the RadComboBox and set the focus
                    s.get_inputDomElement().focus();


                    //Get the dropdown DOM element of the RadComboBox and set visibility to hidden;
                    s.get_dropDownElement().style.visibility = 'hidden';
                }
                catch (err) {
                    //exception gets thrown if you come in from a textbox.
                }

                //Pass back the tab keyCode so the app will tab to the next column
                event.keyCode = 9;

            }
        }

        //if the user hits the down arrow, do the default tab
        if (key == 40) {
            event.keyCode = 9;
        }
    }

    return event;
}

function OnClientFocus(sender) {
    
    var combo;
    try {
        combo = $find(sender);
    }
    catch (err) {
        combo = sender;
    }

    combo.toggleDropDown();
    try {
        var items = combo.get_items();

        var item = items.getItem(0);
        var checkbox = getItemCheckBox(item);
        checkbox.focus();
    }
    catch (err) {
    }
    
}

function OnClientDropDownClosing(sender, eventArgs) {
    eventArgs.set_cancel(supressDropDownClosing);
}

function OnClientSelectedIndexChanging(sender, eventArgs) {
    eventArgs.set_cancel(supressDropDownClosing);
}

function OnClientDropDownOpening(sender, eventArgs) {
    supressDropDownClosing = true;
}

function OnClientBlur(sender) {
    supressDropDownClosing = false;

    sender.toggleDropDown();
}

function checkboxClick(combo, checkClicked) {
    collectSelectedItems(combo, checkClicked);
}

function OnClientLoad(sender, eventArgs) {
    var items = sender.get_items();
    var itemIndex;
    var selectedItemsTexts = "";
    var selectedItemsValues = "";
    var isAllSelected = false;
    var itemsCount = items.get_count();


    for (itemIndex = 0; itemIndex < itemsCount; itemIndex++) {
        var item = items.getItem(itemIndex);
        var checkbox = getItemCheckBox(item);

        if (checkbox != null) {
            if (item.get_text() == "ALL" && checkbox.checked == true) {
                isAllSelected = true;
            }

            //Check whether the Item's CheckBox) is checked.
            if (checkbox.checked) {
                selectedItemsTexts += item.get_text() + ", ";
                selectedItemsValues += item.get_value() + ", ";
            }
        }
    }

    selectedItemsTexts = selectedItemsTexts.substring(0, selectedItemsTexts.length - 2);
    selectedItemsValues = selectedItemsValues.substring(0, selectedItemsValues.length - 2);

    if (isAllSelected) {
        selectedItemsTexts = "ALL";
    }
    //Set the text of the RadComboBox with the texts of the selected Items, separated by ','.

    if (selectedItemsTexts == "")
        selectedItemsTexts = "<Please Select>";


    sender.set_text(selectedItemsTexts);


}
function getItemCheckBox(item) {
    //Get the 'div' representing the current RadComboBox Item.
    var itemDiv = item.get_element();

    //Get the collection of all 'input' elements in the 'div' (which are contained in the Item).
    var inputs = itemDiv.getElementsByTagName("input");

    for (var inputIndex = 0; inputIndex < inputs.length; inputIndex++) {
        var input = inputs[inputIndex];

        //Check the type of the current 'input' element.
        if (input.type == "checkbox") {
            return input;
        }
    }

    return null;
}



function collectSelectedItems(combo2, checkClicked) {
    var combo;
    try {
        combo = $find(combo2);
    }
    catch (err) {
        combo = combo2;
    }

    var items = combo.get_items();
    var selectedItemsTexts = "";
    var selectedItemsValues = "";

    var itemsCount = items.get_count();
    var isAllSelected = false;
    var itemIndex;

    var numunchecked = 0;


    for (itemIndex = 0; itemIndex < itemsCount; itemIndex++) {
        var item = items.getItem(itemIndex);
        var checkbox = getItemCheckBox(item);

        if (checkbox != null) {
            if (item.get_text() == "ALL" && checkClicked == "ALL" && checkbox.checked == true) {
                isAllSelected = true;
            }
        }
    }


    for (itemIndex = 0; itemIndex < itemsCount; itemIndex++) {
        var item = items.getItem(itemIndex);
        var checkbox = getItemCheckBox(item);

        if (checkbox != null) {

            if (isAllSelected) {
                checkbox.checked = true;
            }

            if (!isAllSelected && item.get_text() == "ALL")
                checkbox.checked = false;

            if (checkClicked == "ALL" && !isAllSelected) {
                checkbox.checked = false;
            }


            //Check whether the Item's CheckBox) is checked.
            if (checkbox.checked) {
                selectedItemsTexts += item.get_text() + ", ";
                selectedItemsValues += item.get_value() + ", ";
            }
        }
    }

    selectedItemsTexts = selectedItemsTexts.substring(0, selectedItemsTexts.length - 2);
    selectedItemsValues = selectedItemsValues.substring(0, selectedItemsValues.length - 2);

    if (isAllSelected) {
        selectedItemsTexts = "ALL";
    }
    //Set the text of the RadComboBox with the texts of the selected Items, separated by ','.

    if (selectedItemsTexts == "")
        selectedItemsTexts = "<Please Select>";


    combo.set_text(selectedItemsTexts);

}
//End Javascript

When the dropdownlist gets focus, we expand the dropdown list and change the focus to the first control in the list.

The key to this working is trapping the "tab" and the "down arrow" keys so that you can manipulate the behavior. Otherwise when the dropdown opens the "tab" key will go to the next item in the dropdown instead of going to the next control on page. When the user presses "tab", we give focus to the input element of the RadComboBox, close the dropdown, and send back "tab", when tab gets sent back, the form will tab to the next control on tha page. When the user presses the "down arrow" we just send back the "tab" key value back to the form, and it will go to the next item in the dropdown.

Hopefully this was helpful to someone.



instigator
Top achievements
Rank 1
 asked on 24 Apr 2009
2 answers
140 views
I've got a radgrid that has one detail table.  Each row of the master table has a few rad dropdowns, and one of these dropdowns becomes invisible based on selection in another dropdown.  This works fines.  However, if the user selects edit on a row where the dropdown is hidden, and then without canceling the edit, adds a new record or edits a record in the detail table (both of which can cause a postback, depending on user selections) and posts back, the hidden dropdown forgets that it was hidden and appears on the row originally being edited.  I would like to be able to prevent users from adding a new record or editing a record from the detail table/master table if one is already being edited, if that would solve the problem, but I don't know how to achieve this.  If that would not solve the problem, I'm desperate for any other solution.


Jes
Top achievements
Rank 1
 answered on 24 Apr 2009
Narrow your results
Selected tags
Tags
+? more
Top users last month
Simon
Top achievements
Rank 2
Iron
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
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?