Hello all,
I am evaluating the Blazor controls for our company, and we are new to Blazor. We are converting from old ASP.NET webforms to Blazor. Since we do use the GridView a lot, I am trying to convert one of our grids to the Telerik grid. Currently, one of the business rules is they want to be able to hide rows based on a checkbox OnValueChanged. I do this on the old grid using JQuery and based on a value in a hidden field I hide the row or not.
While playing with the Telerik grid with in-cell editing, I was able to find that hiding a column is easy, but I have not found a way to loop through rows which I assume I cannot since it is client side. OnRowRender will not work because I need this to happen based on the checkbox value. So, basically is there a way to do this using strictly Blazor syntax with functionality from the grid, or will I need to use JQuery again?
Thanks for any guidance,
Jim
Hello,
I want to set the value of a tool tip based on a value of an item in my grid. I have tried this, but I get an error:
This is above all HTML taken from an example
<TelerikTooltip TargetSelector=".tooltip-target">
</TelerikTooltip>
<GridColumn Editable=false Locked=true Visible="@isIDVisible" Field=@nameof(ProductDto.ProductId) Title="ID" Width="150px">
<Template>
@{
var item = (ProductDto)context;
}
<TelerikButton ThemeColor="success" OnClick="() => SetAmtToAnotherCol(item)">Test</TelerikButton>
<br />
<TelerikButton FillMode="link" ThemeColor="info" Class="tooltip-target"
Title="(@item.UnitsInStock < 0) ? 'neg' : 'pos'"
OnClick="() => SetAmtToAnotherCol(item)">@item.UnitsInStock</TelerikButton>
</Template>
</GridColumn>I receive this error:
| RZ9986 | Component attributes do not support complex content (mixed C# and markup). Attribute: 'Title', text: '(item.UnitsInStock < 0) ? 'neg' : 'pos''
|
If I simply do this, it works:
Title=@item.UnitsInStock.ToString()
Is there a way for me to set a string based on a value?
Hello,
Now the TelerikTreeList component is rendered by default with the css class k-grid-md.
On the TelerikGrid component the Size can be set so the grid can be rendered with the css class k-grid-sm.
I would need the possibility to set on TelerikTreeList component the css class k-grid-sm.
How can that be achieved now?
Best regards,
Cipri

Like I mentioned in the subject a needs an Excel-Export that exports only the selected items/rows.
I found this article:
and it works fine. But it works only with the build in GridCommandButton. I need a programmatic Export like described in article
Any help ?
I would like to add a UI component that displays the current list of items that are selected in a multi-select listbox. As selections and deselections are made inside of the list box, those selections are also displayed or removed on a separate part of the page that is visible to the user.
Is there a demo available that shows doing something like this or is there a control that already implements this capability?
Thanks,
T
I am trying to show some grid-aggregates in a grid column footer without any groups. But I'm seeing that the grid is geting ALL the records in the database to compute the Agregates. I am using the OnRead event and a DbSet with the ToDataSourceResult() extension method.
This is unnacceptable as I have 50k rows in the DB! As you can imagine the aggregates take forever to compute in-memory, but in the DB it woul be a super quick.
Also, I am building a generic grid for all my pages, so I need it to be easy to abstract, FYI
Any alternatives or workarounds? Could we not build a ExpressionTree for the aggregates and use IQueriable?
Thanks in advance!
...
<GridColumns>
<GridColumn Field="@nameof(PedidosDeClientes.Unidades)" Title="Unidades" Width="150px">
<FooterTemplate>
Sum: @context.Sum;
</FooterTemplate>
</GridColumn>
<GridColumn Field="@nameof(PedidosDeClientes.PesoBruto)" Title="PesoBruto" Width="150px">
<FooterTemplate>
Sum: @context.Sum;
</FooterTemplate>
</GridColumn>
</GridColumns>
<GridAggregates>
<GridAggregate Field=@nameof(PedidosDeClientes.Unidades) Aggregate="@GridAggregateType.Sum" />
<GridAggregate Field=@nameof(PedidosDeClientes.PesoBruto) Aggregate="@GridAggregateType.Sum" />
</GridAggregates>
...
public async Task OnRead( GridReadEventArgs args )
{
var r = await dbContext.PedidosDeClientes.ToDataSourceResultAsync( args.Request );
args.Data = r.Data;
args.Total = r.Total;
args.AggregateResults = r.AggregateResults;
}
Hi,
I'm looking to subscribe to scrolling events in the data grid using JavaScript.
I've tried subscribing to the scroll event on the .k-grid and .k-grid-content elements, but the events don't happen
Is there a way to do this?
Thanks,
Oliver
Hello,
I got a new project going on, which includes unique design.
I am using Telerik grid for Blazor for functionality but trying to change the contents look.
I have managed to change the header row style like you can see above with the following code:
.k-grid-header-wrap{
border-radius:15px;
margin-block:5px;
}but the inside rows don't response to the CSS lines (except the background):
.k-master-row, .k-table-alt-row{
margin-block:15px;
background:#fff!important;
border-radius:15px!important;
}So the question is - is it possible to add margin between the girds lines and furthermore add more style properties (specific to the grids content)? and if yes, could someone please provide an example for this?
thanks ahead,
Michael.
It does not put double quotes around the value, there by messsing up the structure.
Is there a way to get the grid exporter to Put double quotes around string values?
Hi,
I am using telerikgrid control to display the employees information. I have telerikgridcheckboxcolumn which is bind to a IEnumerable list of employee who are eligible for promotion.
I am looking for a solution to disable this header checkbox when there is none of the employee is eligible for promotion.
Please see below my code snippet for Grid and Checkbox:
<TelerikGrid Data="ShipmentInfo" SelectionMode="GridSelectionMode.Multiple" SelectedItems="SelectedEmployees" Class="grid-no-scroll" Sortable="true" Size="Telerik.Blazor.ThemeConstants.Grid.Size.Medium" Resizable="true" Pageable="false" Height="55vh" ScrollMode="GridScrollMode.Scrollable" FilterMode="GridFilterMode.None" OnRowRender="@OnRowRenderHandler" SelectedItemsChanged="@((IEnumerable<EmployeeInfoDto> employeess) => SelectedItemsChanged(employees))">
<GridCheckboxColumn Title="Allow Promotion" SelectAll="true" CheckBoxOnlySelection="true" HeaderClass="@GetHeaderCssClass()"></GridCheckboxColumn>
private void SelectedItemsChanged(IEnumerable<EmployeeInfoDto> employees)
{
// Checkboxes are disabled for shipments that aren't allowed to be routed but we don't want the select all function to select unroutable shipments
// so remove any unroutable shipments from the given collection and set that to the SelectedItems collection
SelectedEmployees = employeess.Where(s => s.EligibleForPromotion).ToList();
}
Please can you help get my desired requirement.
Thanks & regards,
Afreen