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
I have a grid that lists some records that have a column called Status. The initial state of the grid does not include any records with a status of "Finished" but I want to allow the user to remove that filter as they need to.
When I use the code below it does not allow me to set a default filter in the grid which can be removed by the end user.
private async Task OnStateInitHandler(GridStateEventArgs<FlagVM> args)
{
var cfd = new CompositeFilterDescriptor()
{
FilterDescriptors = new FilterDescriptorCollection()
{
new FilterDescriptor() { Member = "Status/Name", Operator = FilterOperator.DoesNotContain, Value = "Finished", MemberType = typeof(string) }
},
LogicalOperator = FilterCompositionLogicalOperator.And
};
var state = new GridState<FlagVM>
{
FilterDescriptors = new List<IFilterDescriptor>() {}
};
state.FilterDescriptors.Add(cfd);
args.GridState = state;
}
I've also tried something like this with no luck. I basically want to set the UI filter to an initial state for the user.
protected async Task SetGridDefaultFilter()
{
GridState<FlagVM> desiredState = new()
{
FilterDescriptors = new List<IFilterDescriptor>()
{
new CompositeFilterDescriptor(){
FilterDescriptors = new FilterDescriptorCollection()
{
new FilterDescriptor() { Member = "Status/Name", Operator = FilterOperator.DoesNotContain, Value = "Approved", MemberType = typeof(string) }
},
LogicalOperator= FilterCompositionLogicalOperator.And
}
}
};
await GridRef.SetState(desiredState);
Hi,
I am using Telerikgrid to display the data which I am loading from database.
At a time there can be only couple of 100 records return from database. There is no custom formatting or any calculation when loading the data in the grid. I am not using the paging.
I am still seeing the records are loading in the grid very slowly.
What can be done to improve the performance?
Thanks & regards,
Afreen

Hi,
I am using the Telerikgrid in my code to display the data. I have also implemented the SelectedItemsChanged event to handle and updating a value in the IEnumerable list. The problem which I am facing is the following:
When I am checking or unchecking the TelerikgridCheckboxColumn the SelectedItemsChanged event is firing only on the items which are displaying on the current page not the entire list.
I want this event should fire for all the items in the list not just on the current page.
Can you please help to fix this issue? Do I need to set some property of the Telerikgrid?
Thanks,
Afreen

I am using Telerik.UI.for.Blazor version 4.1.0. I recently cleared my nuget cache, and started getting the error noted below. I have already followed the procedure to clear nuget cache and re-install Telerik.UI.for.Blazor, but I keep getting this build error. This is happening on pages that are using Grid, at line:
var datasourceResult = folderStructure.ToDataSourceResult(args.Request);error CS0012: The type 'DataSourceRequest' is defined in an assembly that is not referenced. You must add a reference to assembly 'Telerik.DataSource, Version=2.1.3.0, Culture=neutral, PublicKeyToken=29ac1a93ec063d92'.
