Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
126 views
Hi I am trying to run the example shown here:

http://demos.telerik.com/aspnet-ajax/combobox/examples/functionality/multicolumncombo/defaultcs.aspx

I get the following error on this line:  public partial class DefaultCS : System.Web.UI.Page

Error 1 Make sure that the class defined in this code file matches the 'inherits' attribute, and that it extends the correct base class (e.g. Page or UserControl). D:\...\RadControlsWebSite1\RadControlsWebSite1\DefaultCS.aspx.cs 12 33 D:\...\RadControlsWebSite1\

CS
namespace Telerik.ComboboxExamplesCS.MultiColumnCombo
{
    public partial class DefaultCS : System.Web.UI.Page
    {

Should I be changing something else? I am pretty sure I followed all of the isolation steps.


Thanks
Najid Hanif
Top achievements
Rank 2
 answered on 21 Jul 2011
3 answers
138 views
Hi,

I found some samples about RadFilterDropDownEditor like:
public class RadFilterDropDownEditor : RadFilterDataFieldEditor
{
    protected override void CopySettings(RadFilterDataFieldEditor baseEditor)
    {
        base.CopySettings(baseEditor);
        var editor = baseEditor as RadFilterDropDownEditor;
        if (editor != null)
        {
            DataSourceID = editor.DataSourceID;
            DataTextField = editor.DataTextField;
            DataValueField = editor.DataValueField;
        }
    }
 
    public override System.Collections.ArrayList ExtractValues()
    {
        ArrayList list = new ArrayList();
        list.Add(_combo.SelectedValue);
        return list;
    }
 
    public override void InitializeEditor(System.Web.UI.Control container)
    {
        _combo = new RadComboBox();
 
        _combo.DataTextField = DataTextField;
        _combo.DataValueField = DataValueField;
        _combo.DataSourceID = DataSourceID;
 
        container.Controls.Add(_combo);
    }
 
 
    public override void SetEditorValues(System.Collections.ArrayList values)
    {
        if (values != null && values.Count > 0)
        {
            if (values[0] == null)
                return;
            var item = _combo.FindItemByValue(values[0].ToString());
            if (item != null)
                item.Selected = true;
        }
    }
 
    public string DataTextField
    {
        get
        {
            return (string)ViewState["DataTextField"] ?? string.Empty;
        }
        set
        {
            ViewState["DataTextField"] = value;
        }
    }
    public string DataValueField
    {
        get
        {
            return (string)ViewState["DataValueField"] ?? string.Empty;
        }
        set
        {
            ViewState["DataValueField"] = value;
        }
    }
    public string DataSourceID
    {
        get
        {
            return (string)ViewState["DataSourceID"] ?? string.Empty;
        }
        set
        {
            ViewState["DataSourceID"] = value;
        }
    }
    private RadComboBox _combo;
}

But I faced 2 problems.
1-When I try to set its DataType to System.Int32, I receive "Input string was not in a correct format." error. But when I set it to System.String it works. (the result is = '1' -within single quotas- as expected as it is set to be string). I have checked DataTextField and DataValueField properties and they are referencing to proper fields and datatypes.

2-When I set its value from combobox and add another condition/expression it looses it value and select first value of the combobox.

Any thoughts?

Thanks in advance.
Raji
Top achievements
Rank 1
 answered on 21 Jul 2011
0 answers
105 views
Hi:

I am getting:
  Microsoft JScript runtime error: 'onLoadAmount' is undefined
error. 
<telerik:RadNumericTextBox ID="overAmountTextBox" Runat="server" MaxLength="13"
    MaxValue="999999.999999" MinValue="-999999.999999" Text='<%# Bind("overAmount") %>'
    TabIndex="7">
    <ClientEvents OnLoad="onLoadAmount" />
    <FocusedStyle HorizontalAlign="Right" />
    <EnabledStyle HorizontalAlign="Right" />
    <NumberFormat DecimalDigits="4" />
</telerik:RadNumericTextBox>
 
<script type="text/javascript">
    //<![CDATA[
    //
    function onLoadAmount(sender, args) {
        alert('Amount');
    }
    //]]>
</script>
The RadNumericTextBox is in a FormView control, when I get the error.  If I extract the code and place it on a simple page it finds the on load event.

Phil
Phil
Top achievements
Rank 2
 asked on 21 Jul 2011
9 answers
137 views

Hi,

Is there a way to detect a double-click on the title icon on the left side? Our users are expecting to close the window by double clicking on it as they would do in a Windows application.

 Thanks.

LeBear
Top achievements
Rank 1
 answered on 21 Jul 2011
3 answers
325 views
Dear,
I create header template and footer template(contain table inside)
Then I set AllowScroll = true
If I set UseStaticHeader = false .All Column align ok
But if I set UseStaticHeader = true.It align wrong .Width of Item larger width if header.
Problem just occur when I set UseStaticHeader =true .
Because All width of columns sum is very large.I must be use scroll and Use Static Header
This problem just in IE. FireFox work well
Please give me a solution.Thanks
Regard,
Lam
Support
Top achievements
Rank 1
 answered on 21 Jul 2011
1 answer
99 views
Hello,
Thanks in advance for replying.
I am using a radgrid and I use a GridClientSelectColumn in it. Now, I want user to click on the check box of this column to select the rows and clicking on any other part of the row should not make him select that row. Can this be done?

Why I am asking this is, when the user clicks on any other part of the row, only that row gets selected and all the previously selected rows get de-selected. I want to prevent this. Please let me know.

regards
Yash
Yash
Top achievements
Rank 1
 answered on 21 Jul 2011
2 answers
71 views
Hi,

I have a dock with an update panel inside of it. This update panel contains an ASP.NET Microsoft Chart Control. The Chart Control has a Click event handler. I would like to execute code from the dock level after the Chart's Click event handler has finished.

Currently, I have a 'brute force' method of iterating through all docks on the page in Save Dock Layout and ensuring the state that I want. I would prefer to handle it on a dock-by-dock basis during this parent event handler.

Is this possible?

Thanks

Sean
Sean
Top achievements
Rank 2
 answered on 21 Jul 2011
2 answers
253 views
Hi Telerik,

Is it possible to have a RadDock class which implements IPostBackEventHandler's RaisePostBackEvent method and also utilize the cleanliness of RadDock_Command?

Currently, I have this setup:

/// <summary>
/// Parses custom/default commands of RadDock.
/// </summary>
public void RadDock_Command(object sender, DockCommandEventArgs e)
{
    Logger.InfoFormat("Command {0} detected for {1} ", e.Command.Name, ID);
 
    switch (e.Command.Name)
    {
        case "Close":
            Close();
            break;
        case "Refresh":
            RefreshContent(ForceCacheRefresh.True);
            break;
        case "Toggle Legend":
            ToggleLegend();
            break;
        case "Undo Drill Down":
            UndoDrillDown();
            break;
        default:
            Logger.ErrorFormat("Unhandled command name: {0}", e.Command.Name);
            break;
    }
}

public void RaisePostBackEvent(string eventArgument)
{
 
    HandleDialogClose(eventArgument);
}
 
private void HandleDialogClose(string json)
{
    if (json.Contains("HistoricalLocalSettingsJSON"))
    {
        UpdateSettings(JsonConvert.DeserializeObject<HistoricalLocalSettingsJSON>(json));
    }
    else if (json.Contains("CustomLocalSettingsJSON"))
    {
        UpdateSettings(JsonConvert.DeserializeObject<CustomLocalSettingsJSON>(json));
    }
    else
    {
        Logger.ErrorFormat("Unable to handle JSON: {0}", json);
    }
}

My RadDock has a custom command which opens a dialog window. This window visualizes some of the RadDock's settings. After closing, those changes must be persisted and reflected on the RadDock.

I noticed, however, that after implemented IPostBackEventHandler, that RadDock's commands are getting eaten by this RaisePostBackEvent instead of filtering into RadDock_Command.

Is it possible to achieve this?
Sean
Top achievements
Rank 2
 answered on 21 Jul 2011
2 answers
58 views
HELP, this is driving me mad!

I am setting security for controls on an asp.net page from the names in a database. This has worked for eveything so far.....

For example for Radcontextmenus I use :

Dim currentitem As Telerik.Web.UI.RadContextMenu = thisform.FindControl(reader("objectname"))
currentitem.Items(reader("objectindex")).Enabled = reader("permissionvalue")
currentitem.Items(reader("objectindex")).Visible = reader("visiblevalue")

For each element in a Context menu.

However, whenever I reference a RadSchedulerContextMenu the object can never be found. Despite being able to reference it directly through vb.net.

I have :
Dim currentitem As Telerik.Web.UI.RadSchedulerContextMenu = thisform.FindControl(reader("objectname"))
currentitem.Items(reader("objectindex")).Enabled = reader("permissionvalue")
currentitem.Items(reader("objectindex")).Visible = reader("visiblevalue")

The same but it doesn't find the object. Whereas if I specifically use the objectname in vb eg. radschedulercontextmenu1.items(0).enabled = false it works.

Why does the radschedulercontextmenu differ from the radcontextmenu and how should I reference it correctly? Do I need to do so from the radscheduler container?

Any help much appreciated. Its been a long long day :)

Toxic
Top achievements
Rank 1
 answered on 21 Jul 2011
1 answer
134 views
Greetings,

I have an .aspx page that is loaded inside a radwindow. The content for the page is dynamic and of variable height.

In the Page_Load event, I want to detect if the vertical scrollbars for the window are visible, and if they appear, I want to restyle another div on the page. How do I detect if the scrollbars are visible in C# code-behind?


Thanks
Kevin
Top achievements
Rank 2
 answered on 21 Jul 2011
Narrow your results
Selected tags
Tags
+? more
Top users last month
Top achievements
Rank 1
Iron
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ivory
Top achievements
Rank 1
Iron
Nurik
Top achievements
Rank 2
Iron
Iron
YF
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Top achievements
Rank 1
Iron
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ivory
Top achievements
Rank 1
Iron
Nurik
Top achievements
Rank 2
Iron
Iron
YF
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?