Telerik Forums
UI for ASP.NET AJAX Forum
4 answers
170 views

Hello,
When using a RadComboBox with AllowCustomText 'true' the combobox exhibits some _very_ annoying behaviour. Every time you click into the control it automatically selects the entire contents, and it is then very difficult to unselect.

This makes is very hard to do many things, including:
 
a) adding multiple items simply - aka by repeatedly selecting items from the completion list and having them appended to the combobox text
b) add a custom entry manually
c) edit an entry
d) manually insert an entry between existing entries
e) select an entry from the completion list to be inserted between existing entries
f) etc

Does anybody know a solution to this problem? How do I stop the auto-selection of content every time this control is selected?

 

Mattias
Top achievements
Rank 1
 answered on 06 Dec 2010
1 answer
63 views

Hi,

Last week you helped me with the RadEditor in RadWindow example code. Now, to open the RadWindow the following javascript is used:

$find("<%=DialogWindow.ClientID%>").show();

When I normally open a RadWindow use the openRadWindow command. With this command I can pass a query string:

openRadWindow("Dialog.aspx?iid=" + iid, "DialogWindow);

My question is how can I add a query string to the .show() method of displaying the window? The reason for the question is that with the openRadWindow the content of the parent editor is not passed to the child editor.

Thanks,

Steve Holdorf

Note: the reason I need to pass the querystring on displaying the radwindow is because the application's patient ID is maintained in the applications querystring passed to every page and window. 

OK Last note: I might be wrong about the showing of the radwindow blowing out the parent page's query string. All I know is that when we try to retrieve it session object using the querystring the session object is not found.

Thanks again!

Steve Holdorf
Top achievements
Rank 1
 answered on 06 Dec 2010
4 answers
302 views
Hello,

I have a radgrid with a itemcommand who check the selected value. It was working until I move the page inside a content page. Now, the selected value is always nothing. Is there something I must do for it to work in a content page.

Thanks !

Keven
Keven
Top achievements
Rank 1
 answered on 06 Dec 2010
1 answer
76 views
Hi, I'm tryinng to use the scheduler to set appointments. but, I need that serveral people with different login id's create appointments, but one can only modify his/her own appointments. the other appointment should look with a different color, indicating that it is already taken by somebody else.

How can I achieve this?

thanks,
Julio
Veronica
Telerik team
 answered on 06 Dec 2010
1 answer
101 views
private void LoadRootNodes(RadTreeView treeView)
    {
        const string sql = "Select Name, ItemID from TNodes where ParentID IS NULL ";
        SqlConnection dbCon = new SqlConnection("Data Source=localhost;Initial Catalog=Telerik;user id=sa; password=knowdev");
        SqlDataAdapter adapter = new SqlDataAdapter(sql, dbCon);
        DataTable dataTable = new DataTable();
        adapter.Fill(dataTable);
        RadTreeNode node = new RadTreeNode();
  
  
  
          
        foreach (DataRow row in dataTable.Rows)
        {
            //RadTreeViewContextMenu contextmenu1 = new RadTreeViewContextMenu();
            //contextmenu1.ID = row["Name"].ToString();
  
            //RadTreeView2.ContextMenus.Add(contextmenu1);
  
            //contextmenu1.Items.Add(new RadMenuItem(row["Name"].ToString()));
  
  
            node.Text = row["Name"].ToString();
  
            node.Value = row["ItemID"].ToString();
  
            node.ExpandMode = TreeNodeExpandMode.ServerSideCallBack;
            RadTreeView2.Nodes.Add(node);
            
  
        }
  
        foreach (RadTreeNode nd in RadTreeView2.GetAllNodes())
        {
  
            RadTreeViewContextMenu contextmenu2 = new RadTreeViewContextMenu();
            contextmenu2.ID = nd.Text;
  
            RadTreeView2.ContextMenus.Add(contextmenu2);
            nd.ContextMenuID = contextmenu2.ID;
  
            contextmenu2.Items.Add(new RadMenuItem(nd.Text));
  
  
        }
}
  
  
  
//ON Expand
  
 protected void RadTreeView2_NodeExpand(object sender, RadTreeNodeEventArgs e)
    {
  
        const string sql =
           @"
               SELECT TNodes.ItemID AS NodeId, TNodes.Name AS NodeText, COUNT(Children.ItemID) AS ChildCount
               FROM TNodes LEFT JOIN TNodes As Children
               ON TNodes.ItemID = Children.ParentId
               WHERE TNodes.ParentId = @parentId
               GROUP BY TNodes.ItemID, TNodes.Name
           ";
        SqlConnection dbCon = new SqlConnection("Data Source=localhost;Initial Catalog=Telerik;user id=sa; password=knowdev");
        SqlDataAdapter adapter = new SqlDataAdapter(sql, dbCon);
        adapter.SelectCommand.Parameters.AddWithValue("parentId", e.Node.Value);
        DataTable dataTable = new DataTable();
        adapter.Fill(dataTable);
       
        foreach (DataRow row in dataTable.Rows)
        {
            RadTreeNode node = new RadTreeNode();
            node.Text = row["NodeText"].ToString();
            node.Value = row["NodeId"].ToString();
            
          
            if (Convert.ToInt32(row["ChildCount"]) > 0)
            {
                node.ExpandMode = TreeNodeExpandMode.ServerSideCallBack;
            }
  
  
            if (!(e.Node.TreeView.ContextMenus[0].ID == "test"))
            {
                e.Node.TreeView.ContextMenus[0].Items[0].Text = "test";
                e.Node.TreeView.ContextMenus[0].Items[0].Value = "1";
  
            }
               
  
            e.Node.Nodes.Add(node);
            
              
        }
        e.Node.Expanded = true;
        //e.Node.ExpandMode = TreeNodeExpandMode.ClientSide;
        foreach (RadTreeNode nd in e.Node.GetAllNodes())
        {
            RadTreeViewContextMenu contextmenu = new RadTreeViewContextMenu();
            contextmenu.ID = nd.Text;
  
            RadTreeView2.ContextMenus.Add(contextmenu);
            nd.ContextMenuID = contextmenu.ID;
  
            contextmenu.Items.Add(new RadMenuItem(nd.Text));
  
        }
        
  
    }


Hi,

I am using RadTreeview context menu items. Issue is that after node expand context menu does not show. In above mentioned code on page load

 

 

if(!IsPostBack)

 

LoadRootNodes(RadTreeView2);
LoadRootNodes() functioned is called at that time context menu show properly. but when I expand the node it does not show.
Code is mentioned above. Please suggest.

Thanks,

Dimitar Terziev
Telerik team
 answered on 06 Dec 2010
1 answer
98 views

Guys,

I’m experimenting with rotator control, new CoverFlow functionality to be exact. I like it but there is one thing that I cannot figure out how to do. Basically I’m trying to make images progressively smaller. So selected images is the biggest, then the image on the right and on the left a bit smaller, then images behind those are smaller….  Is possible to something like this? I see that you have a transformation minScale but it’s static and only applied to a first level. I guess I’m asking if its possible to do the same thing that you do with carousel (making images progressively smaller) with CoverFlow

Thank you

Orest

Tsvetie
Telerik team
 answered on 06 Dec 2010
1 answer
1.0K+ views
At the moment, we reference Telerik.Web.UI.dll by browsing to the appropriate folder and adding the dll, so in the "Path" property of the Telerik.Web.UI reference Properties in VS we get something like:

C:\Program Files\Telerik\RadControls for ASP.NET AJAX Q3 
2010\Bin40\Telerik.Web.UI.dll

Now, we are using Team Foundation Server 2010 and it goes off and looks for Telerik.Web.UI but TFS is installed on 64-bit so the installation folder the dll will end up in is:

C:\Program Files (x86)\Telerik\RadControls for ASP.NET AJAX Q3 
2010\Bin40\Telerik.Web.UI.dll

Clearly, that's not going to work! My question is, what is the best practice method of referencing the many controls Telerik offer? If the answer can be in the scope of automated builds on TFS 2010, that would be really awesome but I'm interested regardless on what you do.

(Note: I've read that many developers create a folder in their solution and add / reference the DLLs from there. I reckon that would work but something about it doesn't gel with me. Not sure why, maybe lots of solutions having lots of copies of the DLLs).

Best,
Richard
Mira
Telerik team
 answered on 06 Dec 2010
1 answer
104 views

I have a website project and want to put a hyperlink on the web page. To do this, I created a custom namespace in Default.aspx.cs. I got errors when building the solution. Is

the namespace code in the wrong place ? or do I need to create an assembly for it to fix the errors ? What am I missing ?
Here is the namespace, other details and errors:

In Default.aspx page I put 
<%@ Register TagPrefix="study1wc" Namespace="study1.webcontrols" %>
<study1wc:popupWindow NavigateUrl="http://www.google.com" runat="server" ID="test">testing</study1wc:popupWindow>




In Default.aspx.cs page I put
namespace
study1.webcontrols { public class popupWindow : HyperLink {etc... }

 

protected override void Render(HtmlTextWriter writer)

 

{

 

HyperLink link = this;

 

writer.Write(

"&lt;a");

 

 

 

if (!string.IsNullOrEmpty(link.NavigateUrl))

 

writer.WriteAttribute(

"href", "#");

 

 

if (!string.IsNullOrEmpty(link.CssClass))

 

writer.WriteAttribute(

"class", link.CssClass);

 

 

if (_intWindowHeight <= 0 || _intWindowWidth <= 0)

 

{writer.WriteAttribute(

"onclick", "window.open('" + link.NavigateUrl + "');return false;");}

 

 

else

 

{writer.WriteAttribute(

"onclick", "window.open('" + link.NavigateUrl + "','"+ _strPopupTitle +"','width="+ _intWindowWidth +",height="+ _intWindowWidth +"');return false;");}

 

 

foreach (string key in link.Attributes.Keys)

 

{writer.WriteAttribute(key, link.Attributes[key]);}

writer.Write(

"&gt;");

 

RenderContents(writer);

 

writer.Write(

"&lt;/a>");

 

 

}

 

protected override void RenderContents(HtmlTextWriter output)

 

{output.Write(Text);}

}

}
[Note: there is a RadGrid and RadComboBoxes defined after the custom namespace]




Errors when I Build Solution:
Default.aspx - Warning  Element 'popupWindow' is not a known element. This can occur if there is a compilation error in the Web site, or the web.config file is missing. 
Default.aspx - Error   Unknown server tag 'study1:popupWindow'. 

Mira
Telerik team
 answered on 06 Dec 2010
1 answer
103 views
Folks,

I am using RAD Control from ASP.Net Ajax Q3 2010 with Vstudio 2008 SP1.

In my project, I am using similar to Window / Using the URL for Server Arguments.

I would like to see depending on the value of Country, the HREF image should show approprite Image file. For example after Grid Databound,  if the the Databound column Country value  = "France" then for that row my Href column image src be = "Images/FranceData.png". if the Databound column Country value  = "Germany" then for that row  my Href column image src be ="Images/GermanyData.png".

Ofcourse in my Images folder both FranceData.png and GermanyData.png  exists. Below is my Gridview declarations.

Thanks

GC_0620

<asp:GridView ID="GridView1" AutoGenerateColumns="False" DataSourceID="SqlDataSource1"
CellPadding="0" GridLines="None" CellSpacing="0" runat="server" CssClass="RadGridLike">
<HeaderStyle CssClass="GridHeader"></HeaderStyle>
<Columns>
<asp:BoundField DataField="CompanyName" HeaderText="Company Name" />
<asp:BoundField DataField="Country" HeaderText="Country" />
  
<asp:TemplateField HeaderText="Details">
<ItemTemplate>
  
<a href="#" onclick="openRadWindow('<%#DataBinder.Eval(Container.DataItem,"CustomerID")%>'); return false;">
<img style="border:0px;vertical-align:middle;" alt="" src="Images/FranceData.png" /></a
  
</ItemTemplate>
</asp:TemplateField>
</Columns>
</asp:GridView>
<asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:NorthwindConnectionString %>"
ProviderName="System.Data.SqlClient" SelectCommand="SELECT TOP 10 [CompanyName], [CustomerID], [ContactName], [Country] FROM [Customers]">
</asp:SqlDataSource>
Marin
Telerik team
 answered on 06 Dec 2010
2 answers
118 views
I'm using a RadMenu verticaly and I would like to adjust its width to a specify size, I also would like to adjust the quantity of text lines in each item... the menu is filled dinamically by code??? Wich properties do I have to adjust?
Matias
Top achievements
Rank 1
 answered on 06 Dec 2010
Narrow your results
Selected tags
Tags
+? more
Top users last month
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?