Telerik Forums
UI for ASP.NET AJAX Forum
7 answers
367 views
Hi

I have two list boxes on my Page.
When the page loads depending on the type of user, an item from the left listbox is transferred to the right listbox.
The user can then transfer anything else from left to right.

If an option is changed on the page, everything from the right needs to be transferred back to the left.

I copied the example and have listboxes on my page like this:
<telerik:RadListBox runat="server" ID="lstLeft" Height="200px" Width="200px" AllowTransfer="true" TransferToID="lstRight"/>
<telerik:RadListBox runat="server" ID="lstRight" Height="200px" Width="200px" />

Transferring initially from left to right woks fine using this:
lstLeft.Transfer(listItem , lstLeft, lstRight);

If I try it the other way round (to transfer back to the left) :
lstRight.Transfer(listItem, lstRight, lstLeft);

I get the following error:
Specified argument was out of the range of valid values.
Parameter name: sourceListBox 


If I add AllowTransfer="true" TransferToID="lstLeft" to the right hand textbox the transfer works, but I get the transfer buttons to the right of the right list box as well as in between.

What do I need to do to get this to work correctly?

Bex


Terry Hoiness
Top achievements
Rank 1
 answered on 01 Jul 2013
4 answers
100 views

Hi all,

I have a template column in my grid.  The text of this column is derived by feeding the auditor ID (which is part of the table which is the datasource of the grid) through a function in my code.  This gives me the name of the auditor.  The template column looks like this:

<trt:GridTemplateColumn HeaderText="AuditorId" FooterText ="Total Hours" >
<HeaderTemplate>
<asp:LinkButton ID="btnAuditorId" Text="AuditorId" ToolTip="Sort by Auditor ID"
CommandName='Sort' CommandArgument='AudrId'
runat="server">
</asp:LinkButton>
</HeaderTemplate>
<ItemTemplate>
<asp:Label ID="lblAudDescr" runat="server" Text='<%# ctl.GetAuditorDescr( DataBinder.Eval(Container, "DataItem.AudrId"))%>' />
</ItemTemplate>
</trt:GridTemplateColumn>

This works beautifully to fill my grid, but now I want to use the EnableHeaderContextMenu functionality.  Works well for all the other columns (which are bound columns) but when I try to use it on this column I get an error stating "Expression cannot be null or empty".

I tried setting the groupByExpression in the <trt:GridTemplateColumn> to "ctl.GetAuditorDescr(AudrId)" but then I get an error stating "Invalid group by expression: 'Group By' clause missing".

How can I feed the AudrId, which is part of the datasource, through my GetAuditorDescr function and then group by those results?



Denise
Top achievements
Rank 1
 answered on 01 Jul 2013
1 answer
62 views
I've been pouring over your documentation to try to find a simple gauge to display horizontally. If I paste in the ones from your documentation they are  Vertical and changing the "Vertical="false"" property makes the gauge disappear completely?

If I put an appearance-backgroundColor="grey" I can see the area where the gauge should be but no gauge is in there?

Here's what I'm using:
<telerik:RadLinearGauge ID="rGaugeHorizontal" runat="server" Transitions="True" Width="450"
            Height="140" Appearance-BackgroundColor="#EDEDED">
            <Pointer Value="5" Shape="BarIndicator" Color="Black" Size="15">
            </Pointer>
            <Scale Min="0" Max="100" Vertical="false" Mirror="True" MajorTicks-Size="25" MinorTicks-Size="20">
                <Ranges>
                    <telerik:GaugeRange From="0" To="20" Color="red" />
                    <telerik:GaugeRange From="20" To="40" Color="blue" />
                    <telerik:GaugeRange From="40" To="60" Color="green" />
                </Ranges>
            </Scale>
        </telerik:RadLinearGauge>

I would have thought that changing from verticle to horizontal would be in the <Appearance> properties too?
Danail Vasilev
Telerik team
 answered on 01 Jul 2013
5 answers
143 views
Hi,

I'm using IE9 with document mode of IE7.

The same code works good with Pie chart, but when I change the series type to 'DonutSeries', it doesn't look the same.
It becomes a donut chart, but there is no 3d look, and there are no labels with the Y value around the chart.
Attached an image with two screenshots of the same code, one with Pie, and the other with Donut.

You can also go to your HtmlChart demos.
Open you Pie chart demo, and your Donut chart demo.
Open the dev tools of IE, and change the document mode to IE7.
You'll see the difference.

Thanks,
Guy Segev.
Danail Vasilev
Telerik team
 answered on 01 Jul 2013
1 answer
179 views
Hi, opening up an old project (web) I am trying to run the upgrade wizard which I have had success with.  Note VS just upgraded it recently.  I am getting "no project selected" and  "please go back and select at least one project in order to continue the upgrade".  I tried selecting at various levels.  Any ideas?
Dyanko
Telerik team
 answered on 01 Jul 2013
1 answer
92 views
Is it possible to create a custom event handler to run before the default handler for the rename command?  I would like to place some logic in front of the rename.
Dobromir
Telerik team
 answered on 01 Jul 2013
1 answer
74 views
I am trying to change one element in the NodeTemplate of a Treeview and my code is not working. It executes fine but the change doesn't show up on the screen. What am I doing wrong?

Here is the the code:
protected void RadTreeView1_NodeDataBound (object sender, RadTreeNodeEventArgs e)
{
    e.Node.ExpandMode = TreeNodeExpandMode.ServerSide;
    if (e.Node.Text == "Retailers")
    {
        RadTreeNode node = RadTreeView1.Nodes[0];
        HyperLink hyperLink = (HyperLink)node.FindControl ("HyperLink2");
        hyperLink.Visible = false;  // this what is want to do
        hyperLink.Text = "<span style=\"color: #BBBBBB\">X</span>"; // this is test to see that the Hyperlink Text changes
    // Neither of the above two lines produce the screen changes I am looking for
      }
}

Here is the defintion
<telerik:RadTreeView ID="RadTreeView1" runat="server" CheckBoxes="True" MultipleSelect="True"
    EnableViewState="true" ShowLineImages="False" EnableEmbeddedSkins="False" Skin="tree_2"
    OnNodeClick="RadTreeView1_NodeClick" OnNodeDataBound="RadTreeView1_NodeDataBound"
    OnClientNodeCollapsed="OnClientNodeCollapsed" OnClientNodeExpanded="OnClientNodeExpanded" OnClientLoad="onLoad">
    <NodeTemplate>
        <small>
            <asp:Label ID="lblnodeText" Text='<%#Eval("Title") %>' runat="server" /><asp:Label
                ID="lblCatId" Text='<%#Eval("Id") %>' runat="server" Visible="false"></asp:Label><asp:Label
                    ID="lblisCustomer" Text='<%#Eval("isCustomer") %>' runat="server" Visible="false"></asp:Label><asp:Label
                        ID="Description" runat="server" Text='<%#Eval("description") %>' Visible="false" /><asp:HiddenField
                            ID="DescriptionVisible" runat="server" Value='<%#Eval("descriptionVisible") %>' />
        </small>
        <small>
<asp:HyperLink ID="HyperLink2" runat="server" NavigateUrl=<%# "javascript:Popup_Window('category_detail','" + DataBinder.Eval(Container.DataItem, "id").ToString() + "')"%> style="text-decoration: none;"><span style="color: #BBBBBB">e</span></asp:HyperLink>
        </small>
    </NodeTemplate>
</telerik:RadTreeView>
Kate
Telerik team
 answered on 01 Jul 2013
1 answer
201 views
In the following example, can you explain me why the RadTabStrip1_TabClick server event is not fired ?
The event is fired only if I remove the Button1 AjaxSetting. 
How can I keep the loading panel and raise the server event ?

<body>
    <form id="form1" runat="server">
    <telerik:RadScriptManager ID="ScriptManager" runat="server">
        <Scripts>
            <asp:ScriptReference Path="~/Scripts/jquery.min.js" />       
        </Scripts>
    </telerik:RadScriptManager>
    <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server" UpdatePanelsRenderMode="Inline">
        <AjaxSettings>
            <telerik:AjaxSetting AjaxControlID="Button1" EventName="Click">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="Panel1" LoadingPanelID="RadAjaxLoadingPanel1" />
                </UpdatedControls>
            </telerik:AjaxSetting>           
        </AjaxSettings>
    </telerik:RadAjaxManager>
    <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server"></telerik:RadAjaxLoadingPanel>
 
    <asp:Button ID="Button1" runat="server" OnClientClick="ChangeTab()" Text="Click here if you really want to change tab" style="display:none" />
    <asp:Panel ID="Panel1" runat="server">
    <telerik:RadTabStrip ID="RadTabStrip1" runat="server" MultiPageID="RadMultiPage1" AutoPostBack="true" OnClientTabSelecting="RadTabStrip1_ClientTabSelecting"
            SelectedIndex="0" ontabclick="RadTabStrip1_TabClick" >
        <Tabs>
            <telerik:RadTab Text="Tab A" PageViewID="PageViewA" ></telerik:RadTab>
            <telerik:RadTab Text="Tab B" PageViewID="PageViewB" ></telerik:RadTab>
        </Tabs>
    </telerik:RadTabStrip>
 
    <telerik:RadMultiPage ID="RadMultiPage1" runat="server" SelectedIndex="0" >
        <telerik:RadPageView ID="PageViewA" runat="server">
            Tab a<br />
            <asp:Label ID="labelViewA" runat="server" Text="Not updated by the server yet"></asp:Label>      
        </telerik:RadPageView>
        <telerik:RadPageView ID="PageViewB" runat="server">
            Tab b<br />
            <asp:Label ID="labelViewB" runat="server" Text="Not updated by the server yet"></asp:Label>      
        </telerik:RadPageView>
     </telerik:RadMultiPage>
     </asp:Panel>
     <telerik:RadScriptBlock ID="RadScriptBlock" runat="server">
        <script language="javascript" type="text/javascript">
             
            var lastTabClickedItem = null;
            var changeTabConfirmed = false;
 
            function RadTabStrip1_ClientTabSelecting(sender, eventArgs)
            {
                var button1 = $('#<%= Button1.ClientID %>');
                if (changeTabConfirmed == true) {
                    changeTabConfirmed = false;                   
                    button1.hide();
                }
                else {
                    eventArgs.set_cancel(true);
                    lastTabClickedItem = eventArgs.get_tab();               
                    button1.show();
                }
            }
 
            function ChangeTab() {
                changeTabConfirmed = true;
                lastTabClickedItem.click();
            }
        </script>
     </telerik:RadScriptBlock>
    </form>
</body>

protected void RadTabStrip1_TabClick(object sender, Telerik.Web.UI.RadTabStripEventArgs e)
{
    if (e.Tab.PageViewID == "PageViewA")
    {
        labelViewA.Text = "Updated by the server";
    }
    else
    {
        labelViewB.Text = "Updated by the server";
    }           
}

Thank you
Eyup
Telerik team
 answered on 01 Jul 2013
11 answers
1.0K+ views
I am quite new to the ajax world, so if this is a rookie question, please be patient with me. I'm still learning.

I have a situation where I don't want to perform a postback until the user confirms that it is OK to perform a certain action. However, on postback, if the data that is sent isn't valid, the function should alert the user to one of several potential problems with the data, but if the data is valid, go ahead and update certain selected controls on the form.

If I use an ajax request, I can get success or failure and alert the user about the problem if it exists, however, I am not sure how to update the controls or prevent their update depending upon the value returned from the server.

Essentially, I want to have the user confirm via a radwindow, then if the confirmation is affirmative, then perform an ajax POST request with the data. If the server returns success, I want to then update a series of controls, however, if the server returns an error, I want to show a radwindow with the error returned from the server and leave the page exactly as it is.
Maria Ilieva
Telerik team
 answered on 01 Jul 2013
5 answers
198 views
I am trying to put together a general purpose pivot table, so I don't really know what columns they will be needing. As a result I have a lot of hidden fields. 

Is it possible to get a scrollbar on that window? You can expand it of course, but only gives me 35 to 40 hidden fields. Expanding the width only makes the objects wider, it it would switch to multiple columns that would be a good alternative to a scrollbar.

Thanks
Randy Miller
Venelin
Telerik team
 answered on 01 Jul 2013
Narrow your results
Selected tags
Tags
+? more
Top users last month
Ambisoft
Top achievements
Rank 2
Iron
Pascal
Top achievements
Rank 2
Iron
Matthew
Top achievements
Rank 1
Sergii
Top achievements
Rank 1
Iron
Iron
Andrey
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Ambisoft
Top achievements
Rank 2
Iron
Pascal
Top achievements
Rank 2
Iron
Matthew
Top achievements
Rank 1
Sergii
Top achievements
Rank 1
Iron
Iron
Andrey
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?