Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
64 views

Hi,

I'm programmatically creating a grid on the server side, and would like to use the HeaderContextMenu to allow filtering (particularly, we're interested in the 2-step filtering provided in the menu). Because the other options are available elsewhere or are not used in our system, we'd like to have the context menu simply show the "filter" submenu. I can remove elements of the context menu using this code:

this.grid.HeaderContextMenu.ItemCreated += (ss, aa) =>
{
    if (aa.Item.Value == "FilterMenuParent" || (aa.Item.Parent is RadMenuItem && (aa.Item.Parent as RadMenuItem).Value == "FilterMenuParent"))
    {
    }
    else
    {
        aa.Item.Remove();
    }
};
However, everything I've tried to do in order to move the Filter Menu up to the top-level menu has failed.

In the attached image, the red-bordered menu is what we'd like to appear when right-clicking a column title.

Is there a way for me to do this? I've tried hooking into various menu events to replace the menu items with the filter menu, but it seems like it's not possible. The closest I can get so far is the top-level menu simply having the "Filter" option, which opens the Filter Menu. I'd like to skip that first step and just have the filter menu appear.

Eyup
Telerik team
 answered on 19 May 2016
5 answers
560 views
Hi,

I have come across a strange behavior with the RadWindow control. I added a RadComboBox in the ContentTemplate of a RadWindow. On clicking the RadComboBox the drop down opens and if I click the Close button of the RadWindow without selecting any item, the RadWindow gets closed but the drop down element is still visible to the user and items can be selected.

Another issue is I open the RadWindow and click the Maximize button in the title bar and the RadWindow gets maximized. Now when the RadComboBox is clicked, the drop down element is not visible to the user. Once the maximized window is closed (even Minimized), the drop down element can be seen in the corresponding position in the screen where the RadComboBox is rendered inside the RadWindow. The user is able to select any item from the drop down element. This issue can be replicated with any RadControl(any version) that has a drop down element such as RadDropDownList, RadDropDownTree.

Here is the code I tried.

ASPX:
<telerik:RadWindow ID="RadWindow1" runat="server" OpenerElementID="RadButton1">
    <ContentTemplate>
        <br />
        <br />
        <telerik:RadComboBox ID="RadComboBox1" runat="server" OnClientSelectedIndexChanged="OnClientSelectedIndexChanged">
            <Items>
                <telerik:RadComboBoxItem runat="server" Text="Item A" />
                <telerik:RadComboBoxItem runat="server" Text="Item B" />
                <telerik:RadComboBoxItem runat="server" Text="Item C" />
            </Items>
        </telerik:RadComboBox>
    </ContentTemplate>
</telerik:RadWindow>
<telerik:RadButton ID="RadButton1" runat="server" Text="Open RadWindow">
</telerik:RadButton>

JavaScript:
<script type="text/javascript">
    function OnClientSelectedIndexChanged(sender, args) {
        alert("OnClientSelectedIndexChanged Fired");
    }
</script>

I took a sample video of this strange behavior and you can find it here.

Thanks,
Shinu.
Marin Bratanov
Telerik team
 answered on 19 May 2016
1 answer
550 views

Hello,

I would like to change the binding of the ItemTemplate of a GridTemplateColumn in code behind. I am trying to use the click event of a button outside of the grid to change the binding. On the button click, I would like change the Text value of the ItemTemplate to '<%#Eval("Choose")%>'. Please assist.

APSX:

<telerik:GridTemplateColumn HeaderText="SSA Decision" SortExpression="SSA_Decision" UniqueName="SSA_Decision">
<ItemTemplate>
    <asp:Label ID="lblSSADecision" runat="server" Text='<%#Eval("SSA_Decision")%>' />
</ItemTemplate>
<EditItemTemplate>
    <telerik:RadComboBox runat="server" ID="cboSSADecision" Skin="WebBlue" Width="105px">
    <Items>
            <telerik:RadComboBoxItem Text="Yes" Value="True" />
            <telerik:RadComboBoxItem Text="No" Value="False" />
            <telerik:RadComboBoxItem Text="Please Choose" Value="Choose" Selected="true" />
    </Items>
    </telerik:RadComboBox>
</EditItemTemplate>
</telerik:GridTemplateColumn>

Thanks!

Eyup
Telerik team
 answered on 19 May 2016
0 answers
185 views

Hi,

I am having issues when I click on Enter key to goto the new line and then when I use BackSpace key it does not work.

I see that its working in your demo.

I have the latest Telerik web.ui/design/skin dlls.

Thanks for your help!

==============================

This is my RadEditor control code

 

<telerik:RadScriptManager ID="RadScriptManager1" runat="server" />

<div class="demo-container size-wide">
    <telerik:RadEditor ContentAreaMode="Div" runat="server" ID="RadEditor1" SkinID="DefaultSetOfTools" EditModes="Design" ToolTip="XML Editor"
        Height="515px" CssClass="centered-editor" Width="99%" Skin="WebBlue"  NewLineMode="Br" OnClientPasteHtml="OnClientPasteHtml" StripFormattingOnPaste="NoneSupressCleanMessage" StripFormattingOptions="NoneSupressCleanMessage">
        <Tools> 
            <telerik:EditorToolGroup> 
                <telerik:EditorTool Name="Print" Text="Print" />
                <telerik:EditorTool Name="Cut" Text="Cut" />
                <telerik:EditorTool Name="Copy" Text="Copy" />
                <telerik:EditorTool Name="Zoom" Text="Zoom" />

            </telerik:EditorToolGroup> 
        </Tools>

        <ImageManager ViewPaths="~/Editor/images/UserDir/Marketing,~/Editor/images/UserDir/PublicRelations"
            UploadPaths="~/Editor/images/UserDir/Marketing,~/Editor/images/UserDir/PublicRelations"
            DeletePaths="~/Editor/images/UserDir/Marketing,~/Editor/images/UserDir/PublicRelations"></ImageManager>

        <CssClasses>
            <telerik:EditorCssClass Name="Red Text" Value=".redText"></telerik:EditorCssClass>
            <telerik:EditorCssClass Name="Table Class" Value=".table"></telerik:EditorCssClass>
            <telerik:EditorCssClass Name="Div Class" Value=".div"></telerik:EditorCssClass>
            <telerik:EditorCssClass Name="Image Class" Value=".image"></telerik:EditorCssClass>
            <telerik:EditorCssClass Name="List Class" Value=".listSquare"></telerik:EditorCssClass>
        </CssClasses>
    </telerik:RadEditor>

 

function OnClientPasteHtml(editor, args) {
    var commandName = args.get_commandName();
    // Paste command is the one that handles plain paste, e.g., when Ctrl+V is used.
    if (commandName === "Paste") {
        var htmlToBePasted = args.get_value(); // Get the value to be pasted
        // Use Regex to strip <strong>, <em> and <span> tags.
        htmlToBePasted = htmlToBePasted.replace(/^(&nbsp;)+/, '');
        // Set the processed content to the arguments.
        args.set_value(htmlToBePasted);
    }
}

 

Shubhada
Top achievements
Rank 1
 asked on 18 May 2016
28 answers
1.1K+ views
  I have just installed the 2008 v2 binaries and I am getting the following error when i first switch to the page with the radupload controls on.   If i then use the browser back button and revisit the page it is all ok
Have you any ideas to what may be causing this?

It happens whenever i start to debug from visual studio 2005

Thanks

Alex

 

Server Error in '/testing' Application.

Non-negative number required.
Parameter name: length

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.ArgumentOutOfRangeException: Non-negative number required.
Parameter name: length

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Stack Trace:

[ArgumentOutOfRangeException: Non-negative number required.
Parameter name: length]
   System.Array.CreateInstance(Type elementType, Int32 length) +2855364
   Telerik.Web.UI.Upload.RequestParser.GetFieldBytes(Byte[] chunk, Int32 fieldStartIndex, Int32 fieldBytesCount) +39
   Telerik.Web.UI.Upload.RequestParser.Parse(Byte[] chunk, Int32 validChunkBytes) +229
   Telerik.Web.UI.Upload.ProgressWorkerRequest.UpdateProgress(Byte[] buffer, Int32 validBytes, String caller) +30
   Telerik.Web.UI.Upload.ProgressWorkerRequest.GetPreloadedEntityBody() +39
   System.Web.HttpRequest.GetEntireRawContent() +388
   System.Web.HttpRequest.GetMultipartContent() +56
   System.Web.HttpRequest.FillInFormCollection() +222
   System.Web.HttpRequest.get_Form() +65
   System.Web.HttpRequest.get_HasForm() +3309630
   System.Web.UI.Page.GetCollectionBasedOnMethod(Boolean dontReturnNull) +45
   System.Web.UI.Page.DeterminePostBackMode() +65
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +133


Version Information: Microsoft .NET Framework Version:2.0.50727.1433; ASP.NET Version:2.0.50727.1433
Hristo Valyavicharski
Telerik team
 answered on 18 May 2016
3 answers
354 views

I have following code structute

 

<telerik:RadGrid    ID="xx">
    <MasterTableView CommandItemDisplay="Top" DataKeyNames="Key">
        <RowIndicatorColumn>
            <HeaderStyle Width="20px"></HeaderStyle>
        </RowIndicatorColumn>
        <CommandItemTemplate>
            <telerik:RadToolBar ID="yy" runat="server" AutoPostBack="true" Width="100%">
                <Items>
                    <telerik:RadToolBarButton  CommandName="InitInsert" ResourceName="Add" ImageUrl="~/App_Themes/Default/Add.gif" Text="Add" ></telerik:RadToolBarButton>
                </Items>
            </telerik:RadToolBar> ....................Cont....

 

How can I hide RadToolBarButton  using C# code ? how can I access this toolbar button if its inside Grid/MasterTable/Toolbar hirarchi

 

Ivan Danchev
Telerik team
 answered on 18 May 2016
4 answers
135 views

Has there been a change to the height of the command bar for the grid with the Material theme?  I did a test install and one of the issues that I have with it is that the command bar height seems to be the same as any content.  Before there was some padding or a margin to force some extra height to it.  I'm interested to hear if this is a bug or if there has been a change to the skin.

Regards

Jon

 

Galin
Telerik team
 answered on 18 May 2016
3 answers
210 views
I mean radgrid with IBindableTemplate .
Is there an example out there that shows how to add EditItemTemplate, and binding it,  in code?
I'm having a hard time finding examples of this.
Thanks.
Viktor Tachev
Telerik team
 answered on 18 May 2016
2 answers
1.0K+ views

Please see this page to demo some size issues.  Something in the popup form is causing the font size to increase. Make sure skin is set to Material.

http://demos.telerik.com/aspnet-ajax/spell/examples/overview/defaultcs.aspx

Interestingly the buttons are set to inherit the font size, not sure why but the css inspection doesn't reveal what the source of the increased size is.

Regards

Jon

Danail Vasilev
Telerik team
 answered on 18 May 2016
1 answer
65 views

Hi, 

I have a project which allows upload of large files using drag and drop functionality and saves it to the file system. I use RadProgressArea to show the upload progress for these large files. When I drag and drop a huge video file in the drop zone, the radprogressarea starts displaying the progress, while the file is still uploading I drag another file to the drop zone. The RadProgressArea hangs and loses the first file which was uploading. It works good without any issue when I chose multiple large files and drag and drop in the drop zone at the same time.Can anyone let me know what I am missing?

(I am using Telerik for asp.Net version 2016.1.225.45)

Thanks

Vidya

Hristo Valyavicharski
Telerik team
 answered on 18 May 2016
Narrow your results
Selected tags
Tags
+? more
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?