Telerik Forums
UI for ASP.NET AJAX Forum
8 answers
518 views
Hi!

I'm trying to implement a context menu in a grid with Prometheus. I've done it in RadControls for ASP.NET without any problems.

When calling the radContextMenu1.Show() method I will get an error message saying that the method is not supported.

Any idea about what is wrong?

Thanks
/Mats

-----------------------------------------------------------------------
default.aspx:

<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %>

<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">

<head runat="server">
    <title>Untitled Page</title>
</head>

<body>
<script type="text/javascript">

function ShowContextMenu()
{
   var contextMenu = <%= RadContextMenu1.ClientID %>;
   contextMenu.Show();
}

</script>

    <form id="form1" runat="server">

        <asp:ScriptManager ID="ScriptManager1" runat="server" />
        <div>
            <telerik:RadGrid ID="RadGrid1" runat="server" OnNeedDataSource="RadGrid1_NeedDataSource">
                <ExportSettings>
                    <Pdf FontType="Subset" PaperSize="Letter" />
                    <Excel Format="Html" />
                </ExportSettings>
                <ClientSettings>
                    <ClientEvents OnRowContextMenu="ShowContextMenu" />
                </ClientSettings>
                <MasterTableView CommandItemDisplay="None" CurrentResetPageIndexAction="SetPageIndexToFirst"
                    Dir="LTR" Frame="Border" TableLayout="Auto">
                    <EditFormSettings>
                        <EditColumn CurrentFilterFunction="NoFilter" FilterListOptions="VaryByDataType">
                        </EditColumn>
                    </EditFormSettings>
                    <ExpandCollapseColumn CurrentFilterFunction="NoFilter" FilterListOptions="VaryByDataType"
                        Resizable="False" Visible="False">
                        <HeaderStyle Width="20px" />
                    </ExpandCollapseColumn>
                    <RowIndicatorColumn CurrentFilterFunction="NoFilter" FilterListOptions="VaryByDataType"
                        Visible="False">
                        <HeaderStyle Width="20px" />
                    </RowIndicatorColumn>
                </MasterTableView>
            </telerik:RadGrid>
            <telerik:RadContextMenu ID="RadContextMenu1" runat="server" Flow="Horizontal">
                <DefaultGroupSettings ExpandDirection="Auto" Flow="Vertical" />
                <CollapseAnimation Duration="200" Type="OutQuint" />
                <ExpandAnimation Type="OutQuart" />
                <Items>
                    <telerik:RadMenuItem runat="server" ExpandMode="ClientSide" Text="Rad 1">
                        <GroupSettings ExpandDirection="Auto" Flow="Vertical" />
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem runat="server" ExpandMode="ClientSide" Text="Rad 2">
                        <GroupSettings ExpandDirection="Auto" Flow="Vertical" />
                    </telerik:RadMenuItem>
                </Items>
            </telerik:RadContextMenu>
        </div>
    </form>
</body>

</html>
-----------------------------------------------------------------------
default.aspx.cs:

using System;
using System.Data;
using System.Configuration;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;

public partial class _Default : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {

    }

    public DataView Source()
    {
        DataTable dt = new DataTable();

        dt.Columns.Add(new DataColumn("Item", Type.GetType("System.String")));

        DataRow dr;
        dr = dt.NewRow();
        dr[0] = "Use context menu on me...";
        dt.Rows.Add(dr);

        DataView dv = new DataView(dt);
        return dv;
    }

    protected void RadGrid1_NeedDataSource(object source, Telerik.Web.UI.GridNeedDataSourceEventArgs e)
    {
        RadGrid1.DataSource = Source();
    }
}

John
Top achievements
Rank 1
 answered on 17 Jul 2008
1 answer
107 views
Hi

I am using rad grid control, But I could not find how to edit single column in a row instead of  editing complete row.

Can any one help me in solving this problem ?

Thanks in Advance,
Balaji Velasiri.
Vlad
Telerik team
 answered on 17 Jul 2008
1 answer
58 views
Hi

I am using rad grid control, But I could not find how to edit single column in a row instead of  editing complete row.

Can any one help me in solving this problem ?

Thanks in Advance,
Balaji.
Vlad
Telerik team
 answered on 17 Jul 2008
3 answers
256 views
I have looked at the examples and I have not seen an example where I can bind a scheduler in the code behind. For some very odd reason people like to bind using a query in the html.

In any case I am new to the scheduler and want to bind in the code behind. When I try the following code nothing shows on the grid and there should be:

            <telerik:RadScheduler runat="server" ID="RadScheduler1" 
            Width="750px" Skin="Default" EnableEmbeddedSkins="True" 
            SelectedDate="2008-02-02" DayStartTime="08:00:00" DayEndTime="18:00:00" TimeZoneOffset="03:00:00" 
            DataKeyField="AppointmentID" DataSubjectField="Subject" 
            DataStartField="StartDate" DataEndField="EndDate" DataRecurrenceField="RecurrenceRule" 
            DataRecurrenceParentKeyField="RecurrenceParentID">         
              
              
              
            <AppointmentTemplate> 
                <%# Eval("Subject") %> 
            </AppointmentTemplate> 
        </telerik:radscheduler> 


 
    Private Sub BindScheduler()  
 
        Dim dt As DataTable  
 
            dt = '--- get the data table from the SP  ---' 
 
 
 
            If dt.Rows.Count > 0 Then  
                Me.RadScheduler1.DataSource = dt 
                Me.RadScheduler1.DataBind()  
            End If  
 
    End Sub  
 


Any thoughts?

Jason 
Peter
Telerik team
 answered on 17 Jul 2008
1 answer
91 views
Hi

When using the RadEditor in MOSS is it possible to have the Find & Replace function available when the user switches into HTML view.

The standard toolbar that we use has the Find & Replace available, but when the user switches to the HTML view it disappears.  Ideally it would be good if the toolbar remained available even though not all functions would be useful.

Thanks
Peter

Rumen
Telerik team
 answered on 17 Jul 2008
3 answers
185 views
I'm having a bit of a problem with a radcombobox.

The dropdown hides itself away neatly when the user clicks away on the page (onblur) BUT... if the current combobox text matches an item in the list, it's automatically selecting it.  This isn't the behaviour I expected - surely it should only "select" an item when a user clicks on it?

Further notes:
* I'm running the latest version (2008.1.619.20)
* I have tried setting MarkFirstMatch to true/false (no difference)
* I have tried setting AllowCustomText to true/false (no difference)
* Calling sender.clearSelection() onblur is a workaround, but this loses the user's search text, which we don't want.

Please advise!
Rosi
Telerik team
 answered on 17 Jul 2008
5 answers
157 views
I want to use the toolbar to open a window, I have DLed the code form the site and I have a question on that code.  In the code it says if 

if(sender.CommandName == "newCustomer")

Can I not just put 

radopen(

null, sender.CommandName )

Or are you looking at potential isues here?

Peter
Telerik team
 answered on 17 Jul 2008
2 answers
269 views
Is there any way to disable the auto-highlight (or auto-select) feature of the combo box? This is causing problems when MarkFirstMatch is set to True b/c if the user enters some data, the first match is selected. If they then click at the very end of the item to change just the last character, the entire item is highlighted and the next keystroke clears the input box.

Any thoughts?

Thank you!
Oleg Fridman
Top achievements
Rank 2
 answered on 17 Jul 2008
2 answers
129 views
Hello!

I am using a RadToolTip to load a search window for my site. In that, I have placed a RadComboBox. Whenever the user clicks in the ComboBox, the input portion shows up fine but the drop down portion shows up behind the tooltip. I have tried every combination of z-index I can think of and still nothing.

Any thoughts as to what may be causing this?

Thank you,
Oleg Fridman
Oleg Fridman
Top achievements
Rank 2
 answered on 17 Jul 2008
1 answer
95 views
It seems that the RadToolTipManager replaces standard browser tooltips. For example any tooltip of an image on my website that has a defined AlternateText, is shown in the RadToolTip. I don't want this to happen. I only want the RadToolTip to display content of object that have been added do TargetControl. How do I do this and prevent standard tooltips from being replaced by the RadToolTip?

Thanks,
Chris

Georgi Tunev
Telerik team
 answered on 17 Jul 2008
Narrow your results
Selected tags
Tags
+? more
Top users last month
Shiori
Top achievements
Rank 2
Iron
Tien
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Rob
Top achievements
Rank 4
Bronze
Bronze
Iron
Geoff
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Shiori
Top achievements
Rank 2
Iron
Tien
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Rob
Top achievements
Rank 4
Bronze
Bronze
Iron
Geoff
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?