Please add a setting for the Grid in batch edit mode to enable prompting to save changes. The prompt should occur when navigating away from the page, when paging, when filtering, when refreshing, or any other action that would cause loss of changes without a save. For details on how I implemented this manually, please see ticket 933229.
<telerik:RadAjaxPanel runat="server" ID="panel" LoadingPanelID="RadAjaxLoadingPanel1" RenderMode="Inline" EnableAJAX="true">
<div class="row">
<asp:Button runat="server" ID="btnLoad" Text="Load Data" OnClick="btnLoad_Click" />
</div>
<telerik:RadGrid runat="server" ID="radGrid" CssClass="radgrid" Skin="Bootstrap"
ClientSettings-Scrolling-AllowScroll="true"
ClientSettings-Scrolling-ScrollHeight="800"
ClientSettings-Scrolling-UseStaticHeaders="true"
ClientSettings-EnableAlternatingItems="false"
HeaderStyle-Wrap="false" AllowPaging="true" PageSize="50"
ItemStyle-Wrap="false" AllowSorting="true"
OnNeedDataSource="radGrid_NeedDataSource" AllowMultiRowSelection="false"
HeaderStyle-BackColor="White">
<ClientSettings>
<Selecting AllowRowSelect="true" />
</ClientSettings>
<MasterTableView>
<Columns>
<telerik:GridTemplateColumn UniqueName="colEdit" AllowFiltering="false" Exportable="false">
<ItemTemplate>
<asp:LinkButton CssClass="link-button" runat="server" ID="btnEdit">Edit</asp:LinkButton>
</ItemTemplate>
</telerik:GridTemplateColumn>
<telerik:GridTemplateColumn UniqueName="colDelete" AllowFiltering="false" Exportable="false">
<ItemTemplate>
<asp:LinkButton CssClass="link-button" ID="btnDelete" runat="server">Delete</asp:LinkButton>
</ItemTemplate>
</telerik:GridTemplateColumn>
</Columns>
</MasterTableView>
</telerik:RadGrid>
</telerik:RadAjaxPanel>
protected void Page_Load(object sender, EventArgs e)
{
if (!Page.IsPostBack)
{
radGrid.Visible = false;
}
}
protected void btnLoad_Click(object sender, EventArgs e)
{
radGrid.Visible = true;
radGrid.Rebind();
}
protected void radGrid_NeedDataSource(object sender, Telerik.Web.UI.GridNeedDataSourceEventArgs e)
{
var grid = sender as RadGrid;
grid.DataSource = LoadData();
}
private DataTable LoadData()
{
DataTable tbl = new DataTable();
tbl.Columns.Add(new DataColumn("ADFAFD", typeof(string)));
tbl.Columns.Add(new DataColumn("ADFADFADF", typeof(string)));
tbl.Columns.Add(new DataColumn("ADFADFADFADFASDF", typeof(string)));
tbl.Columns.Add(new DataColumn("HGDH", typeof(string)));
tbl.Columns.Add(new DataColumn("ADFADF ADFADFADF", typeof(string)));
tbl.Columns.Add(new DataColumn("ADF ADSFADF", typeof(string)));
tbl.Columns.Add(new DataColumn("FKHDGJHFGJH", typeof(string)));
tbl.Columns.Add(new DataColumn("SHFSFHSGH", typeof(string)));
tbl.Columns.Add(new DataColumn("ADF ASDFASDF ASDFADSF", typeof(string)));
tbl.Rows.Add(new object[] { "ADFADF", "ASDFADFAFD", "ADFADF", "ADFADFADF ADFADFADFADF ADFADF ADFADFADF ADFADFADFADF ADFADF", "ADFADF", "ASDFADFAFD", "ADFADF", "ADFADFADF ADFADFADFADF ADFADF"});
tbl.Rows.Add(new object[] { "ADFADF", "ASDFADFAFD", "ADFADF", "ADFADFADF ADFADFADFADF ADFADF", "ADFADF", "ASDFADFAFD", "ADFADF", "ADFADFADF ADFADFADFADF ADFADF"});
return tbl;
}
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
We have a RadGrid, which has a set of columns, lets say C1 to CN. Some of those columns are invisible and can be made visible with the Columns context menu, your control provides. Assume a column Ci, that is not visible now. If there exists a visible column Cx with x > i, your control works as expected. The column spans of the headline are ok. See GoodCase_Step.jpg If there is no visible column Cx with x > i and Ci is switched visible, your column spans within the headline become completely invalid. See BadCase.jpg_Step.jpg We use Version 2017.3.913.45 of your library. Thanks for your Support!
There is some undesirable behavior that has been discovered by our users regarding APS.Net RadGrid when filtering with the checkbox list. I have seen that the issue also happens on the Telerik Demo page found here and will use it as the example: https://demos.telerik.com/aspnet-ajax/grid/examples/functionality/filtering/basic-filtering/defaultcs.aspx
If you go to the last demo on that page (Filtering with Client-Side Binding) select the filter for Country. When the checkbox items appear, click on an item, however do not click on the checkbox. What happens is the dropdown closes and nothing happens. The demo however is for cliet side binding which is does not postback to the server. Our control is handled on the server-side so when this happens a request is sent and the user is presented with the loading circle which makes the user think something is actually happening, yet it is not.
I suggest that the behavior of clicking on an item, outside of the checkbox, checks the box and keeps the list open.
At the least, there should be no request that is sent to the server as the box was not actually checked with the current behavior.
I have attached an image with a red 'X' on where a user may click to reproduce this behavior.
Please provide the ability to customize the way filtering works when RenderMode=Mobile. Allows for template filtering, and ColumnHeader filtering similar to Lightweight rendering.
The horizontal line just above the group header:
To reproduce the issue enable RowSelect and RowsDragDrop ClientSettings, and attach OnRowDropping event listener
<ClientSettings AllowRowsDragDrop="true">
<Selecting AllowRowSelect="true" />
<ClientEvents OnRowDropping="function() {alert('RowDrooping event fired!');}"/>
</ClientSettings>
Links inside RadGrid are failing Contrast tests with ANDI tool:
<telerik:RadButton runat="server" ID="RadButton1" Text="Hide Grids with no Contrast issues" AutoPostBack="false" OnClientClicked="OnClientClicked" />
<script>
function OnClientClicked(sender, args) {
var $ = $ || $telerik.$;
var failingSkins = []
$(".RadGrid").each(function () {
var grid = $(this)
if (grid.find(".ANDI508-element-danger").length == 0) {
grid.parent().hide();
} else {
failingSkins.push(grid.parent().find(".label").text())
}
})
console.log(failingSkins)
}
</script>
<a href="javascript:void((function(){andiScript=document.createElement('script');andiScript.setAttribute('src','https://www.ssa.gov/accessibility/andi/andi.js');document.body.appendChild(andiScript)})());">Run ANDI tool</a>
<br />
<telerik:RadSkinManager ID="RadSkinManager1" runat="server"></telerik:RadSkinManager>
<asp:Repeater runat="server" ID="Repeater1" OnItemDataBound="Repeater1_ItemDataBound">
<SeparatorTemplate>
<hr />
</SeparatorTemplate>
<ItemTemplate>
<div class="container">
<asp:Label Text="Label1" CssClass="label" ID="Label1" runat="server" />
<telerik:RadGrid ID="RadGrid1" RenderMode="Lightweight" runat="server" AllowPaging="True" CellSpacing="0"
GridLines="None" Width="800px" PageSize="10" OnNeedDataSource="RadGrid1_NeedDataSource"
AllowSorting="true">
<MasterTableView AutoGenerateColumns="False" DataKeyNames="OrderID">
<Columns>
<telerik:GridHyperLinkColumn DataTextField="ShipName" DataNavigateUrlFields="OrderID" DataNavigateUrlFormatString="https://google.com/search?q={0}" Target="_blank"></telerik:GridHyperLinkColumn>
</Columns>
</MasterTableView>
</telerik:RadGrid>
</div>
</ItemTemplate>
</asp:Repeater>
protected void Page_Load(object sender, EventArgs e)
{
Repeater1.DataSource = RadSkinManager1.GetSkinChooser().Items;
Repeater1.DataBind();
}
protected void RadGrid1_NeedDataSource(object sender, GridNeedDataSourceEventArgs e)
{
(sender as RadGrid).DataSource = Enumerable.Range(1,70).Select(x=> new { OrderID = x, ShipName = "Ship name #" + x });
}
protected void Repeater1_ItemDataBound(object sender, RepeaterItemEventArgs e)
{
var grid = e.Item.FindControl("RadGrid1") as RadGrid;
if (grid != null)
{
var skin = (e.Item.DataItem as RadComboBoxItem).Text;
grid.Skin = skin;
(e.Item.FindControl("Label1") as Label).Text=skin;
}
}
Reproduction steps:
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:
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
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 !
Default values are provided for fields with non-string type in insert mode when RadGrid is bound using Model Binding. The reason behind it, is that the Insert item of the RadGrid is being bound similar to the edit Item and values are then provided by the framework. Please create an option to remove the default values when inserting a new record.
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...
<
telerik:RadGrid
ID
=
"RadGrid1"
runat
=
"server"
>
<
MasterTableView
>
<
Columns
>
<
telerik:GridClientDeleteColumn
CommandName
=
"Delete"
ButtonType
=
"LinkButton"
></
telerik:GridClientDeleteColumn
>
</
Columns
>
</
MasterTableView
>
<
ClientSettings
>
<
ClientEvents
OnCommand
=
"OnCommand"
/>
</
ClientSettings
>
</
telerik:RadGrid
>
function
OnCommand(sender, args) {
}
Would be great if font awesome could be used for the radgrid edit/delete/ icons etc....