Steven Lackey

Enhance rad asynch file uploader to address issues from ticket 1049975

I am using the "PostbackTriggers" property of the Upload control, as described on your web site article "How to Persist Uploaded Files".

This works well for the situation where I need a postback on a control, but that control is not a "submit" control.

The problem comes when I use one of the "submit" controls (listed in the PostbackTriggers property), but a server side validation error occurs, and the form data (including uploaded files) is NOT saved to the DB. (This is a type of validation that can only be done on the server side.) In that case, the upload control loses the uploaded file information. Thus two questions:

1. Is there a way on the server side to tell the control that an error has occurred, and to continue to persist the uploaded file information?

2. Is there a way for the upload control to ALWAYS persist the uploaded file information until told on the server side that I have extracted the information I need from it?
Feature Request by Steven Lackey Status: New Comments: 0 Category: New controls suggestions Scheduled for: Not Scheduled Last update: 2018-11-15T19:48:27 by Steven Lackey
0
Peter Milchev

Grid RenderMode falls back to Classic when Grid's markup has a HeaderContextMenu tag and no explicitly set RenderMode

When the Grid has <HeaderContextMenu> in the Markup and there is no explicitly set RenderMode of the Grid, the Grid is rendered in Classic.
It also happens if there is a reference to the ContextMenu in the code behind.

Reproduction steps:
<script>
function f() {
//code
alert($find("RadGrid1")._renderMode);
Sys.Application.remove_load(f);
}
Sys.Application.add_load(f);
</script>
<telerik:RadGrid ID="RadGrid1" runat="server" >
<HeaderContextMenu></HeaderContextMenu>
</telerik:RadGrid>

Solutions:
1. Remove the HeaderContextMenu tag

2. Set the RenderMode of the Grid explicitly
Bug Report by Peter Milchev Status: In Development Comments: 0 Category: RadGrid Scheduled for: Not Scheduled Last update: 2018-11-12T10:15:08 by Attila Antal
0
Veselina Raykova
Team Member

Duplicated Checkboxes in Firefox 63

The checkboxes decorated with RadFormDecorator appeared double in Classic rendering after upgrading to Firefox 63.

Steps to reproduce:
1. Upgrade to Firefox 63
2. Run the following setup
<telerik:RadFormDecorator runat="server" DecoratedControls="CheckBoxes" RenderMode="Classic" />
<div>asp:Checkbox</div>
<asp:CheckBox ID="chkApproved" runat="server" Text="asp:Checkbox" />

<div>Html Input</div>
<input id="chkApproved1" type="checkbox" name="chkApproved" />

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

Solutions found so far:
1) Use RadFormDecorator in Lightweight RenderMode:
<telerik:RadFormDecorator runat="server" RenderMode="Lightweight"/>

2) Set the RadFormDecorator's DecoratedControls="All":
<telerik:RadFormDecorator runat="server" RenderMode="Classic" DecoratedControls="All" />

3) Set the ControlsToSkip="CheckBoxes"
<telerik:RadFormDecorator runat="server" RenderMode="Classic" ControlsToSkip="CheckBoxes" />

4) Or add the following CSS overwrite to the page:
<style>
.rfdCheckboxUnchecked, .rfdCheckboxChecked {
padding: 0 !important;
background-image: none !important;
}
</style>
Bug Report by Veselina Raykova Status: Approved Comments: 7 Attachments: 1 Category: RadFormDecorator Scheduled for: Not Scheduled Last update: 2018-11-12T05:39:01 by M Kumar
0
Veselina Raykova
Team Member

Nested Wizards with different orientation are mixing there styles in Lightweight

When nesting several RadWizard controls with different orientation they are mixing there styles in Lightweight (e.g. Vertical in horizontal). The problem occurs only in Lightweight, the Classic rendered Wizards are rendered properly.

Code to reproduce the problem:
<telerik:RadWizard runat="server" ID="StaticWizard" RenderMode="Lightweight">
<WizardSteps>
<telerik:RadWizardStep Title="1.0 Step">
<telerik:RadWizard runat="server" ID="NestedStaticWizard1" NavigationBarPosition="Left" ProgressBarPosition="Left" RenderMode="Lightweight">
<WizardSteps>
<telerik:RadWizardStep Title="1.01 Sub-step"></telerik:RadWizardStep>
<telerik:RadWizardStep Title="1.02 Sub-step"></telerik:RadWizardStep>
<telerik:RadWizardStep Title="1.03 Sub-step"></telerik:RadWizardStep>
<telerik:RadWizardStep Title="1.04 Sub-step"></telerik:RadWizardStep>
<telerik:RadWizardStep Title="1.05 Sub-step"></telerik:RadWizardStep>
<telerik:RadWizardStep Title="1.06 Sub-step"></telerik:RadWizardStep>
</WizardSteps>
</telerik:RadWizard>
</telerik:RadWizardStep>
<telerik:RadWizardStep Title="2.0 Step"></telerik:RadWizardStep>
<telerik:RadWizardStep Title="3.0 Step"></telerik:RadWizardStep>
<telerik:RadWizardStep Title="4.0 Step"></telerik:RadWizardStep>
<telerik:RadWizardStep Title="5.0 Step"></telerik:RadWizardStep>
<telerik:RadWizardStep Title="6.0 Step"></telerik:RadWizardStep>
</WizardSteps>
</telerik:RadWizard>
Feedback by Veselina Raykova Status: Approved Comments: 0 Category: RadWizard Scheduled for: Not Scheduled Last update: 2018-11-09T17:46:42 by Veselina Raykova
0
Danail Vasilev
Team Member

ADD step property for the axes gridlines in RadHtmlChart

For the time being the property can be set through the underlying Kendo Chart widget. For example:

<script>
function OnLoad(chart) {
var widget = chart.get_kendoWidget();
//also applies for the minor grid lines - replace majorGridLines with minorGridLines
//Numeric series
widget.options.xAxis.majorGridLines.step = 5;
widget.options.yAxis.majorGridLines.step = 5;
//Category series
//widget.options.categoryAxis.majorGridLines.step = 5;
//widget.options.valueAxis.majorGridLines.step = 5;
widget.redraw();
}
</script>
<telerik:RadHtmlChart runat="server" ID="BubbleChart" Width="500" Height="400">
<ClientEvents OnLoad="OnLoad" />
<ChartTitle Text="Market Share Study">
</ChartTitle>
<PlotArea>
<Appearance>
<FillStyle BackgroundColor="White"></FillStyle>
</Appearance>
<XAxis MinValue="0" MaxValue="100" Step="10">
<MinorGridLines Visible="false" />
</XAxis>
<YAxis MinValue="0" MaxValue="100" Step="10">
<MinorGridLines Visible="false" />
</YAxis>
<Series>
<telerik:BubbleSeries>
<Appearance FillStyle-BackgroundColor="#6ab2c9">
</Appearance>
<TooltipsAppearance DataFormatString="Percentage of Market Share: {2}%<br /> Number of products: {0}<br /> Sales: ${1}" />
<SeriesItems>
<telerik:BubbleSeriesItem Size="3" X="5" Y="55" />
<telerik:BubbleSeriesItem Size="12" X="14" Y="80" />
<telerik:BubbleSeriesItem Size="33" X="20" Y="60" />
<telerik:BubbleSeriesItem Size="10" X="18" Y="24" />
<telerik:BubbleSeriesItem Size="42" X="22" Y="32" />
</SeriesItems>
</telerik:BubbleSeries>
</Series>
</PlotArea>
<Legend>
<Appearance Position="Right"></Appearance>
</Legend>
</telerik:RadHtmlChart>
Feature Request by Danail Vasilev Status: Approved Comments: 2 Category: RadHtmlChart Scheduled for: Not Scheduled Last update: 2018-11-09T16:54:04 by Marin Bratanov
0
Marin Bratanov
Team Member

Boolean filter expression should contain apostrophes for valid SQL syntax when EnableLinqExpressions=false

A valid SQL statement should look like

SELECT * FROM Products WHERE ([Discontinued] = 1)

or

SELECT * FROM Products WHERE ([Discontinued] = 'True')

but RadGrid provides something like

([Discontinued] = True)

in the MasterTableView.FilterExpression property.

By default RadGrid filters the data on its own after retrieving the entire data set form the data source, and the filtering operation works like that.
If you will be using the filter expression provided by the grid in a custom data source operation you may need to tweak the string first.
Note that changing this may result in a breaking change if you are already using the current syntax.

Workaround: https://www.telerik.com/support/kb/aspnet-ajax/grid/details/get-sql-compliant-filterexpressions-from-radgrid
Feedback by Marin Bratanov Status: New Comments: 0 Category: RadGrid Scheduled for: Not Scheduled Last update: 2018-11-08T20:52:00 by Attila Antal
0
Attila Antal
Team Member

RadGrid export to excel images get resized

Images that reside in the grid will get resized (scaled down with about 3-5 %) which might cause issues, specially if exporting bar-codes, thus the bar-code scanners won't be able to read them.

Current workaround is to use the Telerik Documents Processing Library and build the table manually where the images are inserted without changing the size.

Here is an example:

protected void RadGrid1_InfrastructureExporting(object sender, GridInfrastructureExportingEventArgs e)
{
Telerik.Web.UI.ExportInfrastructure.Table table = e.ExportStructure.Tables[0];

Workbook workbook = new Workbook();
workbook.Worksheets.Add();

Worksheet worksheet = workbook.ActiveWorksheet;


foreach (var row in table.Rows)
{
if (row.Index > 1)
{
worksheet.Rows[row.Index - 1].SetHeight(new RowHeight(55, true));
}

foreach (var cell in row.Cells)
{
if (row.Index == 1 || cell.ColIndex != 2)
{
worksheet.Cells[cell.Index.Y - 1, cell.Index.X - 1].SetValue(cell.Value.ToString());
}
else
{
FloatingImage image = new FloatingImage(worksheet, new CellIndex(cell.Index.Y - 1, cell.Index.X - 1), 0, 0);
Stream stream = File.Open(Server.MapPath(cell.Value.ToString()), FileMode.Open);
using (stream)
{
image.ImageSource = new Telerik.Windows.Documents.Media.ImageSource(stream, "jpg");
}
worksheet.Shapes.Add(image);
}
}
}

byte[] data;

using (MemoryStream ms = new MemoryStream())
{
XlsxFormatProvider xlsProvider = new XlsxFormatProvider();
xlsProvider.Export(workbook, ms);
data = ms.ToArray();
}

Response.ContentType = "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet";
Response.Headers.Remove("Content-Disposition");
Response.AppendHeader("Content-Disposition", "attachment; filename=" + RadGridLista.ExportSettings.FileName + ".xlsx");
Response.BinaryWrite(data);
Response.End();
}
Bug Report by Attila Antal Status: New Comments: 0 Category: RadGrid Scheduled for: Not Scheduled Last update: 2018-11-08T14:27:31 by Attila Antal
0
Dimitar Goshev
Team Member

CloudUpload progress shows more than 100% when uploading a file

Affects RadCloudUpload and RadAsyncUpload combined with RadProgressArea. Manifests most often on slow networks or very large files.
Scroll down for workarounds for both cases.

WORKAROUND FOR PROGRESS AREA is to round down the data, as it seems the server reports more bytes uploaded than they actually are, and that tends to happen under slow network conditions

<telerik:RadAsyncUpload RenderMode="Lightweight" runat="server" ID="RadAsyncUpload1" MultipleFileSelection="Automatic" EnableInlineProgress="false" />
<telerik:RadProgressManager runat="server" ID="RadProgressManager1" />
<telerik:RadProgressArea RenderMode="Lightweight" runat="server" ID="RadProgressArea1" OnClientProgressUpdating="OnClientProgressUpdating" />
<script>
function OnClientProgressUpdating(sender, args) {
//debugger
if (args._progressData.PrimaryPercent > 100) {
args._progressData.PrimaryPercent = 100;
}
if (args._progressData.PrimaryValue > args._progressData.PrimaryTotal) {
args._progressData.PrimaryValue = args._progressData.PrimaryTotal;
}
console.log(args.get_progressData());
}
</script>

WORKAROUND FOR CLOUD UPLOAD is to add the following script at the end of the form that will override the built-in XHR handilng to change the way the totals are calculated:

<script>
Telerik.Web.UI.RadCloudUpload.HandlerUploader.prototype._initializeXmlHttpRequest = function () {
this._xhr = new XMLHttpRequest();

var that = this,
module = this._module,
xhr = this._xhr;

xhr.onreadystatechange = function readyStateChanged() {
if (xhr.readyState == 4) {
if (xhr.status == 200) {
that._successfulResponseStatus(xhr);
}
else if (xhr.status != 0) {
that._failedResponseStatus(xhr);
}
}
};

xhr.upload.onprogress = function (event) {
that._uploadedSize += event.loaded;

var percents = Math.round((event.loaded / event.total) * 100) + "%";

module._renderingManager.updateRowProgress(that._uploadingEntity.row, percents, true);
};
}
</script>
Bug Report by Dimitar Goshev Status: Approved Comments: 0 Category: RadCloudUpload Scheduled for: Not Scheduled Last update: 2018-11-07T15:31:52 by Dimitar Goshev
0
Veselina Raykova
Team Member

Hidden columns are shown on resize when the static headers and frozen column are used

Hidden columns are shown on resize when the static headers and frozen column are used.

Video: https://www.screencast.com/t/4Lwuvbp7


Possible workarounds:

- Hide the column with Visible="False", instead of Display="False"

- Hide the column on the client-side:



function gridCreated(sender, args) {
var masterTableView = sender.get_masterTableView();
columnIndex = masterTableView.getColumnByUniqueName("ShipName").get_element().cellIndex;
setTimeout(function () {
masterTableView.hideColumn(columnIndex);
}, 2);
}




Steps to reproduse:

<telerik:RadGrid RenderMode="Lightweight" HeaderStyle-Width="200px"
AutoGenerateColumns="false"
ID="RadGrid1"
OnNeedDataSource="RadGrid1_NeedDataSource"
Width="100%"
runat="server">
<ClientSettings>
<Scrolling AllowScroll="True" UseStaticHeaders="true" FrozenColumnsCount="2"></Scrolling>
</ClientSettings>
<MasterTableView AutoGenerateColumns="false">
<Columns>
<telerik:GridBoundColumn DataField="SongID" HeaderText="SongID" FilterControlWidth="50px" HeaderStyle-Width="50px">
</telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="SongTitle" HeaderText="Song Title" FilterControlWidth="200px"></telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="CollectionName" HeaderText="Collection Name" FilterControlWidth="200px"></telerik:GridBoundColumn>
<telerik:GridBoundColumn FilterControlWidth="50px" DataField="VersionID" HeaderText="VersionID" Display="false"></telerik:GridBoundColumn>
</Columns>
</MasterTableView>
</telerik:RadGrid>

Code Behind:

protected void RadGrid1_NeedDataSource(object sender, GridNeedDataSourceEventArgs e)
{
(sender as RadGrid).DataSource = GetData();
}

private DataTable GetData()
{
DataTable dt = new DataTable();
dt.Columns.Add("SongID");
dt.Columns.Add("SongTitle");
dt.Columns.Add("CollectionName");
dt.Columns.Add("VersionID");

for (int i = 0; i < 20; i++)
{
dt.Rows.Add(i, i + 1, i + 2, i + 3);
}

return dt;
}


Bug Report by Veselina Raykova Status: In Development Comments: 0 Category: RadGrid Scheduled for: R1 2019 Last update: 2018-11-05T12:04:12 by Milena Chikova
0
Kostadin Dimitrov
Team Member

Hiding columns when exporting RadGrid with multi-column headers to binary Excel formats breaks the layout

Bug Report by Kostadin Dimitrov Status: In Development Comments: 7 Attachments: 1 Category: RadGrid Scheduled for: R3 2016 Last update: 2018-11-04T22:22:41 by Natondra Phil
0
Displaying items 1 - 10 of 1571