Sometimes, we just want a simple equal filter in grid, without operators options
---
ADMIN EDIT
If you want to modify the current behavior and layout of the filters, use the filter template (there is another example in this thread - in the post from 29 Jun 2020 that you can also use as base).
---
Hello,
If the Grid has X columns at first, and then it renders Y more columns, the new Y columns will not be resizable. Here is a test page.
A possible workaround is to define all columns initially, but hide some of them with Visible="false".
This worked in 2.29 and broke in 2.30.
If you create a second Grid on the page, it will clear the SearchBox input value of the first Grid.
<p><TelerikButton OnClick="@ToggleSecondGrid">Toggle Second Grid</TelerikButton></p>
<TelerikGrid Data="@GridData">
<GridToolBar>
<GridSearchBox />
</GridToolBar>
<GridColumns>
<GridColumn Field=@nameof(Product.ProductName) Title="Product Name" />
</GridColumns>
</TelerikGrid>
@if (ShowSecondGrid)
{
<TelerikGrid Data="@( new List<Product>() )">
<GridColumns>
<GridColumn />
</GridColumns>
</TelerikGrid>
}
@code {
List<Product> GridData { get; set; }
bool ShowSecondGrid { get; set; }
async Task ToggleSecondGrid()
{
ShowSecondGrid = !ShowSecondGrid;
}
protected override void OnInitialized()
{
GridData = new List<Product>();
for (int i = 1; i <= 5; i++)
{
GridData.Add(new Product()
{
ProductId = i,
ProductName = "Product " + i.ToString(),
UnitPrice = (decimal)(i * 3.14),
UnitsInStock = (short)(i * 1),
Discontinued = false
});
}
}
public class Product
{
public int ProductId { get; set; }
public string ProductName { get; set; }
public decimal? UnitPrice { get; set; }
public short? UnitsInStock { get; set; }
public bool Discontinued { get; set; }
}
}
Grid virtual scrolling will freeze in the following scenario:
How can I get the tooltips for validation of each field displayed at the corresponding field in a Grid Popup form, not just the summary below the Form, etc?
---
ADMIN EDIT
---
This will be handled through exposing an option to set your preferred field validation message type - tooltip or inline. It will cover all edit modes (Popup, Inline, InCell).
If you want to remove the ValidationSummary after adding field validation messages, check the ability to remove ValidationSummary from the Popup edit form.
Here is the scenario:
In version 2.30 there is no longer need for an explicit blur handler for the in-cell editor template. The editor template closes automatically when the user selects a value from the DropDownList. However, the new value is ignored.
REPL test page: https://blazorrepl.telerik.com/mFbcmQvs16Lf1jwv18
Hi
I have a question regarding the telerik grid component particularly the hierarchy. Is it possible to open a hierarchy programmatically? For example:
I have my grid with information. Every row have more information to show. Those are stored in a hierarchy level to this row. Can I, instead of clicking the '+'-button in the row, just open it with with a method that i call e.g. in another button?
I want to make the rows clickable, i saw in the forum that this isn't yet supported for the grid. Now, I'm placing a div-Tag in the DetailTemplate of this row, and give that div a onclick-Attribute. The method the div invokes, should open the row for me respectively show the hierarchy of this row.
Is this possible?
thanks for your support.
regards
Ali Shala
When a user clicks outside of the edited input in the same cell, the cell remains in edit mode. The problem occurs in the 2.30.0 version.
You can see this behavior in the Incell Editing demo.
The TelerikGrid is kind of missing a "None" Value in the enum for the EditMode.
We need to disable the edit mode based on a value from the model (role access restricted), and I don't see any way this is possible without copy-pasting the entire grid under an if statement.
------ADMIN EDIT-------
A possible workaround at the moment is to set the "Editable" parameter of the columns to "false" or not use a command column with "edit".
Another workaround can be to attach a OnEdit handler and cancel the event based on the view model flag only. If the user cannot edit - always cancel.
I have a filterable DropDownList in a Grid EditorTemplate. The edit mode is InCell.
When the user opens the dropdown, the edited cell closes immediately with an OnUpdate call. The DropDownList value can be changed only with the keyboard or if I disable DropDownList filtering.
===
The same problem occurs with any component that uses a popup and the popup can gain focus - ComboBox, ColorPicker, etc.
Try to dynamically switch between Scrollable and Virtual modes. You would need to manually refresh the Skip property through the Grid state, or it won't work.
-----------ADMIN EDIT------------
You can use the ValueChanged handler to manually refresh the Skip property as shown below.
public TelerikGrid<ExpandoObject> TelerikGrid { get; set; }
private bool IsPageable = false;
private int Page { get; set; }
public void ChangeHandler(bool value)
{
//Sync the paging with scrolling
if (value)
{
IsPageable = value;
var state = TelerikGrid.GetState();
state.Skip = 0;
state.Page = 3;
_ = TelerikGrid.SetState(state);
}
IsPageable = value;
StateHasChanged();
}
Using mobile browser (Safari iOS or Chrome Android)
Go to demo grid page
https://demos.telerik.com/blazor-ui/grid/overview
Click any grid's filter menu which contains text field
Try to enter text into textbox.
The filter menu automatically closed, so you can't enter anything
---
ADMIN EDIT
this happens because the keyboard pops up, changes the screen size and may even scroll the page, and both of these events hide the popup menu.
A workaround could be using the filter row mode, with the caveat that it takes up more space on the initial rendering, and that filtering happens immediately.
---