Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
114 views
I would like to use automatic load on demand with an entity datasource but need to select a value like FullName that would return LastName & ", " & FirstName.  I have tried many different approaches with no luck.  What is the best way to achieve this? 
Thanks in advance,
Bryan Foster
Cori
Top achievements
Rank 2
 answered on 20 Aug 2010
2 answers
259 views
I have 2 ListBoxes. If an item in one ListBox is disabled I need to stop it from being transferred to the other.

I've already established that I need to limit the buttons to remove the TransferAll... options in an attempt to achieve this.

With only the TransferTo and TransferFrom buttons working it appears that you can stop the transfer of disabled items 'cos you can't select 'em, but no...

If I select an item above the disabled item and transfer it to the other ListBox, the source ListBox automatically selects the next item down in the list whether or not it is disabled". Similarly, if the disabled item is at the top of the list and I transfer all of the other items in the ListBox, the disabled item is selected when it is the remaining item and it can be transferred.

Now, I personally think that having the system select a disabled item automagically is a bug. If it's not and this functionality is by design, can I request a new property on the ListBox; AllowDisabledItemTransfer. If you set the default to true then the existing functionality will remain unchanged.

-- 
Stuart
Genady Sergeev
Telerik team
 answered on 20 Aug 2010
2 answers
131 views
Hi!
I've set the document manager to point to a virtual folder that is linked to a folder on a different site on the same server.

For some reason it's not working on the live server but the same schema does work on the test environment.

When I click on the document manager icon on the editor it opens a window where I see the manager with all controls disabled and the message "No records to display".

There is no visible error so I wonder how I can detect why it's not able to access the appropriate folder. I've played with permissions with no luck. If the folder it's a "normal" folder and not a virtual folder, works perfectly.

I just want to see a message telling me what's wrong, just that.  I'm totally blind on this.

Thanks in advance!
Fiko
Telerik team
 answered on 20 Aug 2010
4 answers
126 views

The Previous < and Next > month buttons do not update the calendar when they are clicked using the following .aspx code with Telerik.Web.UI version 2010.1.415.35.

<telerik:RadSplitter runat="server" ID="RadSplitter1" PanesBorderSize="0" Width="734px"
                Height="782px" Skin="Office2007">
        <telerik:RadPane runat="server" ID="leftPane" Width="260px" MinWidth="260" MaxWidth="300"
                    Scrolling="None" >
            <telerik:RadCalendar runat="server" ID="RadCalendar1" Skin="Office2007" AutoPostBack="True"
                        EnableMultiSelect="False" DayNameFormat="Shortest"
                        OnSelectionChanged="RadCalendar1_SelectionChanged" CellAlign="Center" 
                        CellVAlign="Middle" FirstDayOfWeek="Default" 
                        MonthLayout="Layout_7columns_x_6rows" Orientation="RenderInRows" 
                        PresentationType="Interactive" SelectedDate="" TitleAlign="Center" 
                            ShowRowHeaders="False">
                </telerik:RadCalendar>
                <br />
            <telerik:RadPanelBar 
                    runat="server" ID="RadPanelBar1"
                    Height="380px"
                    ExpandMode="FullExpandedItem"
                    OnItemClick="RadPanelBar1_ItemClick"
                    Skin="Office2007">
                    <Items>
                        <telerik:RadPanelItem Text="Appointments" Expanded="True">
                            <Items>
                                <telerik:RadPanelItem  Text="Appointment Master" />
                                <telerik:RadPanelItem  Text="Criminal History Schedule (Troop)" />
                                <telerik:RadPanelItem  Text="New Appointments" />
                            </Items>
                        </telerik:RadPanelItem>
                        <telerik:RadPanelItem Text="Services" >
                            <Items>
                                <telerik:RadPanelItem  Text="Headquarters Service" />
                                <telerik:RadPanelItem  Text="Service Worklist" />
                            </Items>
                        </telerik:RadPanelItem>
                        <telerik:RadPanelItem Text="Reports">
                            <Items>
                                <telerik:RadPanelItem  Text="CHCM Report Module" />
                            </Items>
                        </telerik:RadPanelItem>
                    </Items>
            </telerik:RadPanelBar>
            <p style="padding: 5px 10px"><asp:Literal Runat="server" ID="Label1"></asp:Literal></p>
        </telerik:RadPane>
Suzanne
Top achievements
Rank 1
 answered on 20 Aug 2010
14 answers
314 views
Dear Telerik Team,

I am using a RadGrid and loading Item values on page load. When i click on Row I need to fire OnClientRowSelected event which is working well in IE but causing problem in MozillaFirefox by showing undefined. Where i need to load RadEditor with some values.

Thanks Inadvance

Regards
----------
Pandu
Veli
Telerik team
 answered on 20 Aug 2010
1 answer
125 views
I have read and implemented the information from this post: Retain expanded/selected state in hierarchy on rebind, and it works well as long as I do not use column filtering.  When I filter the parent grid columns, the incorrect data items are expanded.  The index is the same, but the in data in the row is different and the child of that row should no longer be expanded.

From what I can tell, the recommended method of retaining the expanded state is based off of storing DataSetIndex of the row in a hash table.  When you filter a parent column, the original parent row can change to a different index in the grid or even disappear.  I would like to know the recommended practice for this scenario.  Should I simply closed all expanded child grids or could I possibly use something other than an index (such as a primary key of the data row) to identify  which rows should be expanded?

If I should simply kill all the child grids, what is the best way to do this? 

Thanks,
Jim
Mira
Telerik team
 answered on 20 Aug 2010
1 answer
128 views
Hello, i show RadWindow from parent form:

<telerik:RadTreeView ID="tvFile" runat="server">
            OnClientContextMenuItemClicking="onClientContextMenuItemClicking">
    <ContextMenus>
        <telerik:RadTreeViewContextMenu ID="MainContextMenu" runat="server">
            <Items>
                 <telerik:RadMenuItem Value="Rights" Text="Rights"/>
           </Items>
       </telerik:RadTreeViewContextMenu>
    </ContextMenus>
    </telerik:RadTreeView>
    <telerik:RadWindowManager ID="winManager" ShowContentDuringLoad="false" VisibleStatusbar="false"
        ReloadOnShow="false" runat="server" Skin="Sunset" EnableShadow="true">
        <Windows>
            <telerik:RadWindow ID="RadWindow2" Modal="true" onClientClose="OnClientClose"
            NavigateUrl="UserRights.aspx" runat="server" Behaviors="Close">
            </telerik:RadWindow>
        </Windows>
    </telerik:RadWindowManager>
 
<script type="text/javascript">
    function OnClientClose(oWnd, args)
    {
        var arg = args.get_argument();
        if (arg)
         {} 
    }
    function openWin(path) {
        var oWnd = radopen("UserRights.aspx?file="+path, "RadWindow2");
    }
  
 
    function onClientContextMenuItemClicking(sender, args)
    {
        var menuItem = args.get_menuItem();
        var treeNode = args.get_node();
        var nodeValue = treeNode.get_value();
        menuItem.get_menu().hide();
        switch (menuItem.get_value())
        {
            case "Rights":
                openWin(nodeValue);
                break;
        }
    }
</script>



At UserRights.aspx I need RadScriptManager for RadListBox like this:

<form id="form1" runat="server">
       <telerik:RadScriptManager ID="RadScriptManager1" runat="server"/>
        <asp:Button runat="server" ID="ds" Text="fd" />
        <telerik:RadListBox runat="server" ID="dcs"></telerik:RadListBox>
</form>

But when RadWindow opens at my firebug I got js error:

this._form is null

When I haven't got RadScriptManager all is OK. But I need it for RadListBox and UpdatePanel features.
Georgi Tunev
Telerik team
 answered on 20 Aug 2010
1 answer
114 views
After I implemented code for tooltip click show the ajax my code for ajax button click is stop woring please see the code below

Thanks

////////////
///aspx code
////////////
 
 <asp:UpdatePanel ID="UpdatePanel1" runat="server" UpdateMode="Always">
        <ContentTemplate>
            <asp:DataList ID="thumbRotatoralt" runat="server" OnItemDataBound="ParentList" OnItemCommand="AddToBasket_ItemCommand" EnableViewState="true">
                <ItemTemplate>
<asp:Button ID="btnCart" runat="server" CssClass="pbuttonssmal" Text="Add to Basket"
                                        CommandName="AddItemToBasket" onfocus="Hilite(this)" onblur="Hilite(this, false)" />
 
            </ItemTemplate>
            </asp:DataList>
        </ContentTemplate>
    </asp:UpdatePanel>
 
    <telerik:RadToolTip ID="RadToolTip2" runat="server" Width="100px" ShowEvent="OnClick"
        TargetControlID="link2" IsClientID="true" HideEvent="LeaveToolTip" Position="Center" EnableShadow="true"
        Animation="Resize" ShowDelay="0" RelativeTo="Element" Text="Right-click on the picture above to show the RadToolTip." />
 
        <telerik:RadToolTipManager runat="server" ID="RadToolManager1" EnableShadow="true"
            ShowEvent="OnClick"
            OnClientShow="OnClientShow"
            Skin="Default"
            ShowDelay="200"
            AutoCloseDelay="5000"
            Width="300px"
            Position="MiddleRight"
            RelativeTo="Element">
        </telerik:RadToolTipManager>
 
 
 
<script type="text/javascript">
 
    var lastActiveToolTip = null;
    function OnClientShow(sender, args) {
        lastActiveToolTip = sender;
    }
 
   function beforeunload() {
        var activeTooltip = Telerik.Web.UI.RadToolTip.getCurrent();
        if (!activeTooltip) activeTooltip = lastActiveToolTip;
        if (activeTooltip) {
            var targetElement = activeTooltip.get_targetControl();
            activeTooltip._registerMouseHandlers(targetElement, false);
        }
    };
 
    if (Sys.Browser.agent == Sys.Browser.InternetExplorer) {
        window.attachEvent('onbeforeunload', beforeunload);
    }
    </script>

////////////
///my code behind
////////////
 
protected void AddToBasket_ItemCommand(Object sender, DataListCommandEventArgs e)
    {
 
        //my click event code to save changes to database
    }
 
 
 
    protected void ParentList(object sender, DataListItemEventArgs e)
    {
        DataListItem item = e.Item;
 
        if ((item.ItemType == ListItemType.Item) ||
            (item.ItemType == ListItemType.AlternatingItem))
 
        Button btnCart = (Button)item.FindControl("btnCart");
 
        btnCart.ToolTip = "Item(s) added to basket";
        
        RadToolManager1.TargetControls.Add(btnCart.ClientID, true);
        }
    }
Svetlina Anati
Telerik team
 answered on 20 Aug 2010
12 answers
997 views
Hello,

I have a problem with updating/reloading my treeview.
I have a TreeView that is popultated from a StoreProcedure. I then have some buttons that give a popup where you can enter some information that will update the DB that the StoreProcedure use to populate the TreeView.

When I call a WebService to update the DB everything works fine, it updates the database and everyone is happy, the problem is that after this I want to close my popup and reload/refhresh the TreeView, I have tried some diffrent tactics with window.close(), window.opener.location.reload() and similar and I don't get it to work. I can get the popup to close, but if I also do the reload then i just open up again and also it still doesn't refresh the treeview AND i get a question from IE about that I need to retry geting information.

I read somewhere that you could use window.open('', '_self', ''); to get rid of that message and the funny part is that I use that in another project and there it works but not here. I'll post some of my code but I don't think that helps so much I need to understand how to refresh my TreeView and if there is any smart way todo it.

function cancel_click() {
    window.open('', '_self', '');
    if (window.opener && !window.opener.closed) {
        window.opener.location.reload();
    }
    window.close();
}

That is my javascript for when someone either press the closebutton on the popup or after the WebService have succefully updated the database, it should in theory close the window and refresh the parent. I guess that there is some way to refresh the treeview also.
Please remeber that I want todo this from a popup window, and I need access to the treeview or in someway reload it.

EDIT: Forgot to mention that if I reload the page (just press F5) I still don't get the TreeView updated, but when I close the application and start it again then it refreshes as it should and I can see the post that I have added.

EDIT2: I have also tested having the window.close() before the reload, but this doesn't do any diffrence for me atm. the biggest problem I have is that when I do the reload it opens up my popup again (should only open when you press a button) and the TreeView doesn't get any new data.

Henrik Tegman
Top achievements
Rank 1
 answered on 20 Aug 2010
2 answers
88 views
Hi to all!

 In my website i am using more than one Ajaxupdate vpanel following err comes at run time.

My environment is ASP.Net,VS2008,Framewrk3.5,C#.Net as coding tool

 "System.InvalidOperationException: Only one instance of a ScriptManager can be added to the page."

Anyone plz help me to solve this pa!

Regards,.

Srinivas.

Srinivasa prabhu
Top achievements
Rank 2
 answered on 20 Aug 2010
Narrow your results
Selected tags
Tags
+? more
Top users last month
Hiba
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Rakhee
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Hiba
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Rakhee
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?