Telerik Forums
UI for ASP.NET AJAX Forum
5 answers
135 views
I am having a problem getting the Image Manager dialog to display. I have set all three of the related dialog "paths" and have Image Upload set to True. The dialog opens, but no paths appear and there is no upload capability. Everything is disabled. I also checked my web.config and the appropriate entry appears to be there for the dialogs.
Matthew Bishop
Top achievements
Rank 1
 answered on 30 Mar 2009
3 answers
134 views
My client wants to be able to upload a series of flash files to display on their website.  The files consist of the main .swf file, an xml file and a series of iamages that the flash file displays.  Is it possible to automate the upload process when the user picks the .swf file ?

eg  if the client uploads  flash1.swf, can I automatically upload flash1.xml, flash1_1.jpg, flash1_2.jpg, flash1_3.jpg

all these files are needed in order to disply the flash images and I dont want the client to have to worry about uploading them as well.
Genady Sergeev
Telerik team
 answered on 30 Mar 2009
1 answer
115 views
We have created a Page Wizard inside the RadEditor that is activated by a custom button. It calls a custom dialog window with the following:

        //Page Wizard
        Telerik.Web.UI.Editor.CommandList["PageWizard"] = function(commandName, editor, args)
        {
            var myCallbackFunction = function(sender, args)
            {
                //Paste result from the wizard into the editor's content area
                //???????????
            }

            editor.showExternalDialog(
            'PageWizard.aspx',
            {},
            570,
            420,
            myCallbackFunction,
            null,
            'Page Wizard',
            true,
            Telerik.Web.UI.WindowBehaviors.Close + Telerik.Web.UI.WindowBehaviors.Move,
            false,
            true);
            };

The wizard is a standard asp.net control that gathers information from the user, for example (the ... is there for brevity):

<asp:Wizard runat="server">
  <WizardSteps>
    <asp:WizardStep title="Enter Page Title" runat="server">...</asp:WizardStep>
    <asp:WizardStep title="Enter Description" runat="server">...</asp:WizardStep>
    <asp:WizardStep title="Enter Keywords" runat="server">...</asp:WizardStep>
    <asp:WizardStep title="Select a Background Color or Select a Background Repeat Image" runat="server">...</asp:WizardStep>
    <asp:WizardStep title="Select a Page Layout" runat="server">...</asp:WizardStep>    // these are external CSS files
    <asp:WizardStep title="Select a Pre-Made Banner Image" runat="server">...</asp:WizardStep>
    <asp:WizardStep title="Complete" runat="server">...</asp:WizardStep>
  </WizardSteps>
</asp:Wizard>

The Page Wizard above collects this information and is available upon the Complete stage. The problem lies in the fact that we cannot insert the above into the editors content area by means of the myCallBackFunction above i.e.

            var myCallbackFunction = function(sender, args)
            {
                //Paste result from the wizard into the editor's content area
                //???????????
            }

Can someone shed some light on this please as we are at a stand still. Even an example of how to find the <title> tag and insert the inputted title from the wizard and/or insert into the <body> tag a background color or image property.

Much appreciated for any input from anyone, thanks.
Grant
Tervel
Telerik team
 answered on 30 Mar 2009
4 answers
179 views
Hi,
Our project just migrated from VS 2005 to VS 2008.  Several of our pages use Ajax and in order to standardize our look and feel we created a UserControl for the text and images we want to use on the RadAjaxLoadingPanel whenever it is implemented.  It works great.  The problem is that in Design Mode in VS 2008, the panel covers all the other objects on the page.  When I remove the UserControl, the page is presented correctly.  Now, I realize that I could dynamically load the user control, but that is not optimal.  Since this wasn't causing a problem in VS 2005, I was wondering if there were known issues here and the best workaround for the problem.

Thanks,
Debbie
Deborah Gregory
Top achievements
Rank 1
 answered on 30 Mar 2009
1 answer
99 views
Hi Rad Team,

I am using RadEditor for one of my project. I am opening a window from the RadEditor using RadDialog.

Currently i can see only close option for the RadDialog.

Is there a possiblity to have the following options
  • Maximize
  • Minimize

I will appreciate if you can let me know what properties should be used to enable those options.

Kindly Advise

Svetlina Anati
Telerik team
 answered on 30 Mar 2009
1 answer
113 views
I am using the advanced databinding technique (OnNeedDataSource) in a grid that is in a user control, inside a splitter pane, and controlled by a combobox.  Fun!

User control has a combobox and grid in it, and when an item is selected from the combobox it causes the grid to be re-filled with that combobox item as a filter of sorts.

Used to be, the filtering worked but when I did any paging on the grid, the grid disappeared!  It looks like to correct that issue I need to take the advanced databinding technique using the OnNeedDataSource.  So I've done that and now the grid does not disappear when paging.

However, what I'm seeing is that when I do paging in the grid, then use the combobox to select a different value to filter the grid on, the grid *is* re-getting the modified datasource however it is *not* resetting its current page number.  It's remembering whatever the last page number was when I really want it to reset and start fresh upon a combobox selection change.

I tried just setting the grid datasource to null before the calls to get its datasource and rebind, but that doesn't seem to do the trick.

What's the correct way to force the grid to reset its page number?

Thx
Tsvetoslav
Telerik team
 answered on 30 Mar 2009
5 answers
132 views
Hi all,

I have a little problem, certainly based on page lifecyle, but I don't see how to correct it.

My web site contains a MasterPage (called MP for this example). MP contains a Page (called P here) and a radtooltip manager. In P, there is a lot of usercontrol (with ascx extension) that are loaded dynamically with LoadControl(...) methods.

Take one user control (UC1) from P for our example. In UC1, there is another usercontrol (UC2) wich contains a picture and a drop down list.

I've wrote code that tooltipify the picture in UC2, through a MasterPage method. This works fine. But, when I've changed a value on my drop down list, I've called another MasterPage method to change the value of the ToolTipTargetControl. Altought my method find correctly in the TargetControls collection the designed tooltip, the value is not changed in the product source code.

The amazing comportment is that if UC1 is set by design mode in P (so, not by LoadControl method), all works perfectly.

Any Idea ?

Regard.
Tervel
Telerik team
 answered on 30 Mar 2009
1 answer
120 views
Hi all,

I am trying to create a sliding pane that contains a rad treeview with a context menu. Here is how I'm doing it:

 

function CreateContextMenu()

 

{

 

var ContextMenu = '<div class="RadMenu RadMenu_Default rmContextMenu RadMenu_Default_Context "><ul class="rmActive rmVertical rmGroup rmLevel1">';

 

ContextMenu +=

'<li class="rmItem rmFirst"><a href="#" class="rmLink "><img alt="" src="images/ResearchTools/TreeView/FolderCollapse.gif" class="rmLeftImage" /><span class="rmText">Add Index</span></a></li><li class="rmItem"><a href="#" class="rmLink ">';

 

ContextMenu +=

'<img alt="" src="images/ResearchTools/TreeView/Document.png" class="rmLeftImage" /><span class="rmText">Add Question</span></a></li><li class="rmItem"><a href="#" class="rmLink "><img alt="" src="images/ResearchTools/SurveyDetail/Edit.gif"';

 

ContextMenu +=

' class="rmLeftImage" /><span class="rmText">Rename</span></a></li><li class="rmItem rmLast"><a href="#" class="rmLink "><img alt="" src="images/ResearchTools/SurveyDetail/Delete.gif" class="rmLeftImage" /><span class="rmText">Delete</span></a></li>';

 

ContextMenu +=

'</ul></div>';

 

 

 

return ContextMenu;

 

}

 


function
CreateEmptyTree(TreeID, TabName)

 

{

 

var EmptyTree = '<div class="NoOverFlow"><div id="' + TreeID + '" title="' + TabName + ' Tree" class="RadTreeView RadTreeView_Default NoOverFlow" style="overflow:auto;height:100%;width:240px;"><ul class="rtUL rtLines"></ul>';

 

EmptyTree +=

'<div id="' + TreeID + '_RadTreeViewContextMenu1">' + CreateContextMenu() + '<input id="' + TreeID + '_RadTreeViewContextMenu1_ClientState" ';

 

EmptyTree +=

'name="' + TreeID + '_RadTreeViewContextMenu1_ClientState" type="hidden" /></div><input id="' + TreeID + '_ClientState" ';

 

EmptyTree +=

'name="' + TreeID + '_ClientState" type="hidden" /></div></div>';

 

 

 

return EmptyTree;

 

}

 

 


function
CreateElement(TabName, HierarchyID)

 

{

 

//var newNode = new Telerik.Web.UI.RadTreeView();

 

 

var controlID = 'SurveyDetailUC1_' + TabName + HierarchyID;

 

 

var treeID = 'SurveyDetailUC1_HierarchyTree' + TabName + HierarchyID;

 

 

var tabContainer = document.createElement('DIV');

 

tabContainer.className =

'paneTabText';

 

tabContainer.id =

'RAD_SLIDING_PANE_TAB_' + controlID;

 

tabContainer.title = TabName;

tabContainer.style.width =

'21px';

 

 

 

var paneTabTextElement = document.createElement('SPAN');

 

paneTabTextElement.className =

'paneTabText';

 

paneTabTextElement.id =

'RAD_SLIDING_PANE_TEXT_' + controlID;

 

paneTabTextElement.innerHTML = TabName;

tabContainer.appendChild(paneTabTextElement);

 

 

 

var slidingPaneMainDiv = document.createElement('DIV');

 

slidingPaneMainDiv.id = controlID;

slidingPaneMainDiv.style.zIndex =

'2000';

 

slidingPaneMainDiv.className =

'RadSplitter_Default';

 

slidingPaneMainDiv.innerHTML =

'<table class="slideContainer" cellpadding="0" cellspacing="0" style="width: 1px;height: 1px"><tr class="slideHeader">' +

 

 

'<td><table cellpadding="0" cellspacing="0" style="width: 100%; table-layout: fixed;"><tr><td class="slideTitleContainer">' +

 

 

'<div class="slideTitle" style="overflow: hidden;" id="RAD_SPLITTER_SLIDING_TITLE_' + controlID + '"></div>' +

 

 

'</td><td class="slideHeaderIconWrapper"><div id="RAD_SPLITTER_SLIDING_PANE_UNDOCK_' + controlID + '" class="slideHeaderUndockIcon"' +

 

 

'title="Undock">&nbsp;</div></td><td class="slideHeaderIconWrapper"><div id="RAD_SPLITTER_SLIDING_PANE_DOCK_' + controlID + '" title="Dock" class="slideHeaderDockIcon">&nbsp;</div>' +

 

 

'</td><td class="slideHeaderIconWrapper"><div title="Collapse" id="RAD_SPLITTER_SLIDING_PANE_COLLAPSE_' + controlID + '" class="slideHeaderCollapseIcon">' +

 

 

'&nbsp;</div></td></tr></table></td><td rowspan="2" id="RAD_SPLITTER_SLIDING_ZONE_RESIZE_' + controlID + '" style="font-size: 1px;' +

 

 

'line-height: 1px;" class="slideContainerResize" title="Resize"><div style="width: 4px;"></div></td></tr><tr><td align="left">' +

 

 

'<div class="TreeBackground" id="RAD_SLIDING_PANE_CONTENT_' + controlID + '" style="overflow: auto;width: 1px; height: 1px">' + CreateEmptyTree(treeID, TabName) +

 

 

'</div></td></tr></table>';

 

 

 

 

var TreeSlidingZoneLeft = '<%= TreeSlidingZoneLeft.ClientID %>';

 

$get(

'RAD_SLIDING_ZONE_PANES_CONTAINER_' + TreeSlidingZoneLeft).appendChild(slidingPaneMainDiv);

 

$get(

'RAD_SLIDING_ZONE_PANES_CONTAINER_' + TreeSlidingZoneLeft).innerHTML += '<input id="' + controlID + '_ClientState" name="' + controlID + '_ClientState" type="hidden" />';

 

$get(

'RAD_SLIDING_ZONE_TABS_CONTAINER_' + TreeSlidingZoneLeft).appendChild(tabContainer);

 

Telerik.Web.UI.RadTreeView._preInitialize(treeID,

"0");

 

 

var contextMenu = $create(Telerik.Web.UI.RadContextMenu, {

 

 

"_flow":0,"_skin":"Default",

 

 

"clientStateFieldID":treeID + "_RadTreeViewContextMenu1_ClientState",

 

 

"collapseAnimation":"{\"type\":12,\"duration\":200}",

 

 

"itemData":[{"postBack":0,"value":"Add Index"},{"postBack":0,"value":"Add Question"},{"postBack":0,"value":"Rename"},{"postBack":0,"value":"Delete"}]}

 

,

null, null, $get(treeID + "_RadTreeViewContextMenu1"));

 

 

 

var treeView = $create(Telerik.Web.UI.RadTreeView,

 

{

"_scrollPosition":0,"_selectedValue":"","_skin":"Default"

 

,

"_uniqueId":"SurveyDetailUC1$HierarchyTree" + TabName,"allowNodeEditing":true,

 

 

"clientStateFieldID":treeID + "_ClientState",

 

 

"collapseAnimation":"{\"duration\":200}",

 

 

"contextMenuIDs":[treeID + "_RadTreeViewContextMenu1", "RadTreeViewContextMenu1"],

 

 

"enableDragAndDrop":true,"expandAnimation":"{\"duration\":200}","nodeData":[],"selectedIndexes":[]},

 

{

"contextMenuItemClicked":contextMenuItemClicked,"contextMenuShowing":contextMenuShowing,"nodeClicked":OnNodeClicked,"nodeCollapsed":ShowCollapseImage,"nodeDragging":onNodeDragging,"nodeDropping":onNodeDropping,"nodeEditing":OnNodeEditing,"nodeExpanded":ShowExpandImage}

 

,

null, $get(treeID));

 

 

treeView._ContextMenus = [contextMenu];

 

 

var slideProps1 = {"_index":0,"_scrollLeft":0,"_scrollTop":0,"clientStateFieldID": controlID + "_ClientState","title":TabName,"width":"240px"};

 

 

var slideProps2 = {"parent":TreeSlidingZoneLeft,"parentPane":"<%= TreePane.ClientID %>","splitter":"<%= WebSplitter.ClientID %>"};

 

 

 

var slidingPane = $create(Telerik.Web.UI.RadSlidingPane, slideProps1 , {"expanded":PaneExpanded}, slideProps2 , $get(controlID));

 

addEditDeleteButtonsToTab(slidingPane, TabName);

$find(TreeSlidingZoneLeft)._addPane(slidingPane);

}

 


function
addEditDeleteButtonsToTab(slidingPane, TabName)

 

{

slidingPane.set_title(TabName + CreateEditDeleteButtonUnicode(TabName));

slidingPane.GetTabContainer().title = TabName;

}
...
...

 

 

<telerik:RadPane ID="TreePane" Width="22px" BorderColor="#e2e2e2" Height="100%" runat="server">

 

 

<telerik:RadSlidingZone SlideDuration="10" ID="TreeSlidingZoneLeft" runat="server" Width="22px">

 

 

 

 

 

 

</telerik:RadSlidingZone>

 

 

</telerik:RadPane>

 

 



The pane gets created and the empty tree is also within the pane. I am able to add node to it and once a node (or nodes) are added, I can right click and see the context menu.

But the context menu items are not working, It seems like contextMenuItemClicked is not being triggered.

Can somebody help me with this. I can also send a sample project if requested. Thanks ;)

 

Yana
Telerik team
 answered on 30 Mar 2009
1 answer
123 views
G'Day

We have a page in which we have a sliding pane on the right hand side, which slides to the left.

We have found that in Firefox the content of the sliding pane is cut off at the height of whatever image we use as an icon for the pane.

We have tried setting every object above the pane to 100% height, but this just makes a mess of our layout, and although the sliding pane is ten the correct height, it sprouts scrollbars and becomes transparent.

For the moment, as a workaround, we have inserted a very tall image as an icon, but the pane still becomes transparent, so we have then placed a div inside the pane with background colour set to white and height 400 just so that it looks almost presentable.

The sliding pane does exactly what we would expect in IE7.

Here is the code:

    <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
    </telerik:RadAjaxManager>
    <telerik:RadSplitter ID="RadSplitter1" runat="server" Width="100%" Height="100%">
        <telerik:RadPane ID="rpMain" runat="server">
            <table class="container" cellspacing="0">
                <tr valign="top" style="height:30px; padding:5 0 0 5;" >
                    <td align="left">
                        <div id="InfoListHeading">
                            <h1>
                                <asp:Label ID="lblHeading" runat="server" Text="" CssClass="InfoListHeadingText"></asp:Label>
                            </h1>
                        </div>
                    </td>
                </tr>
                <tr valign="top">
                    <td align="left">
                        <table width="100%">
                            <tr valign="top">
                                <td>
                                    <telerik:RadTreeView ID="rtvInfo" runat="server" EnableAjaxSkinRendering="true" Font-Size="12pt" Skin="Engraving" EnableEmbeddedSkins="False" >
                                        <CollapseAnimation Duration="100" Type="OutQuint" />
                                        <ExpandAnimation Duration="100" />
                                        <NodeTemplate>
                                            <table width="95%" cellpadding="3px">
                                                <tr>
                                                    <td rowspan="2" >
                                                        <asp:ImageButton ID="ibProduct" runat="server" Width="150px" />
                                                        <telerik:RadToolTip ID="RadToolTip1" runat="server" TargetControlID="ibProduct">
                                                            <asp:Image ID="imgBigProduct" runat="server" Width="400px" />
                                                        </telerik:RadToolTip>
                                                    </td>
                                                    <td align="left">
                                                        <asp:HyperLink ID="hlLink" runat="server" CssClass="InfoListLink">
                                                            <asp:Label ID="lblName" runat="server" Text='<%# DataBinder.Eval(Container, "Text") %>'></asp:Label>
                                                        </asp:HyperLink>
                                                    </td>
                                                    <td>
                                                        <asp:Label ID="lblPrice" runat="server" Text=""></asp:Label>
                                                    </td>
                                                    <td>
                                                        <asp:Button ID="btnBuyNow" runat="server" Text="" OnClick="AddItem"  />
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td align="left">
                                                        <asp:Label ID="lblText" runat="server" Text="" CssClass="InfoListText"></asp:Label>
                                                    </td>
                                                    <td></td>
                                                    <td></td>
                                                </tr>
                                            </table>
                                        </NodeTemplate>
                                    </telerik:RadTreeView>
                                </td>
                            </tr>
                        </table>
                    </td>
                </tr>
                <tr>
                    <td></td>
                </tr>
            </table>
        </telerik:RadPane>
        <telerik:RadPane ID="rpBasket" runat="server" Width="30px" CssClass="basketPane">
            <telerik:RadSlidingZone ID="rszBasket" runat="server" Width="30px" SlideDirection="left">
                <telerik:RadSlidingPane ID="rspBasket" runat="server" Width="200px" IconUrl="Images/Stock/shopping_small.jpg" TabView="ImageOnly" Title="Shopping Basket" CssClass="slidingBasket">
                    <div id="divBasket" runat="Server" style="background-color:White; height:100%;">
                        <asp:Label ID="lblBasketEmpty" runat="server" Text=""></asp:Label>
                        <asp:Repeater ID="rptrBasket" runat="server">
                            <HeaderTemplate>
                                <table width="100%">
                                    <tr style="border-bottom:groove 2pt red;">
                                        <th>
                                            <asp:Label ID="lblItemHead" runat="server" Text=""></asp:Label>
                                        </th>
                                        <th>
                                            <asp:Label ID="lblQuantityHead" runat="server" Text=""></asp:Label>
                                        </th>
                                        <th>
                                            <asp:Label ID="lblPriceHead" runat="server" Text=""></asp:Label>
                                        </th>
                                    </tr>
                            </HeaderTemplate>
                            <ItemTemplate>
                                    <tr>
                                        <td>
                                            <asp:Label ID="lblItem" runat="server" Text='<%# DataBinder.Eval(Container.DataItem, "ItemDescription") %>'></asp:Label>
                                        </td>
                                        <td>
                                            <asp:Label ID="lblQuantity" runat="server" Text='<%# CDbl(DataBinder.Eval(Container.DataItem, "Quantity")).ToString("#0.####") %>'></asp:Label>
                                        </td>
                                        <td>
                                            <asp:Label ID="lblPrice" runat="server" Text='<%# db.GetTraderCurrency(session("TraderID")) & CDbl(DataBinder.Eval(Container.DataItem, "LinePrice")).ToString("#0.00") %>'></asp:Label>
                                        </td>
                                    </tr>
                            </ItemTemplate>
                            <FooterTemplate>
                                    <tr class="shoppingBasketTotal">
                                        <td>
                                            <asp:Label ID="lblTotalText" runat="server" Text=""></asp:Label>
                                        </td>
                                        <td>
                                        </td>
                                        <td>
                                            <asp:Label ID="lblTotalPrice" runat="server" Text=""></asp:Label>
                                        </td>
                                    </tr>
                                </table>
                            </FooterTemplate>
                        </asp:Repeater>
                        <asp:Button ID="btnCheckout" runat="server" Text="" />
                    </div>
                </telerik:RadSlidingPane>
            </telerik:RadSlidingZone>
        </telerik:RadPane>
    </telerik:RadSplitter>
Tsvetie
Telerik team
 answered on 30 Mar 2009
3 answers
115 views
Hi,

I'm using the RadContextMenu passing in parameters in Context to dynamically load options for a Grid in ASP.NET.

In the backend it's calling database to retrieve links the user can do.

The problem is that when there is no links to return, passing a empty RadMenuItemData array causes javascript error in the aspx.

I first try to raise an ApplicationException, and the error message will get displayed as an alert to the user.
However, this approach will somehow make the contextmenu don't call the web service at all (I set a breakpoint at the populate method, and it's not getting called) the next time you right click. If you right click again then it will be back to normal.            

I wonder what's the recommended way to pass empty results so no itemdata will be populated?


Thanks!        
Yana
Telerik team
 answered on 30 Mar 2009
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?