Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
173 views
I've created a custom implementation of the RadComboBox control and I'm having problems after postback. Seems the ItemTemplate is lost after the page posts back and the ItemText is what shows in the list instead of the ItemDescription I've specified. Here's my code:

//I do not want to reload data after postback so I check to see if items have already been loaded
    if (MyCustomComboBox.Items.Count < 1)
    {
            MyCustomComboBox.DataTextField = "ItemText";
            MyCustomComboBox.DataValueField = "ItemValue";
            MyCustomComboBox.DataListField = "ItemDescription";
            MyCustomComboBox.DataSource = CEarn.GetECodeList();
            MyCustomComboBox.DataBind();

            MyCustomComboBox.Items.Insert(0, new RadComboBoxItem("Select One...", String.Empty));
    }



using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Text;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Telerik.Web.UI;
using System.Web.UI.HtmlControls;

namespace CustomWebControls
{
    [DefaultProperty("Text")]
    [ToolboxData("<{0}:CustomComboBox runat=server></{0}:CustomComboBox>")]
    public class CustomComboBox : RadComboBox
    {
        #region Members
        private string _dataListField = String.Empty;

        #endregion

        #region Properties
        /// <summary>
        /// Specifies field to use for dropdown list items
        /// </summary>
        public string DataListField
        {
            get
            {
                return _dataListField;
            }
            set
            {
                _dataListField = value;
                this.ItemTemplate = new ItemTemplate(_dataListField);
            }
        }

        #endregion

    }

    /// <summary>
    /// Creates ItemTemplate control inside combobox and binds with specified field data
    /// </summary>
    public class ItemTemplate : ITemplate
    {
        #region Members
        private string _dataListField = String.Empty;
        #endregion

        #region Properties
        /// <summary>
        /// Specifies field to use for dropdown list items
        /// </summary>
        public string DataListField
        {
            get
            {
                return _dataListField;
            }
            set
            {
                _dataListField = value;
            }
        }
        #endregion

        #region Methods
        public ItemTemplate() { }

        public ItemTemplate(string dataListField)
        {
            this.DataListField = dataListField;
        }

        public void InstantiateIn(Control container)
        {
            HtmlTable table = new HtmlTable();
            HtmlTableRow row = new HtmlTableRow();

            HtmlTableCell ComboBoxCell = new HtmlTableCell();
            ComboBoxCell.DataBinding += new EventHandler(ComboBoxCell_DataBinding);
            row.Controls.Add(ComboBoxCell);

            table.Controls.Add(row);
            container.Controls.Add(table);
        }
        #endregion

        #region Events
        private void ComboBoxCell_DataBinding(object sender, EventArgs e)
        {
            try
            {
                HtmlTableCell target = (HtmlTableCell)sender;
                RadComboBoxItem item = (RadComboBoxItem)target.BindingContainer;                
                string itemText = (string)DataBinder.Eval(item.DataItem, DataListField);
                target.InnerText = itemText;                
            }
            catch
            {
                throw new InvalidOperationException("When using CustomComboBox, you must specify a value for the DataListField property.");
            }
        }
        #endregion
    }

}

T. Tsonev
Telerik team
 answered on 07 Aug 2009
1 answer
110 views
Hello

which skin included in the release is the litest?
Sebastian
Telerik team
 answered on 07 Aug 2009
1 answer
50 views
Hi. Using

I utilize the telerik demos as a "proof of functionality / configuration" much of the time.  I know if I my code does not work, yet I can pull up a telerik demo that utilizes pretty much the same code, then the error is on my config end.

However, I discovered today that IE8 cannot utilize the in-line editing found at

http://demos.telerik.com/aspnet-ajax/grid/examples/dataediting/editondblclick/defaultvb.aspx



The grid is basically "dead" and can't even utilize the raddropdown - which is an issue I'm having with a SEPARATE project on certain machines with IE7- but I thought for sure it was my config.

The IE8 version is 8.0.6001.18702 and I am on XPSP2

Any suggestions ? Has this demo been vetted against IE8?  Will my RADcontrols function against IE8? I'm including the meta tag to force IE8 into IE7 compatibility mode, but I am still having the "javascript death" issues.

Thanks!!
Sebastian
Telerik team
 answered on 07 Aug 2009
1 answer
116 views
We are having major issues with the Rad Editor. Opera 9.64 (PC/Mac), doesnt render the editor itself correctly, therefore you cannot even type into the box. Firefox 2.0.0.16 has issues rendering the rad toolbar. Safari 3.1.2 uses completed different markup than FF and IE. Even when I specify a new line type it (Safari) still uses "div" tags.

Are there known issues with these browsers? Do i have to do something special to get them to work?
Tervel
Telerik team
 answered on 07 Aug 2009
2 answers
137 views
I was looking for a way to adjust the format of the radcontrol.  In the radcontrol, I want to have different tests with different questions.  Each test ranges from 10-20 questions.  20 questions across is too much to display in a radgrid, so I was wondering if I could display the questions on top of each other as opposed to side by side.  Is this possible?
Shinu
Top achievements
Rank 2
 answered on 07 Aug 2009
2 answers
124 views
Hi,

I'm using RadEditor in a Windows SharePoint Services custom column (I don't use RadEditorMoss, but the RadEditor 2008_Q3 for Ajax ASP.Net ... simply because I had to activate some features depending on WSS rights, which isn't possible with RadEditorMoss).

I saw that topic : http://www.telerik.com/community/forums/aspnet-ajax/editor/why-does-toggle-full-screen-take-so-long-in-ie-7.aspx

I tested today the online demo and my implementation of the RadEditor. I got :

- something like 5s in the live-demo. that's acceptable.
- something like 30s in my implementation in WSS in IE7
- something like 10s in my implementation in WSS in FF3

I saw in the topic reported below that this issue was pinned, and may be improved in 2009. Has this feature been improved in the last release ? If not, how can I improve my use of the RadEditor in WSS ? Did you do something special for the RadEditorMoss ?

Thanks in advance for you answer.
Tervel
Telerik team
 answered on 07 Aug 2009
1 answer
151 views
Hello,

My functionality is Before selection start i want to insert one symbol & after selection end also want to insert one symbol. for that purpose i want the exact position of selection start & selection end.


Thanks,
Atul Deshmukh


Tervel
Telerik team
 answered on 07 Aug 2009
3 answers
148 views
My question is how do you prevent wrapping of items in the grid. When the grid has lots of columns it causes the icons to wrap.
See http://www.creditbootcamp.com/grid_tools.png

We tried:   
<rad:GridTemplateColumn UniqueName="Tools" HeaderText="Tools" ItemStyle-Width="150">
But it did not work. Putting the icons in a table did work but caused borders to show up around the table (which we dont want).

We want the icons to stay on the same line and not to page break.


Thanks guys!!

Dimo
Telerik team
 answered on 07 Aug 2009
1 answer
138 views
I want to get the date range of a week from a client side RowHeaderClick event (so that I can send it in a web services call).

I can get the week number from the inner text of the dom element (see below).

I can see several ways to turn the week number into a date:

1. If I get the <td> cell that is the first "next sibling", is there a way to determine the date triplet (in which case I wouldn't even need the week number)?

2. Is there a way to get the first date triplet or the first week number being displayed in a multi-view calendar?

...
function OvernightCalendar_OnRowHeaderClick(calendarInstance, args)
{
  // don't select, we're just using the click to style the week

  args.set_cancel(true);

  // Get the dom element
  var e = args.get_domElement();

  // The inner text holds the week number
  var weekNumber = e.innerText;
  Sys.Debug.trace('Week Number: ' + weekNumber);
  
  // walk the td cells from the row, styling each cell
  var e = e.nextSibling;
  while (e != null) {
    styleCell(e);
    e = e.nextSibling;
  }
}
Dimo
Telerik team
 answered on 07 Aug 2009
1 answer
105 views
Hi. I've got a RadTabStrip with a few RadMultiPages. In IE7 if I set the following style the vertical scroll bars appear on page load but when I click on to another tab then back on to the first tab the scroll bars aren't there. If I click onto another tab then back onto the first tab again the scroll bars are there. If I repeat the same process over the same behavior occurs.

overflow-y: auto !important; overflow-x: hidden !important; 

It checks out okay in IE6, IE8 and FF3.

Daniel
Kamen Bundev
Telerik team
 answered on 07 Aug 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?