Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
147 views
I have clickable nodes in my treeview. I am adding a custom class to them, but I cannot get this to show up. I have tried a wide variety of settings in CSS. The class I am adding is called rednode. Here is what the node looks like in the page source:

<li class="rtLI"><div class="rtMid">


<
span class="rtSp"></span><input type="checkbox" class="rtChk" /><img src="images/page_white_text.png" alt="" class="rtImg" /><a class="rtIn rednode" href="javascript:setValue('10003')">Great Deals</a>


</
div></li>



Could you please tell me what to do in my style sheet so that this node is colored red?? The sample on your site does not use a linked node.

Michael
Shinu
Top achievements
Rank 2
 answered on 21 Dec 2009
3 answers
210 views
I'm looking for a javascript logic that I can use to detect if the page is in a RadWindow or not.  The main reason is that I need to call the radWindow.close() when inside a RadWindow or self.close() when in just a regular browser window.  How best to handle this?

Also,  keep in mind that the parent page that launched the window may not have any Telerik content.  We have an application that has two modes:   Normal (with Telerik Controls) and 508 (which does not have any Telerik controls).

Randy
Georgi Tunev
Telerik team
 answered on 21 Dec 2009
2 answers
172 views
Hi,

I like the functionality provided by a pair of listboxes set up as a source and target. What I don't like is to have to declare them separately, databind and ultimately looping through the items in the target listbox to get a list of selected values. I have therefore tried to wrap all of this in a server control. The constructor takes a name, an IEnumerable list as datasource and the names of the text and value properties. It also provides a "GetSelectedItems()" method that returns the selected values as a CSV string (which is what I need). When I instantiate this server control it looks and appears to function as expected.

Now to the problem: when the page posts back the target listbox is empty. The items added clientside disappears. Clearly, this is not supposed to happen, so I must have done something wrong. I enclose the code for my server control below. Any pointers will be greatly appreciated.

Sincerely,
Lasse

namespace Company.PDC.WebParts  
{  
    using System;  
    using System.Collections;  
    using System.ComponentModel;  
    using System.Web.UI;  
    using System.Web.UI.WebControls;  
    using Telerik.Web.UI;  
 
    [ToolboxData("<{0}:SearchListBox runat=server></{0}:SearchListBox>")]  
    public class SearchListBox : WebControl  
    {
        #region Attributes  
 
        private Table listBoxTable;  
        private RadListBox source;  
        private RadListBox target;  
        private string separator = ";";  
        private string anyElement = "- Any -";  
        private int height = 200;  
        private int width = 200;
        #endregion  
 
        #region Constructors  
 
        public SearchListBox(string controlName, IEnumerable dataSource, string textField, string valueField)  
        {  
            this.ID = controlName;  
            this.source = new RadListBox();  
            this.target = new RadListBox();  
            this.EnableViewState = true;  
            this.source.EnableViewState = true;  
            this.target.EnableViewState = true;  
            this.LoadData(dataSource, textField, valueField);  
        }
        #endregion  
 
        #region Properties  
 
        public string Separator  
        {  
            get 
            {  
                return this.separator;  
            }  
 
            set 
            {  
                this.separator = value;  
            }  
        }  
 
        public string AnyElement  
        {  
            get 
            {  
                return this.anyElement;  
            }  
 
            set 
            {  
                this.anyElement = value;  
            }  
        }  
 
        public new int Height  
        {  
            get 
            {  
                return this.height;  
            }  
 
            set 
            {  
                this.height = value;  
            }  
        }  
 
        public new int Width  
        {  
            get 
            {  
                return this.width;  
            }  
 
            set 
            {  
                this.width = value;  
            }  
        }  
 
        public bool IsEmpty  
        {  
            get 
            {  
                return this.target.Items.Count.Equals(0);  
            }  
        }
        #endregion  
 
        #region Public Methods  
 
        /// <summary>  
        /// Retrieves a list of selected items.  
        /// </summary>  
        /// <returns>  
        /// A separator delimited string of selected values.  
        /// </returns>  
        public string GetSelectedValues()  
        {  
            string values = string.Empty;  
            foreach (RadListBoxItem item in this.target.Items)  
            {  
                values += item.Value + this.Separator;  
            }  
 
            return values;  
        }
        #endregion  
 
        #region Override Methods  
 
        protected override void CreateChildControls()  
        {  
            base.CreateChildControls();  
 
            this.DefineListBoxes();  
            this.Controls.Add(this.listBoxTable);  
        }  
 
        protected override void RenderContents(HtmlTextWriter output)  
        {  
            this.source.RenderControl(output);  
            this.target.RenderControl(output);  
        }
        #endregion  
 
        #region Private Support Methods  
 
        private void LoadData(IEnumerable dataSource, string textField, string valueField)  
        {  
            this.source.DataSource = dataSource;  
            this.source.DataTextField = textField;  
            this.source.DataValueField = valueField;  
            this.source.DataBind();  
        }  
 
        private void DefineListBoxes()  
        {  
            this.source.Height = this.Height;  
            this.source.Width = this.Width;  
            this.target.Height = this.Height;  
            this.target.Width = this.Width - 35;  
            this.target.ID = this.ID + "target";  
            this.source.ID = this.ID + "source";  
            this.source.AllowTransfer = true;  
            this.source.AllowTransferDuplicates = false;  
            this.source.TransferMode = ListBoxTransferMode.Copy;  
            this.source.TransferToID = this.target.ID;  
 
            this.listBoxTable = new Table();  
            TableRow row = new TableRow();  
            TableCell cellSource = new TableCell();  
            TableCell cellTarget = new TableCell();  
            cellSource.Controls.Add(this.source);  
            cellTarget.Controls.Add(this.target);  
            row.Cells.Add(cellSource);  
            row.Cells.Add(cellTarget);  
            this.listBoxTable.Rows.Add(row);  
        }
        #endregion  
    }  
}  
 
Lasse Schioettz
Top achievements
Rank 1
 answered on 21 Dec 2009
3 answers
210 views
Hi,
This is my first post. I saw a similar post but it didnt really solve my issues. I actually uninstalled and re-installed VB2008 and all the controls in my project started showing me this error: Error Rendering control. An Unhandled Exception Has Occurred.Could not load file or assembly 'Telerik.Web.UI, Version = 2009.3.1103.35...Or One of its dependencies. The System Cannot find the file specified.

I will be very grateful if someone can suggest a solution quickly.

Regards,

Charles
Erjan Gavalji
Telerik team
 answered on 21 Dec 2009
3 answers
145 views
Hi

I am looking for a sample of how to code a Grid with 2 way binding with a dataset as datasource? And also :what is a Telerik alternative for using a ms asp.net DetailsView/FormView control to handle one record?

thanks

D


Princy
Top achievements
Rank 2
 answered on 21 Dec 2009
1 answer
190 views
Hi there,

I try to reference my radcombobox on code behind but it dosen't work and told me that it's null !!

Here my code,

Binding !!!

 

RadComboBox cbF1 = new RadComboBox();

 

cbF1.ID =

"cbF1";

 

 

cbF1.Style[

"Position"] = "Absolute"; cbF1.Style["Top"] = "180px"; cbF1.Style["Left"] = "180px"; cbF1.Width = 120;

 

 

cbF1.Skin =

"Simple";

 

 

 

cbF1.DataSource = ds.Tables[0]; cbF1.DataTextField =

"FTFIELDNAME"; cbF1.DataValueField = "FTTABLENAME"; cbF1.DataBind();

It's shown Correctly !! It's work !!
But when I wanna shake it out to get the value ...

 

 

 

RadComboBox 

 

rcbF = Panel2.FindControl("cbF1") as RadComboBox;

Show me !!
"rcbF = null"

Anyone please help me !!

Thannapan. 

 

 

 

 

 

 

 

Shinu
Top achievements
Rank 2
 answered on 21 Dec 2009
2 answers
201 views
THis might be an odd question.  I have a grid that I want to hide the Active column on the grid.  The grid has editmode of InPlace.  When the user either adds new or edits the record I want to display more columns.  Is this possible?
Princy
Top achievements
Rank 2
 answered on 21 Dec 2009
1 answer
82 views
Hi all-
Downloaded the free trial verison of the Telerik ASp.NET AJAX controls. I was looking at Menu and wanted to build a navigation menu similar to what we see on home page for Telerik when you click PRODUCTS. There is a drop down and a fly out menu looks like a panel with divider(s). Is that available to us?
Thanks
sitefinitysteve
Top achievements
Rank 2
Iron
Iron
Veteran
 answered on 21 Dec 2009
2 answers
115 views
Hi There,

I have a square matrix of size 64. When I try to edit values appears the error message attached. Is there a limitation of columns for editing in RadGrid ?
I'm using the new Q3 2009.

Thanks.

Marcio Nascimento
Marcio Nascimento
Top achievements
Rank 1
 answered on 21 Dec 2009
2 answers
99 views
Hi There,

I have a square matrix of size 64 on RadGrid. When I try to edit values appears the error message attached. Is there a limitation of columns for editing in RadGrid ?
I'm using the new Q3 2009.

Thanks.

Marcio Nascimento
Marcio Nascimento
Top achievements
Rank 1
 answered on 21 Dec 2009
Narrow your results
Selected tags
Tags
+? more
Top users last month
Tien
Top achievements
Rank 1
Iron
Krasimir
Top achievements
Rank 3
Bronze
Iron
Iron
Cedar
Top achievements
Rank 1
Iron
Emil
Top achievements
Rank 1
Iron
Kyle Watson
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Tien
Top achievements
Rank 1
Iron
Krasimir
Top achievements
Rank 3
Bronze
Iron
Iron
Cedar
Top achievements
Rank 1
Iron
Emil
Top achievements
Rank 1
Iron
Kyle Watson
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?