Unplanned
Last Updated: 03 Jun 2020 10:54 by ADMIN

Bug report

When I use TimePicker in GridDateTimeColumn it works fine in a normal browser but fails on mobile with the following error "Value must be 00:00 or earlier"

This works fine from Firefox, but when I use a mobile browser I get the following error "Value must be 00:00 or earlier" or "Value must be 12:00 AM or earlier".

 

Reproduction of the problem

 

Markup

<telerik:RadGrid ID="RGTimesheet" runat="server" OnNeedDataSource="RGTimesheet_NeedDataSource" RenderMode="Mobile"
    AllowAutomaticInserts="True" AllowAutomaticUpdates="True" AllowAutomaticDeletes="True"
    Skin="MetroTouch"
    Width="100%" AllowSorting="True" GroupPanelPosition="Top">
    <ClientSettings>
        <Scrolling AllowScroll="True" UseStaticHeaders="True"></Scrolling>
    </ClientSettings>
    <MasterTableView AutoGenerateColumns="False" CommandItemDisplay="Bottom" DataKeyNames="OrderID" ShowFooter="True">
        <Columns>
            <telerik:GridEditCommandColumn ButtonType="FontIconButton">
            </telerik:GridEditCommandColumn>
            <telerik:GridClientDeleteColumn ButtonType="FontIconButton">
            </telerik:GridClientDeleteColumn>

            <telerik:GridDateTimeColumn DataField="Start" DataType="System.TimeSpan" EditDataFormatString="hh:mm:ss tt" HeaderText="Start" SortExpression="Start" UniqueName="Start" PickerType="TimePicker">
            </telerik:GridDateTimeColumn>
            <telerik:GridDateTimeColumn DataField="Finish" DataType="System.TimeSpan" HeaderText="Finish" SortExpression="Finish" UniqueName="Finish" PickerType="TimePicker">
            </telerik:GridDateTimeColumn>

        </Columns>
        <EditFormSettings>
            <EditColumn UniqueName="EditCommandColumn1" ButtonType="PushButton">
            </EditColumn>
        </EditFormSettings>
    </MasterTableView>
</telerik:RadGrid>

 

C# - Markup

private DataTable OrdersTable()
{
    DataTable dt = new DataTable();

    dt.Columns.Add(new DataColumn("OrderID", typeof(int)));
    dt.Columns.Add(new DataColumn("Start", typeof(TimeSpan)));
    dt.Columns.Add(new DataColumn("Finish", typeof(TimeSpan)));

    dt.PrimaryKey = new DataColumn[] { dt.Columns["OrderID"] };

    for (int i = 0; i < 10; i++)
    {
        int index = i + 1;

        DataRow row = dt.NewRow();

        int hours = DateTime.Now.Hour;
        int minutes = DateTime.Now.Minute;
        int seconds = DateTime.Now.Second;

        row["OrderID"] = index;
        row["Start"] = new TimeSpan(hours, minutes, seconds);
        row["Finish"] = new TimeSpan(hours+index, minutes, seconds);

        dt.Rows.Add(row);
    }

    return dt;
}


protected void RGTimesheet_NeedDataSource(object sender, GridNeedDataSourceEventArgs e)
{
    RGTimesheet.DataSource = OrdersTable();
}

 

Unplanned
Last Updated: 01 Jun 2020 16:44 by ADMIN
Created by: Vasssek
Comments: 1
Category: Grid
Type: Feature Request
4
How is it possible to autofit / autosize a giving column (or all columns) when exporting the contents from RadGrid to xlsx using ExportStructure?

The only option available is Width with a defined value. I was unable to find an autofit / autosize function.

And also add AutoFilter feature...

Please consider to add this features :-)
Unplanned
Last Updated: 01 Jun 2020 16:37 by ADMIN
ADMIN
Created by: Marin Bratanov
Comments: 1
Category: Grid
Type: Feature Request
5
The behavior described in the following KB should be fixed https://www.telerik.com/support/kb/aspnet-ajax/grid/details/horizontal-scroll-speed-is-slow-with-static-headers

In the meantime, you can use the workarounds from the article, or, if it fits your scenario, move to scrolling horizontally through frozen columns via the Prev/Next buttons the grid can provide. You can find an example of that in the second grid (Navigate through the columns by clicking on the Prev/Next buttons) in the following demo: https://demos.telerik.com/aspnet-ajax/grid/examples/columns-rows/columns/frozen-columns/defaultcs.aspx
Unplanned
Last Updated: 01 Jun 2020 16:37 by ADMIN
Created by: Arnstein
Comments: 4
Category: Grid
Type: Feature Request
6
In RadGrid, we can use the ClientSettings.Scrolling.UseStaticHeaders property to have a fixed header when scrolling the grid. This requires a fixed height of the grid. However, what if we do not want a fixed height of the grid, but rather want the grid to flow down the page, using as much space as necessary do display its records. In such a scenario, the grid header will disappear when we scroll down the page.
I have implemented a kind of fix for this in one of my projects. Instead of trying to explain how it works, I have prepared an example. You can find it here:
http://www.ifag.no/RadGridHeader.aspx
Maybe some of you can suggest even better solutions to the scenario I have described. Comments are welcome!
Duplicated
Last Updated: 01 Jun 2020 16:36 by ADMIN
As shown in the attached screen, please keep the column headers Fixed or Visible so they are still visible when users scroll down to see the other data, for both RadGrid and PivotGrid:

Unplanned
Last Updated: 01 Jun 2020 16:00 by ADMIN
This feature request is regarding the ExportToExcel button in Radgrid.

ExportToExcel button in Radgrid adds an extra row in the exported excel sheet. This is due to the presence of Filtering items.

Export to Excel code in radgrid:

<ExportSettings ExportOnlyData="true" IgnorePaging="true" Excel-Format="Biff" OpenInNewWindow="True">
<Excel Format="Biff" AutoFitImages="True"></Excel>
        </ExportSettings>
<CommandItemSettings ShowAddNewRecordButton="False" ShowRefreshButton="False" ShowExportToExcelButton="True" ExportToExcelText="Export Grid To Excel"/>

The above code produces an extra row.

I know there is a fix by disabling the Filtering items in the grid in OnItemCommand event. So I used that. The code is given below:

protected void RadGrid1_ItemCommand(object sender, GridCommandEventArgs e)
        {
            if (e.CommandName == RadGrid.ExportToExcelCommandName)
            {
                ReviewByCollegeGrid.AllowFilteringByColumn = false;
                ReviewByCollegeGrid.Rebind();
                ReviewByCollegeGrid.ExportSettings.Excel.Format = GridExcelExportFormat.Biff;
                ReviewByCollegeGrid.ExportSettings.IgnorePaging = true;
                ReviewByCollegeGrid.ExportSettings.ExportOnlyData = true;
                ReviewByCollegeGrid.ExportSettings.OpenInNewWindow = true;
            }
        }
But it is a lot of work when you have to do it for all the web pages in your application. Please provide a feature which will help to solve this issue in an easier way.
Completed
Last Updated: 01 Jun 2020 15:53 by ADMIN
Created by: Mirang
Comments: 4
Category: Grid
Type: Feature Request
5
Hi,

Our Accessibility partner while evaluating our product for 508 compliance we got one report saying RadGrid control is not accessible. We do have enablearia attribute on the radgrid and is emitting the aria-attributes as mentioned in your demo. 
http://demos.telerik.com/aspnet-ajax/grid/examples/accessibility-and-internationalization/wai-aria-support/defaultcs.aspx

As per them : "So it does not alert the user that arrow keys may be used to navigate it".
I have attached a snippet of their report regarding radgrid accessibility. Can you please let me know if anything is missing.
Thanks and best regards,
Mirang
Completed
Last Updated: 29 May 2020 16:40 by ADMIN
Created by: Alan
Comments: 1
Category: Grid
Type: Feature Request
0
Currently when doing a Batch Edit with the Grid each row and cell must be updated with a new/edited value before saving.

Example: a User has a Grid containing records and would like to update several records because a Date field requires updating.

Can it be possible for the User to select the Rows they would like to update, Edit the Date Field(using the example above), but this time when Saved all records that were selected are updated. 

This solution may require a modal to be displayed that shows all fields available, similar to Edit/Insert grid Popup. The appropriate field is then updated and saved only to selected records.

This feature would save a lot of time by not having to edit each row individually then saving.
Unplanned
Last Updated: 29 May 2020 15:58 by ADMIN
ADMIN
Created by: Peter Milchev
Comments: 0
Category: Grid
Type: Bug Report
0
If AllowPaging, AllowScroll and UseStaticHeaders are set to true, then there will be 2 empty <th> elements

workaround: 
    <ClientSettings>
...
        <ClientEvents OnGridCreated="OnGridCreated" />
    </ClientSettings>

<script>
    function OnGridCreated(sender, args) {
        var emptyth = $telerik.$(sender.get_element())
            .find("th").filter(function (ind, item) { return item.textContent == "" });
        // alert(emptyth.length)
        emptyth.append("<span style='display:none'>Hidden empty table header</span>")
    }
</script>
Unplanned
Last Updated: 29 May 2020 15:53 by ADMIN
ADMIN
Created by: Attila Antal
Comments: 0
Category: Grid
Type: Bug Report
1
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();
        }
Unplanned
Last Updated: 29 May 2020 15:52 by ADMIN
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
Unplanned
Last Updated: 29 May 2020 15:15 by ADMIN
GridAttachmentColumn malforms the String filepath, from "C\SomePath\SomeFile.PDF" to something like "C:" & vbBack &"SomePathSomeFile.PDF"

Steps to reproduce the error:

DataSource Bound to grid:

Private Function SomeTable() As DataTable
    Dim dt As New DataTable()
 
    dt.Columns.Add(New DataColumn("FieldName", Type.GetType("System.String")))
 
    row("FieldName") = "C:\SomeDirectory\RadGridExport.pdf"
    dt.Rows.Add(row)
 
    Return dt
End Function

GridAttachmentColumn markup as well as the ObjectDataSource that returns a byte array when user clicks on download attachment:

<telerik:GridAttachmentColumn DataSourceID="ObjectDataSource1"
    HeaderText="Attachment Column"
    AttachmentKeyFields="FieldName"
    AttachmentDataField="FieldName"
    DataTextField="FieldName"
    UniqueName="FieldName"
    ButtonType="ImageButton"
    UploadControlType="RadAsyncUpload"
    FileName="RadGridExport.pdf"
    ImageUrl="pdf-icon.png"
    ItemStyle-Height="36px"
    ItemStyle-Width="36px" >
</telerik:GridAttachmentColumn>
                         
<asp:ObjectDataSource ID="ObjectDataSource1" runat="server" SelectMethod="MySelectMethod" TypeName="MyApp">
    <SelectParameters>
        <asp:Parameter Name="FieldName" Type="String" />
    </SelectParameters>
</asp:ObjectDataSource>

MyApp.MySelectMethod that is supposed access the file by "filePath" and read it to byte, but the filePath is malformed, hence throws an exception.

Public Class MyApp
    <DataObjectMethodAttribute(DataObjectMethodType.Select, True)>
    Public Function MySelectMethod(filePath As String) As DataTable
        Dim dt As New DataTable("Base")
        Dim col As New DataColumn("FieldName")
        col.DataType = System.Type.GetType("System.Byte[]")
        dt.Columns.Add(col)
        Dim row As DataRow = dt.NewRow
        row(0) = My.Computer.FileSystem.ReadAllBytes(filePath)
 
        dt.Rows.Add(row)
        Return dt
    End Function
End Class


Unplanned
Last Updated: 29 May 2020 14:31 by ADMIN

Description:

If RadGrid has UseStaticHeaders enabled, different HTML Tables are rendered and instructing JAWS to read the tables one by one will also read the Header. It would say Header with "n" number of columns and one rows, since the table has only one row and that is containing the Column Names.

Goal:

It would be great, if the grid with Static Header could be made in a way that JAWS will only treat the grid as one Table instead of two separate tables.

Workaround and discussion:


Unplanned
Last Updated: 08 May 2020 17:38 by ADMIN
Created by: Dan Avni
Comments: 0
Category: Grid
Type: Feature Request
1
When resizing a column in RTL, expectation is to use the left side of a column to expand/shrink it. Instead I have to use the right side. Grabbing the left side resizes the next column on the left and is very confusing for people who are used to think in RTL
Unplanned
Last Updated: 08 May 2020 17:22 by ADMIN
If anchor links of GridButtonColumn do not define a text links are still rendered and screen readers read their href attribute. Anchor links with no text could define an attribute area-hidden="true".
Completed
Last Updated: 08 May 2020 15:53 by ADMIN
Release R2 2020

Replicated when the ClickToOpen is enabled: 

protected void Page_Load(object sender, EventArgs e) { RadGrid1.HeaderContextMenu.ClickToOpen = true; }

WORKAROUND: Loading the following script under the script manager

<script>
    var original = Telerik.Web.UI.GridColumn.prototype._onContextMenuItemClicking;
    Telerik.Web.UI.GridColumn.prototype._onContextMenuItemClicking = function (sender, args) {
        original.call(this, sender, args);
                
        var item = args.get_item();
        var itemValue = item.get_value();
        if (itemValue == "FilterList" || itemValue == "FilterMenuContainer" ||
            itemValue == "AggregatesContainer" || itemValue == "FilterMenuParent" || itemValue == "ColumnsContainer" ||
            (Telerik.Web.UI.RadMenuItem.isInstanceOfType(item.get_parent()) && item.get_parent().get_value() == "ColumnsContainer")) {
            if (sender.get_clickToOpen()) {
                args.get_item().open();
            }
        }
    }
</script>

 

 

 

 

Unplanned
Last Updated: 07 May 2020 07:36 by ADMIN
Created by: Henrik
Comments: 0
Category: Grid
Type: Bug Report
1

When using iPad touch to open the header context menu of a grid column, an immediate postback prevents the opening of the menu when the RadGrid is in Mobile RenderMode. The reason is that this action gets recognized as dragging when AllowDragToGroup is enabled.

Unplanned
Last Updated: 08 Apr 2020 16:24 by ADMIN
Created by: Erik
Comments: 1
Category: Grid
Type: Feature Request
2
I would like to get a visual indiation on the grouppanel of the RadGrid for column which are not allowed to group on.

Forum reference:
http://www.telerik.com/forums/grouppanel-drop-indicator-style-of-not-groupable-columns#yjnsALhKekGuqD_Ze0Kmqw
Unplanned
Last Updated: 08 Apr 2020 16:18 by ADMIN
When Grouping in RadGrid while EnableLinqExpressions is set to True and some of the records contain null values will throw the exception: Object cannot be cast to DBNull
Unplanned
Last Updated: 08 Apr 2020 16:14 by ADMIN

If the Page culture is set to anything other than "en-US", RadDatePicker in the HeaderContextMenu will loose the correct format and swaps the Day with the Month after filtering.