Have built-in option to do LIKE filtering on grids.
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:
Currently the Width of the Edit controls inside the inline Edit form of the Grid can be set only in pixels. In order to be able to implement a responsive layout the developer has to be able to set the width of these controls in percentage.
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
<
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
>
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
The ability to freeze columns on the left in a RadGrid is a great feature. However freezing them from both the left AND right would be even better. I have a scenario where the far left column in a date field (which is frozen and works great). Then there are about 30 columns that scroll. The final column is a "totals" column for that week, and it would be great if that was frozen on the right so I don't need to scroll all the way over to see that column...
Using Entity Framework Code First and model binding in a RadGrid, in insert row there is a default value for all non-string types that are not nullable. For example "0" for Int or Decimal, "01/01/0001" for Date, etc... So we have to make code to clear these values in textboxs or make SQL requests to give a default value to RadComboBoxs linked to a Foreign Key. This does not happens using a FormView and model binding. This does not happens using a RadGrid and EntityDataSource . Please make an option to let all controls blank in insert mode without doing code !
Hello, I have Radgrid with editable & non editable columns. I edit a row. If I click an editable cell, it places the cursor within the editable cell. Its correct. But if I click a readonly cell, it places the cursor in the first editable cell of the line. If the readonly cell is the last cell of the line and if I click the readonly cell, it places the cursor in the first editable cell. If the grid column width is very large, the grid is scrolled to show the first editable cell, and I loose the data which I am visualizing. If I click in readonly cell, I want to open all the editable cells of the line, but the page should remain in same place. I don't want to place the cursor in any of the editable cells of the line. Example grid: I have a simple Radgrid with batch mode and edit type row. I have 3 columns id,name and age. Id and name columns are editable columns. Age column is non editable column. If I click on age column which is non editable , the focus moves to id column, which is the first editable column. If there many columns in my grid and if I click the last non editable column, the grid scrolls to first editable column, and I lose the focus of data which I am seeing. If I click in non editable column, I want the grid to remain in same place. This feature can be added as an option by adding property of grid ForceFocusinEdit. When ForceFocusinEdit= true, if we click in readonly column, focus moves to first editable column. When ForceFocusinEdit = false, if we click in readonly column, focus is in clicked cell. Please refer to Ticket ID: 1168296 for more informations. Thank you
Create a FilterControlEmptyMessage property so users can set an empty message in the grid filter textbox, much like the EmptyMessag property of RadTextBoxes. Ideally make it so this property can be accessed/modified client and server-side.
Forum threads on this topic:
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
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 :-)
I have a RadGrid with around 150 columns and a few hundred rows. Currently, I'm looping over them and setting their widths with the resizeColumn function. Unfortunately, it's triggering a recalculation of the layout every time I call this function, so the total page load time can be in the minutes. Oddly, much of the time was spent on the line: e.style.width=e.offsetWidth-d+"px"; Chrome's developer tools helpfully pointed me at Forced Reflow. Apparently, when a width is set, initially no extra work is done. When another width is requested, the previous width may have changed it, so the whole layout gets recalculated. The feature I'd like to request is a function to set column widths in bulk (accepting anything like an array or a dictionary would be fine) that doesn't trigger this recalculation mid-function.
At the moment, RTL support for excel like filtering is not implemented. It displays the following issues - menu position is wrong (tends to show up on the column to the left) - controls alignment inside the menu is wrong (ltr) You can find attached a sample and screenshots with the current behavior
In some cases, inside the Grid table, the tfoot element is rendered before the tbody element. This causes some readers to read the footer before the body.
A possible workaround is moving the tfoot after the tbody in the OnGridCreated event:
<script>
function OnGridCreated(sender, args) {
var $ = $telerik.$;
$('tfoot').each(function (index, item) {
var $item = $(item);
var $next = $item.next();
if ($next[0]) {
if ($next[0].tagName.toLowerCase() == "tbody") {
$item.insertAfter($next);
}
}
});
}
</script>
A forum discussion on the topic:
I think it would be a great addition to the grid control if there was an attribute that you could apply to the columns called "SortNullsLast" or something along those lines. This attribute would modify the grid's sorting functionality and only apply the ascending or descending sort to non-null values. Currently when you sort ascending, null values are sorted to the top of the grid. This new attribute would allow the non-null values to show up at the top in ascending order. An example of why this would be useful is having a grid that tracks an optional requested completion date of a task. You would want to be able to sort the grid so that the earliest date shows first in the grid. Right now, any records that don't have this optional date would show first, which doesn't make sense.
Provide a simple interface to showcase exactly in what order the columns have been sorted in (ex. 1, 2, 3, etc in column header) - matching the functionality in Kendo UI Grid: http://demos.telerik.com/kendo-ui/grid/sorting
I would like to suggest that the Buttons in the RadGrid allow databinding to the CommandName and CommandArgument fields. And pretty much all the buttons or anything that triggers an ItemCommand event that allow a CommandName and CommandArgument have their properties to be databound and accessible in the code behind. Thanks!!!
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
You would get something like (([createddate] >= '01/08/2017,00:00:00') AND ([createddate] <= '14/08/2017,23:59:59')) while you should get something like (([createddate] >= '01/08/2017 00:00:00') AND ([createddate] <= '14/08/2017 23:59:59')) so that the SQL syntax is valid. RadGrid, does not send the FilterExpression to the SqlDataSource, however. It executes the SELECT statement and then filters the resulting data on its own. This works fine. If you will be performing operations yourself, you could use a string operation before passing the filter expression. For example: protected void RadGrid1_NeedDataSource(object sender, GridNeedDataSourceEventArgs e) { if (!string.IsNullOrEmpty(this.RadGrid1.MasterTableView.FilterExpression)) { if (this.RadGrid1.MasterTableView.FilterExpression.Contains("createddate")) { this.RadGrid1.MasterTableView.FilterExpression = this.RadGrid1.MasterTableView.FilterExpression.Replace(",", " "); } DataView dv =GetData("select * from [myTable] where ", this.RadGrid1.MasterTableView.FilterExpression); //where you would need to have something like (([createddate] >= '01/08/2017 00:00:00') AND ([createddate] <= '14/08/2017 23:59:59')) this.RadGrid1.DataSource = dv; } } Note that implementing such a change may break existing code that relies on the current syntax that contains the comma.