Telerik Forums
UI for ASP.NET AJAX Forum
5 answers
148 views

I have noticed some very peculiar behavior when setting the folder of the FileExplorer from a record selected on a RadGrid.  The behavior is consistent so should be able to be determined why.

Each row on the RadGrid points to a project which has as one of its not visible fields a url to its project folder on AWS.

The code to change the folder location is contained in a method that is called from RadGrid2_ItemCommand.

The FileExplorer shows the contents of the changed folder all the time but with one exception.  If the currently selected Project is the first on the list, then the FileExplorer does not show the contents of the new folder whenever a different Project is selected.  Reselecting the same Project will get FileExplorer to show the contents of the new folder.  If the currently selected Project is anything other than the first Project, the FileExplorer will show the contents of the new folder.

I have logged the value of FileExplorer1.CurrentFolder before the change and then again after the change.  When selecting away from the first Project, this value does not change.  All other times the value changes.  What may be relevant is that on the Page_Load, I also log the value of FileExplorer1.CurrentFolder, if it is a Postback, and saw that the value has since been changed but the visual aspect of the FileExplorer still shows the first Project's folder.

On Page_Load (not a Postback), the Forward, NewFolder and Open are all removed from the ToolBar,ContextMenus[0] and GridContextMenu.

How do I get the FileExplorer to show the contents of the new folder when selecting away from the first Project?

 

<telerik:RadFileExplorer RenderMode="Lightweight" runat="server" ID="FileExplorer1"
   Width="595px" Height="350px" AllowPaging="true" PageSize="10"
   VisibleControls="ContextMenus,Grid,Toolbar">
   <Configuration EnableAsyncUpload="true"></Configuration>
</telerik:RadFileExplorer>

 

protected void RadGrid2_ItemCommand(object sender, GridCommandEventArgs e)
{
    if (e.CommandName == "RowClick")
    {
       GridDataItem item = (GridDataItem)e.Item;
      switch (e.Item.OwnerTableView.Name)
      {
         case "Missions":
            // do something else
            break;
         case "Projects":
            string tempLocation = item["colFullDirectory"].Text;
            string newDrive = String.Format("~/aws/{0}", tempLocation.Substring(9));
            SetFileExplorerPaths(newDrive);

...

 

private void SetFileExplorerPaths(string folderPath)
{
   string[] paths = new string[]
   {
      folderPath
   };
   FileExplorer1.InitialPath = Page.ResolveUrl(folderPath);
   FileExplorer1.Configuration.UploadPaths = paths;
   FileExplorer1.Configuration.ViewPaths = paths;
   FileExplorer1.Configuration.DeletePaths = paths;
}

 

 

Vessy
Telerik team
 answered on 27 Oct 2016
2 answers
74 views

I have a hierarchy grid with 3 levels similar to the "Grid - Declarative Relations" demo.  I am using batch edit mode and have set HighlightDeletedRows="True".  However in the inner most grid it is not highlighting the row to be deleted.  This is the BatchEditingSettings at each level.

<BatchEditingSettings EditType="Cell" SaveAllHierarchyLevels="True" HighlightDeletedRows="True" OpenEditingEvent="Click"></BatchEditingSettings>

Is there some way I can get it to highlight the row to be deleted in the inner most grid?

Thanks,  Jeff

Jeff H.
Top achievements
Rank 1
 answered on 27 Oct 2016
15 answers
282 views

Hello,

I've updated to latest version of UI for ASP.NET AJAX R3 2016 and I get now following javascript error...

TypeError: this._contextMenuFunctionality.dispose is not a function

 /Telerik.Web.UI.WebResource.axd?....:29491:33 dispose()
 /Telerik.Web.UI.WebResource.axd?....:6:68785 disposeElement()
 /Telerik.Web.UI.WebResource.axd?....:15:35395 _updatePanel()
 /Telerik.Web.UI.WebResource.axd?....:15:32430 _scriptIncludesLoadComplete()
 /Telerik.Web.UI.WebResource.axd?....:6:204 .()
 /Telerik.Web.UI.WebResource.axd?....:6:307
 /Telerik.Web.UI.WebResource.axd?....:15:4881 _loadScriptsInternal()
 /Telerik.Web.UI.WebResource.axd?....:15:5671 _scriptLoadedHandler()
 /Telerik.Web.UI.WebResource.axd?....:6:307 ._completedCallback()
 /Telerik.Web.UI.WebResource.axd?....:6:94288 _scriptLoadHandler()

I'm using a TreeView and some context menus in a Update Panel and this error occures when I'm clicking a tree node.

These are the client side events of RadTreeView I'm using:

OnClientContextMenuItemClicking="onContextMenuItemClick"
OnClientContextMenuShowing="onClientContextMenuShowing"
OnClientDoubleClick="onClientDoubleClickHandler"
OnClientNodeClicking="clientNodeClickingHandler"
OnClientNodeExpanding="toggleHandler"
OnClientNodeCollapsing="toggleHandler"
OnClientNodeExpanded="onNodeExpandedCollapsed"
OnClientNodeCollapsed="onNodeExpandedCollapsed"

Hope this helps,

Best regards

Roman Haussener

Marin Bratanov
Telerik team
 answered on 27 Oct 2016
5 answers
112 views

I installed the most recent version of UI for ASP.net R3 2016 SP1 (2016.3.1018). The update did fix the radGrid filter autopostback issue, which was good.

 

What is now happening is any page with a RadEditor on it causes a Javascript error on a postback. I'm attaching a screencap showing the error popping up. Browser is Chrome Canary. Also happens in Chrome and Edge.

 

The exact text of the error is as follows: 

TypeError: this._contextMenuFunctionality.dispose is not a function
&nbsp;/Telerik.Web.UI.WebResource.axd?_TSM_HiddenField_=RadScriptManager1_TSM&compress=1&_TSM_CombinedScripts_=%3b%3bSystem.Web.Extensions%2c+Version%3d4.0.0.0%2c+Culture%3dneutral%2c+PublicKeyToken%3d31bf3856ad364e35%3aen-US%3af9ecfe64-7d94-4875-a470-9996e4d00a9f%3aea597d4b%3ab25378d2%3bTelerik.Web.UI%2c+Version%3d2016.3.1018.45%2c+Culture%3dneutral%2c+PublicKeyToken%3d121fae78165ba3d4%3aen-US%3a761f4fed-131d-4f69-96f1-760ff0e34523%3a16e4e7cd%3a33715776%3a4877f69a%3a86526ba7%3a874f8ea2%3af7645509%3a24ee1bba%3ac128760b%3a19620875%3af46195d3%3acda80b3%3a383e4ce8%3aed16cbdc%3ae330518b%3a2003d0b8%3a1e771326%3a88144a7a%3ac8618e41%3a1a73651d%3a333f8d94%3ab2e06756%3a92fe8ea0%3afa31b949%3a490a9d4e%3abd8f85e4%3a52af31a4%3a5fa37e7e%3aaa288e2d%3a258f1c72%3a8674cba1%3a7c926187%3ab7778d6c%3ac08e9f8a%3a59462f1%3aa51ee93e%3a3856fd9f%3adc7e0bd%3a63b115ed%3a1569bb5f%3a30f1f089:35698

-------------

I'm also including the control definition for your reference. This and other pages/sites with the same RadEditor all worked prior to applying the Service Pack 1.

 

<%--                            <telerik:RadEditor ID="txtAnnotation" runat="server" AutoResizeHeight="True" EnableResize="False" Height="175px" RenderMode="classic"
                                ToolbarMode="ShowOnFocus" Width="100%">
                                <Tools>
                                    <telerik:EditorToolGroup Tag="InsertToolbar">
                                        <telerik:EditorTool Name="AjaxSpellCheck" />
                                        <telerik:EditorSeparator />
                                        <telerik:EditorToolStrip Name="InsertTable">
                                        </telerik:EditorToolStrip>
                                        <telerik:EditorTool Name="InsertRowAbove" />
                                        <telerik:EditorTool Name="InsertRowBelow" />
                                        <telerik:EditorTool Name="DeleteRow" />
                                        <telerik:EditorTool Name="InsertColumnLeft" />
                                        <telerik:EditorTool Name="InsertColumnRight" />
                                        <telerik:EditorTool Name="DeleteColumn" />
                                        <telerik:EditorSeparator />
                                        <telerik:EditorTool Name="MergeColumns" />
                                        <telerik:EditorTool Name="MergeRows" />
                                        <telerik:EditorSeparator />
                                        <telerik:EditorTool Name="SplitCell" />
                                        <telerik:EditorTool Name="SplitCellHorizontal" />
                                        <telerik:EditorTool Name="DeleteCell" />
                                        <telerik:EditorTool Name="SetCellProperties" />
                                        <telerik:EditorTool Name="SetTableProperties" />
                                        <telerik:EditorSeparator />
                                        <telerik:EditorSplitButton Name="InsertSymbol">
                                        </telerik:EditorSplitButton>
                                    </telerik:EditorToolGroup>
                                    <telerik:EditorToolGroup Tag="Formatting">
                                        <telerik:EditorTool Name="Bold" />
                                        <telerik:EditorTool Name="Italic" />
                                        <telerik:EditorTool Name="Underline" />
                                        <telerik:EditorTool Name="StrikeThrough" />
                                        <telerik:EditorSplitButton Name="ForeColor">
                                        </telerik:EditorSplitButton>
                                        <telerik:EditorSplitButton Name="BackColor">
                                        </telerik:EditorSplitButton>
                                        <telerik:EditorTool Name="FormatPainter" />
                                        <telerik:EditorSeparator />
                                        <telerik:EditorTool Name="JustifyLeft" />
                                        <telerik:EditorTool Name="JustifyCenter" />
                                        <telerik:EditorTool Name="JustifyRight" />
                                        <telerik:EditorTool Name="JustifyFull" />
                                        <telerik:EditorTool Name="JustifyNone" />
                                        <telerik:EditorSeparator />
                                        <telerik:EditorTool Name="Superscript" />
                                        <telerik:EditorTool Name="Subscript" />
                                        <telerik:EditorSeparator />
                                        <telerik:EditorTool Name="ConvertToLower" />
                                        <telerik:EditorTool Name="ConvertToUpper" />
                                        <telerik:EditorTool Name="Indent" />
                                        <telerik:EditorTool Name="Outdent" />
                                        <telerik:EditorTool Name="InsertOrderedList" />
                                        <telerik:EditorTool Name="InsertUnorderedList" />
                                        <telerik:EditorTool Name="AbsolutePosition" />
                                        <telerik:EditorTool Name="LinkManager" />
                                        <telerik:EditorTool Name="Unlink" />
                                        <telerik:EditorTool Name="SetLinkProperties" />
                                        <telerik:EditorTool Name="ToggleTableBorder" />
                                    </telerik:EditorToolGroup>
                                    <telerik:EditorToolGroup Tag="DropdownToolbar">
                                        <telerik:EditorDropDown Name="FontName">
                                        </telerik:EditorDropDown>
                                        <telerik:EditorDropDown Name="FontSize">
                                        </telerik:EditorDropDown>
                                        <telerik:EditorDropDown Name="RealFontSize">
                                        </telerik:EditorDropDown>
                                        <telerik:EditorDropDown Name="ApplyClass">
                                        </telerik:EditorDropDown>
                                        <telerik:EditorDropDown Name="InsertCustomLink">
                                        </telerik:EditorDropDown>
                                        <telerik:EditorDropDown Name="FormatBlock">
                                        </telerik:EditorDropDown>
                                        <telerik:EditorTool Name="FormatSets" />
                                        <telerik:EditorDropDown Name="Zoom">
                                        </telerik:EditorDropDown>
                                    </telerik:EditorToolGroup>
                                </Tools>
                                <Content>
                                
                                </Content>
                                <TrackChangesSettings CanAcceptTrackChanges="False" />
                            </telerik:RadEditor>--%>

Marin Bratanov
Telerik team
 answered on 27 Oct 2016
1 answer
138 views

Hi,
Did you have made some change on Permission for deletion with the last update (2016.3.1018)?

After update, Permission for Deletion not works like before update.
I set permission with a customprovider (permission is ok on GetPermissions return after update too))
Windows Security are ok too.

The button changes to enable just if Parent Folder have access on Deletion and not take care about the permission of file.

Thank you for your help.

 

and does not take
Vessy
Telerik team
 answered on 27 Oct 2016
4 answers
309 views

I'm using a RadGrid control to display reports to users.

In the course of WAI-ARIA-enabling the website I have activated keyboard navigation setting the RadGrid's AllowKeyboardNavigation property to true.

Now, when I hit [RETURN] on any row in the Grid, an in-place editor opens. I don't want this to happen.

How can I keep the RadGrid from entering edit mode thoroughly?

Konstantin Dikov
Telerik team
 answered on 27 Oct 2016
1 answer
252 views

I have a RadGrid in which i need to loop through the first column and turn off the on click event.  

Prior to grouping this RadGrid the following code did this across each individual row.

CType(CType(Page.Form.FindControl("ReportGrid"), RadGrid).MasterTableView.Items(i).Cells(2), TableCell).Attributes.Add("OnClick", "return false;")

And 

CType(Page.Form.FindControl("ReportGrid"), RadGrid).MasterTableView.Items(lastRowCount - j).CssClass = "boldRow" 

over the last row in order to bold the sum row. 

 

However now with grouping I cannot locate the appropriate position to set the attribute/cssclass.  Also the total row for each group is duplicated twice. 

How do I access the first column in each row turn off the OnClick event? And how do I find/access the last row of each group? 

thank you. 

<telerik:RadGrid ID="ReportGrid" runat="server" AllowSorting="True" AutoGenerateColumns="False"
Skin="Rental" PageSize="100000" GridLines="None" Width="930px" AllowPaging="True"
TabIndex="-1" EnableEmbeddedSkins="false" Height="480px" >
<PagerStyle Position="Bottom" Mode="NumericPages" PageButtonCount="10" AlwaysVisible="true" />
<ClientSettings>
<Scrolling UseStaticHeaders="True" AllowScroll="True" ScrollHeight="430px"></Scrolling>
<Resizing ResizeGridOnColumnResize="True" ClipCellContentOnResize="False" />
</ClientSettings>
<SortingSettings EnableSkinSortStyles="false" />
<MasterTableView AllowCustomSorting="true" AllowMultiColumnSorting="false" EnableNoRecordsTemplate="False" GridLines="Vertical" DataKeyNames="regionid" TableLayout="Fixed">
<SortExpressions>
<telerik:GridSortExpression FieldName="Product" SortOrder="Ascending" />
</SortExpressions>
<GroupByExpressions>
<telerik:GridGroupByExpression>
<SelectFields>
<telerik:GridGroupByField FieldAlias="Product" FieldName="Product" SortOrder="Ascending"></telerik:GridGroupByField>
</SelectFields>
<GroupByFields>
<telerik:GridGroupByField FieldName="ProductSort" SortOrder="Descending"></telerik:GridGroupByField>
</GroupByFields>
</telerik:GridGroupByExpression>
</GroupByExpressions>
<NoRecordsTemplate>
There is no data to display.
</NoRecordsTemplate>
<Columns>
<telerik:GridButtonColumn ButtonType="LinkButton" ImageUrl="" HeaderText="Region"
DataTextField="RegionName" ItemStyle-CssClass="GrdBtn" CommandName="Select" UniqueName="btnSelect" SortExpression="Name"
HeaderStyle-Width="150px" />
<telerik:GridBoundColumn DataField="Size" HeaderText="Size" UniqueName="Size"
SortExpression="Util">
<HeaderStyle Width="60px" />
</telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="Util" HeaderText="Util" UniqueName="Util"
SortExpression="Util">
<HeaderStyle Width="60px" />
</telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="Lol" HeaderText="Lol" UniqueName="Lol"
SortExpression="Lol">
<HeaderStyle Width="60px" />
</telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="ConLength" HeaderText="ConLength over Time" UniqueName="ConLength"
SortExpression="ConLength">
<HeaderStyle Width="60px" />
</telerik:GridBoundColumn>
</Columns>
</MasterTableView>
</telerik:RadGrid>

Angel Petrov
Telerik team
 answered on 27 Oct 2016
1 answer
77 views
Is there a way to check and uncheck all Tiles through javascript? And also it has a way to be able to remove a Tile through javascript or code-behind? I'm waiting
Marin Bratanov
Telerik team
 answered on 27 Oct 2016
5 answers
635 views

I have a radcombobox inside an update panel and it works fine in every other broswer but Edge. I get the following JS exception in Edge when I debug with f12:

"Sys.ScriptLoadFailedException: The script http://xxx/ScriptResource.axd?d=qZWov62bqH1pGSd7D0rQx-DbXZR3u-bcTkEoFKSoahBoB3Yrh_wCaeTQapIJW9FNJ_Rl8OfON8PhrH6dyNfuKmqiz44SDKOLCQx07DwbU6nWm-KML3wF4LeAKJ8k50XKUYKv8MnFUudJMiYa0&t=ffffffffe8b7bf5c' 

 

failed to load. Check for:
 Inaccessible path.
 Script errors. (IE) Enable 'Display a notification about every script error' under advanced settings.
 Missing call to Sys.Application.notifyScriptLoaded().

 

When I open the script file in a text editor and navigate to the line the debugger says is causing the issue it's this line:

c.RadComboBox.prototype._updateComboBoxText=function(){if(!this._checkBoxes){return;

 

When it reaches this point it crashes and the combobox doesn't work at all. Again this works in every other browser. 

Peter Milchev
Telerik team
 answered on 27 Oct 2016
1 answer
382 views

Basically, I'm trying to split uploaded files into 4meg chunks and write them out.  However, I'm getting an error and can't figure out why.

The file being uploaded is 65meg.

Below is my source code.  It creates the first Chunk fine.  It then loops around, and when it starts the second Chunk, it blows up with this error message:
"Offset and length were out of bounds for the array or count is greater than the number of elements from index to the end of the source collection."

The line of code that is the offender is inside the Else statement and is:

                        streamFile.Read(chunk, index, intChunkLength);

index is 4194304 bytes (4,194,304)
intChunkLength is also 4194304 bytes (4,194,304)
streamFile.ContentLength is 95724958 (95,724,958)

 

Now, the way I understand it (Which could be wrong) is that streamFile should be reading the uploaded file starting at the 4194304 byte, and reading in an additional 4194304 bytes.  That would be 8,388,608 bytes in.   That is well within the 95,724,958 bytes that was uploaded.   So why am I getting this error?  Maybe I don't understand the way InputStream is supposed to work. 

        protected void RadAsyncUpload1_FileUploaded(object sender, Telerik.Web.UI.FileUploadedEventArgs args)
        {
 
            // This is an experiment to break up a file into chunks.  From here down.
            foreach (UploadedFile file in RadAsyncUpload1.UploadedFiles)
            {
                byte[] bytes = new byte[file.ContentLength];
 
                byte[] chunk = new byte[1024 * 1024 * 4];
                int intChunkLength = chunk.Length;
                int count = 1;
                int index = 0;
 
                using (var streamFile = file.InputStream)
                {
                    while (index <= bytes.Length)
                {
 
                    if (index + chunk.Length > (bytes.Length))
                    {
                        // Remainder
                        int intChunkUsedSoFar = (count - 1) * chunk.Length;
                        int intRemainder = index - intChunkUsedSoFar;
                        chunk = new byte[chunk.Length];
                        streamFile.Read(chunk, index, intRemainder);
                         
                    }
                    else
                    {
                        // Full size
                        chunk = new byte[intChunkLength];
                        streamFile.Read(chunk, index, intChunkLength);
                    }
 
                    File.WriteAllBytes("c:\\chunks\\chunk" + count.ToString() + ".ary", chunk);
                     
                    count = count + 1;
                    index += chunk.Length;
 
                }
            }
}}
Peter Milchev
Telerik team
 answered on 26 Oct 2016
Narrow your results
Selected tags
Tags
+? more
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?