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?
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!
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)); } }
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,
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
C:\Program Files\Telerik\RadControls for ASP.NET AJAX Q3 2010\Bin40\Telerik.Web.UI.dllC:\Program Files (x86)\Telerik\RadControls for ASP.NET AJAX Q3 2010\Bin40\Telerik.Web.UI.dllI 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(
"<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(
">");
RenderContents(writer);
writer.Write(
"</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'.
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>