Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
59 views
Goal:
Slider control is displayed without the draghandle. When the user selects an item on the slider the drag handle becomes visible and is positioned on the selected item. 

Problem:
Hiding the draghandle is a piece of cake which is done server side. Because I don't want to postback when the user selects an item on the slider I've used the clientscript object model to watch for events.

Initially I looked for OnClientValueChange to toggle visibility, however this only fires if the selected item is different then the initial value. When the user selected the first item on the slider, the event wasn't fired ;(

So that let me to start using OnClientBeforeValueChange which fires regardless of change, but here's the thing when I call sender.set_showDragHandle(true), effectively displaying the drag handle on the slider control, it moves to the first item in the list and completely ignores the location of selected item...


Any suggestions would be much appreciated,
Elmar

Tsvetie
Telerik team
 answered on 07 Aug 2009
2 answers
115 views
Hi,

I've a radgrid in my application that updates my record in the database by inline rowediting. When i try to update a record that after editing violates a unique contstraint in my Oracle database, the pop-up message "exception has been thrown by the target of an invocation" is shown in the webpage.

Now I like to show my own custom error messages (that the unique constraint is violated), instead of the standard "exception has been..." error message.

Can you please help me with this?

Thanks in advance,
Cheers,
Tim.
Harry
Top achievements
Rank 1
 answered on 07 Aug 2009
3 answers
61 views
Anyone successfully used RadAjaxManagerProxy within a customised SchedulerDefaultForm custom control. I have updated SchedulerDefaultForm to include an asp:dropdown control which is set to AutoPostBack to perform server logic to set appointment start and end time based on predefined settings on the selection changed event. Ideally I would like to perform a callback instead of a postback and therefore attempted to make use of the RadAjaxManagerProxy control, however I get the following error when the callabck responds:-

The Controls collection cannot be modified because the control contains code blocks (i.e. <% ... %>).

Hope someone can help me out.

Jeeten
Veselin Vasilev
Telerik team
 answered on 07 Aug 2009
1 answer
102 views
I automatically set radgrid into Insert mode using IsItemInserted = true on entering a page and then, using the ItemDataBound event, I populate GridDataItemInsert fields from Session. This works well however, when the grid is rendered it displays the fields as labels (not editable) together with the Insert and Cancel buttons. This is not the behaviour I desire, I need the row to be in Edit mode to allow the user to override the values and then select "Insert"

Additionally, I have used the InitInsertCommandName in the ItemCommand event which gives the required edit row behaviour but this requires the user to select a header "Add New item" button which I want to avoid.

How can I get the successfully added GridDataItemInsert to be displayed in Edit mode please?

Brian


Mira
Telerik team
 answered on 07 Aug 2009
1 answer
133 views
I'm working on a page with an AJAX Control Toolkit TabContainer control.  I'm trying to ajaxify the control with RadAjaxManager.  I put together a scaled down version for testing purposes:

<telerik:RadScriptManager ID="RadScriptManager1" runat="server" /> 
<div> 
    <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server"
    </telerik:RadAjaxManager> 
    <ajaxToolkit:TabContainer ID="TabContainer1" runat="server" Width="500px" ActiveTabIndex="1"
        <ajaxToolkit:TabPanel ID="tpPanel1" HeaderText="Panel1" runat="server"
            <ContentTemplate> 
                <asp:Label ID="lblPanel1" Text="this is the first panel" runat="server" /> 
            </ContentTemplate> 
        </ajaxToolkit:TabPanel> 
        <ajaxToolkit:TabPanel ID="tpPanel2" HeaderText="Panel2" runat="server"
            <ContentTemplate> 
                <asp:TextBox ID="txtPanel2" Text="panel2" runat="server" /> 
            </ContentTemplate> 
        </ajaxToolkit:TabPanel> 
    </ajaxToolkit:TabContainer> 
</div> 



When pulling up the RadAjaxManager wizard panel I noticed that some of the controls within the TabPanels aren't accessible to select as an Ajax trigger.  If you can recreate what I have with the code above all I can see is the txtPanel2 control. 

Am I doing something wrong?  Is it okay to just code it in without the wizard?  I'm trying to do that and I'm having some troubles.
Pavel
Telerik team
 answered on 07 Aug 2009
1 answer
162 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
103 views
Hello

which skin included in the release is the litest?
Sebastian
Telerik team
 answered on 07 Aug 2009
1 answer
47 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
111 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
133 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
Narrow your results
Selected tags
Tags
+? more
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?