Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
72 views
I have two treeviews (left and right).  Our client want to prevent a user from dragging certain types of items from left or right, but to avoid confusion on their part, does not want left to have any items suppressed.  I have the check in the drop handler to see if the node should not be able to be dropped, and it works.  The only problem is that I'm trying to show a rad alert when I stop the drop from happening, but I cannot get it to pop:

<telerik:RadAjaxManagerProxy ID="ajxManager" runat="server">
        <AjaxSettings>
<telerik:RadAjaxManagerProxy ID="ajxManager" runat="server">
        <AjaxSettings>
<telerik:RadAjaxManagerProxy ID="ajxManager" runat="server">
        <AjaxSettings>
            <telerik:AjaxSetting AjaxControlID="left">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="left" LoadingPanelID="alpT" />
                    <telerik:AjaxUpdatedControl ControlID="right" LoadingPanelID="alpT" />
                </UpdatedControls>
            </telerik:AjaxSetting>
            <telerik:AjaxSetting AjaxControlID="right">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="right" LoadingPanelID="alpT" />
                </UpdatedControls>
            </telerik:AjaxSetting>
        </AjaxSettings>
    </telerik:RadAjaxManagerProxy>
 
 
...
 
 
<telerik:RadTreeView ID="right" BorderColor="Black" BorderWidth="1px" OnClientContextMenuItemClicked="ContextMenuClick"
                    runat="server" OnNodeDrop="HandleDrop" OnNodeEdit="HandleNodeEdit" OnNodeExpand="right_NodeExpand"
                    EnableDragAndDrop="True" EnableDragAndDropBetweenNodes="True" Height="475px"
                    Width="350px" meta:resourcekey="trvResource1">
...
</telerik:RadTreeView>


Protected Sub HandleDrop(ByVal sender As Object, ByVal e As RadTreeNodeDragDropEventArgs)
...
    If ShouldNotDrop Then
        Dim strScript As String = "Sys.Application.add_load(function(sender, args) {if (!args.get_isPartialLoad()){radalert(""You cannot drop this here"");}});"
        Telerik.Web.UI.RadAjaxManager.GetCurrent(Me).ResponseScripts.Add(strScript)
   End If
...
End Sub


The code does get written to the page, I've verified this with fidler, but for some reason it is not popping up.
Nikolay Tsenkov
Telerik team
 answered on 22 Dec 2010
1 answer
134 views

I have created a Asp.Net 4.0 page with a RadGrid. One of the columns (ConsignorId) indicates that this record belongs to a specific Consignor.  A consignor can have multiple records. I would like to have a input(textbox) where I could enter a ConsignorId and then render the page with the RadGrid with only the records selected based on the consigorid entered.

Could you refer me to an example for this? I am new to telerek.

Thank You

Princy
Top achievements
Rank 2
 answered on 22 Dec 2010
1 answer
151 views
Hello,

I have encountered with a strange problem.

I have a 2 list boxes, one source second a destination.
all the items have checkboxes.
Also i have 2 button: "select all","unselect all" on eatch list box header.

The code for the buttons:

function selectAllClick(sender) {
    var listBox = $find(sender);
  
    var items = listBox.get_items();    
    items.forEach(function(itm) { itm.set_checked(true); });
}
  
function unSelectAllClick(sender) {
    var listBox = $find(sender);
  
    var items = listBox.get_items();
    items.forEach(function(itm) { itm.set_checked(false); });
}

The problem:

If i check an any item on one of the listboxes and then transfer it to another listbox and then i click on the unselect all button,
then the item that was transfered (the item transferd when it was checked already) still remain check. the button doens't influence
on the item.

Same problem if i reorder items and then try to check them all with the button.

any ideas?

Thanks
Oren
Genady Sergeev
Telerik team
 answered on 22 Dec 2010
5 answers
92 views
Hi,

I have using scrolling in my grid. but header alignment is not including width. i have attached image.

I have set width size=740px in radgrid and also using

 <ClientSettings>
                            <Scrolling AllowScroll="True" UseStaticHeaders="true" SaveScrollPosition="true" />
                        </ClientSettings>

Data showing into scrolling but header not shown.

Find the attached image please give me a tips ASAP.

Thanks in Advance,
Dhamu.
Pavlina
Telerik team
 answered on 22 Dec 2010
1 answer
345 views
Hi,

Im wondering if anyone has a quick solution to this.

I was going to implement a CheckBox in the RadWindow Footer that said 'I Agree' however RadWindow doesnt have Footer Templates.

The only way i see if the use the content template with an Iframe.. unless there another way?
Georgi Tunev
Telerik team
 answered on 22 Dec 2010
1 answer
98 views
Hi,

I have a VS2010 solution in which I have a project containing an AJAX-Enabled WCF service, and also a RADControls Web Application. The default.aspx has a RADTreeView control on it. I load the root nodes and first children of the tree in the onPageLoad event server side. I have the treeview control configured to hit a WCF web service when expanded. Here is my markup...

<

 

 

telerik:RadTreeView ID="RadTreeView1" Runat="server" DataTextField="Text" DataValueField="Value" Skin="Outlook" Width="477px">

 

 

 

<Nodes>

 

 

 

<telerik:RadTreeNode runat="server" AllowDrag="False" AllowDrop="False" AllowEdit="False" Checkable="False" Text="Laws">

 

 

 

</telerik:RadTreeNode>

 

 

 

</Nodes>

 

 

 

<WebServiceSettings Path="http://localhost:22222/TMLawsDataService.svc" Method="LoadTreeNodes" UseHttpGet="false" />

 

 

 

<DataBindings>

 

 

 

<telerik:RadTreeNodeBinding Depth="1" ExpandMode="WebService" />

 

 

 

</DataBindings>

 

 

 

</telerik:RadTreeView>

 

If I have my WCF service in the same project as the default.aspx, then I don't need to specify a port number in the "Path" attribute of the WebServiceSettings node, and the RADTreeControl does a POST back to my WCF service onClientSideClick to get the next level of tree children, and everything works great. BUT if I want to be a good little coder and separate my projects out into a WCF project and a Web Client project under the same solution, then in order to debug my solution in Visual Studio, I need to set 2 startup projects, and run them on different assigned ports. When I do that, I need to specify the port number in the "Path" attribute of the WebServiceSettings node, and when I do that, the RADTreeView control suddenly decides to send GET requests to my service, which my WCF service does not handle, it only takes POSTs.

I have tried setting the "UseHttpGet" attribute of the  WebServiceSettings node to "false" but it does not affect the call type happening from the client to the server when a tree level is expanded by the user. If I specify a port #, it uses GET, if not, it uses POST.

SO... how do I fix this? I must have it do a POST back when I specify a port number on the Path attribute.

thanks for any help

- Roy
Nikolay Tsenkov
Telerik team
 answered on 22 Dec 2010
0 answers
51 views
i have developed one application like the follwing one... so i need to display the items in radlistbox2 whatever i done in radlistbox 1.....

<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Demo.aspx.cs" Inherits="Demo" %>
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
<%@ Register Assembly="SD.LLBLGen.Pro.ORMSupportClasses.NET20" Namespace="SD.LLBLGen.Pro.ORMSupportClasses"
    TagPrefix="llblgenpro" %>
   
<!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">
    <div>
        <asp:ScriptManager ID="ScriptManager1" runat="server">
        </asp:ScriptManager>
    <div>
    <telerik:radlistbox ID="RadListBox1" runat="server" Height="300px" Width="300px"
                AllowTransfer="True"  DataSortField="Room"  EnableDragAndDrop="true"
                DataTextField="ColorDescription" DataValueField="ColorID"  DataSourceID="LLBLGenProDataSource1"
            Skin="Office2007" TransferToID="RadListBox2" OnTransferred="RadListBox1_Transferred"
                AutoPostBackOnTransfer="true">
                <ItemTemplate>
                    <table>
                        <tr><td style="width: 100px;">
                            <img src='<%# String.Format("General/ImageHandler.ashx?type=color&height=50&width=50&ID=" + "{0}",                        DataBinder.Eval(Container.DataItem, "ColorID")) %>' alt="image" />
                           </td> <td style="width:40px;">
                                <%# DataBinder.Eval(Container.DataItem, "ColorDescription")%>
                            </td>
                            <td style="width: 40px;">
                                <%# DataBinder.Eval(Container.DataItem, "ColorNumber")%>
                            </td>
                        </tr>
                    </table>
                </ItemTemplate>
            </telerik:radlistbox>
            
            
            <telerik:radlistbox ID="RadListBox2"    Skin="Office2007" DataTextField="ColorDescription" DataValueField="ColorID" runat="server" Height="300px"
                Width="250px">
                <Items>
               
                </Items>
               
            </telerik:radlistbox>
        <asp:Button ID="Button1" runat="server" Text="Button" onclick="Button1_Click" />
        <asp:ListBox ID="ListBox1" runat="server"></asp:ListBox>
    
        <llblgenpro:LLBLGenProDataSource2 ID="LLBLGenProDataSource1" runat="server"
            AdapterTypeName="ES.FWPLM.DAL.DatabaseSpecific.DataAccessAdapter, ES.FWPLM.DALDBSpecific"
            DataContainerType="EntityCollection"
            EntityFactoryTypeName="ES.FWPLM.DAL.FactoryClasses.CatalogColorsEntityFactory, ES.FWPLM.DAL">
        </llblgenpro:LLBLGenProDataSource2>
    </div>
    
    </div>
    </form>
</body>
</html>

=====================================================================================================


Code Block:
-------------------------------------------------------------------------------------------------------------------------------------------------------------------

using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
using Telerik.Web.UI;
using System.Web.Script.Serialization;

public partial class Demo : System.Web.UI.Page
{
    public int ColorID { get; set; }
    public string ColorDescription { get; set; }
    public string ColorNumber { get; set; }
 

   
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            RadListBox1.DataBind();

        }
    }


    protected void RadListBox1_Transferred(object sender, RadListBoxTransferredEventArgs e)
    {
      
            foreach (RadListBoxItem item in e.Items)
            {
               item.DataBind();
            }
     
        
    }



    protected void Button1_Click(object sender, EventArgs e)
    {
        ListBox1.Items.Clear();
        for(int i=0;i < RadListBox2.Items.Count; i++)
        {
            ListBox1.Items.Add(RadListBox2.Items[i].Text.ToString() + " - " + RadListBox2.Items[i].Value.ToString());
        }
    }
}


======================================================================================================
please guide me soon...
Jagadish
Top achievements
Rank 1
 asked on 22 Dec 2010
8 answers
161 views
Hi,

http://demos.telerik.com/aspnet-ajax/ajax/examples/manager/dynamicajaxsettings/defaultcs.aspx?product=grid

I saw the above link.

My Reruirement 

Can i make the "Add new  record" Button Disable/Hide  while in the edit mode?


Thanks & Regards
Kannan
Kannan
Top achievements
Rank 1
 answered on 22 Dec 2010
1 answer
60 views
Hi,

i have installed the rad asp.net ajax controls in version 2010.2.826.35 on a SharePoint 2010 web frontend server.
Then i migrated a SharePoint 2007 site running rad asp.net ajax controls in version 2009.1.311.35 to the sharepoint 2010 server. The sharepoint site uses the rad panelbar. I modified the panelbar to use the NavigateUrl property to navigate to websites when clicking on a RadPanelItem.
Unfortunately in 2010 the Bar does not get expanded when clicking on the root RadPanelItem. It only gets collapsed when clicking on the down arrow of the RadPanelItem, but this would be a break in usability. In the 2007 SharePoint site this works without any problem.

I placed the Panelbar in the sharepoint masterpage and didn't run any visual upgrade. So the 2007 masterpages are further in use.

Is there a way to get this running in sharepoint 2010 with 2010.2.826.35?

Kind regards
Gottfried
Simon
Telerik team
 answered on 22 Dec 2010
1 answer
140 views
Hello,

When I bind the RadChart, I get a chart with 10 bars, but the only X-Axis label is "1", while there is a legend that shows the 10 colors for each bar (column name in database table).  I would like to label the X-Axis with the database column names programmatically, and have them correspond to the chart's bars.
    <telerik:RadChart ID="RadChart1" runat="server" DataSourceID="edsGrade">
    </telerik:RadChart>

    <asp:EntityDataSource ID="edsGrade" runat="server" 
        ConnectionString="name=BFEntities" DefaultContainerName="BFEntities" 
        EnableFlattening="False" EntitySetName="Grades" EntityTypeFilter="Grade" 
        AutoGenerateWhereClause="True">
        <WhereParameters>
            <asp:Parameter Name="Grades.GradeID"/>
        </WhereParameters>
    </asp:EntityDataSource>
    <telerik:RadChart ID="RadChart1" runat="server" DataSourceID="edsGrade">
    </telerik:RadChart>

    <asp:EntityDataSource ID="edsGrade" runat="server" 
        ConnectionString="name=BFEntities" DefaultContainerName="BFEntities" 
        EnableFlattening="False" EntitySetName="Grades" EntityTypeFilter="Grade" 
        AutoGenerateWhereClause="True">
        <WhereParameters>
            <asp:Parameter Name="Grades.GradeID"/>
        </WhereParameters>
    </asp:EntityDataSource>
    <telerik:RadChart ID="RadChart1" runat="server" DataSourceID="edsGrade">
    </telerik:RadChart>

    <asp:EntityDataSource ID="edsGrade" runat="server" 
        ConnectionString="name=BFEntities" DefaultContainerName="BFEntities" 
        EnableFlattening="False" EntitySetName="Grades" EntityTypeFilter="Grade" 
        AutoGenerateWhereClause="True">
        <WhereParameters>
            <asp:Parameter Name="Grades.GradeID"/>
        </WhereParameters>
    </asp:EntityDataSource>
    <telerik:RadChart ID="RadChart1" runat="server" DataSourceID="edsGrade">
    </telerik:RadChart>

    <asp:EntityDataSource ID="edsGrade" runat="server" 
        ConnectionString="name=BFEntities" DefaultContainerName="BFEntities" 
        EnableFlattening="False" EntitySetName="Grades" EntityTypeFilter="Grade" 
        AutoGenerateWhereClause="True">
        <WhereParameters>
            <asp:Parameter Name="Grades.GradeID"/>
        </WhereParameters>
    </asp:EntityDataSource>
    <asp:EntityDataSource ID="edsGrade" runat="server" 
        ConnectionString="name=BFEntities" DefaultContainerName="BFEntities" 
        EnableFlattening="False" EntitySetName="Grades" EntityTypeFilter="Grade" 
        AutoGenerateWhereClause="True">
        <WhereParameters>
            <asp:Parameter Name="Grades.GradeID"/>
        </WhereParameters>
    </asp:EntityDataSource>
    <asp:EntityDataSource ID="edsGrade" runat="server" 
        ConnectionString="name=BFEntities" DefaultContainerName="BFEntities" 
        EnableFlattening="False" EntitySetName="Grades" EntityTypeFilter="Grade" 
        AutoGenerateWhereClause="True">
        <WhereParameters>
            <asp:Parameter Name="Grades.GradeID"/>
        </WhereParameters>
    </asp:EntityDataSource>

I did something like this, but all it did was shove all the data from the db, into "Col1" and left "Col2" blank.

                    RadChart1.PlotArea.XAxis.AddItem("Str");
                    RadChart1.PlotArea.XAxis.AddItem("Aero");
                    RadChart1.PlotArea.XAxis.AddItem("Anaero");
                    RadChart1.PlotArea.XAxis.AddItem("Musc");
                    RadChart1.PlotArea.XAxis.AddItem("Cardio");
                    RadChart1.PlotArea.XAxis.AddItem("Power");
                    RadChart1.PlotArea.XAxis.AddItem("Str");
                    RadChart1.PlotArea.XAxis.AddItem("Aero");
                    RadChart1.PlotArea.XAxis.AddItem("Anaero");
                    RadChart1.PlotArea.XAxis.AddItem("Musc");
                    RadChart1.PlotArea.XAxis.AddItem("Cardio");
                    RadChart1.PlotArea.XAxis.AddItem("Power");
    <telerik:RadChart ID="RadChart1" runat="server" DataSourceID="edsGrade">
    </telerik:RadChart>
 
    <asp:EntityDataSource ID="edsGrade" runat="server"
        ConnectionString="name=BFEntities" DefaultContainerName="BFEntities"
        EnableFlattening="False" EntitySetName="Grades" EntityTypeFilter="Grade"
        AutoGenerateWhereClause="True">
        <WhereParameters>
            <asp:Parameter Name="Grades.GradeID"/>
        </WhereParameters>
    </asp:EntityDataSource>
 
...
 
RadChart1.PlotArea.XAxis.AddItem("Col1");
RadChart1.PlotArea.XAxis.AddItem("Col2");


Thanks for Your Assistance
Ves
Telerik team
 answered on 22 Dec 2010
Narrow your results
Selected tags
Tags
+? more
Top users last month
Miljana
Top achievements
Rank 2
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Bronze
Cynthia
Top achievements
Rank 1
John
Top achievements
Rank 1
Iron
Mozart
Top achievements
Rank 1
Iron
Veteran
Want to show your ninja superpower to fellow developers?
Top users last month
Miljana
Top achievements
Rank 2
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Bronze
Cynthia
Top achievements
Rank 1
John
Top achievements
Rank 1
Iron
Mozart
Top achievements
Rank 1
Iron
Veteran
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?