Hi, is it posible to add ColumnReordered and ColumnResized to RadzenDropDownDataGrid?
The issue is that I cannot read the width and order changes of columns. RadzenDropDownDataGrid refRadzenDropDownDataGrid.DataGrid.ColumnsCollection does not reflect the modified width and order values.
@using RadzenBlazorDemos.Models.Northwind
@inherits DbContextPage
<RadzenStack Orientation="Orientation.Horizontal" AlignItems="AlignItems.Center" JustifyContent="JustifyContent.Center" Gap="0.5rem" class="rz-p-12">
<RadzenLabel Text="Select Value" Component="DropDownDataGridColumns" />
<RadzenButton Icon="info" Click=@(() => firstColSize = gridRef.DataGrid.ColumnsCollection.First().Width)/>
@firstColSize
<RadzenDropDownDataGrid @bind-Value=@value @ref=@gridRef Data=@customers TextProperty="@nameof(Customer.CompanyName)" ValueProperty="@nameof(Customer.CustomerID)"
AllowColumnResize="true" AllowFilteringByAllStringColumns="true" Name="DropDownDataGridColumns">
<Columns>
<RadzenDropDownDataGridColumn Property="@nameof(Customer.CustomerID)" Title="CustomerID" Width="100px" />
<RadzenDropDownDataGridColumn Property="@nameof(Customer.CompanyName)" Title="CompanyName" Width="200px" />
<RadzenDropDownDataGridColumn Property="@nameof(Customer.City)" Title="City" Width="100px" />
<RadzenDropDownDataGridColumn Property="@nameof(Customer.Country)" Title="Country" Width="100px" />
</Columns>
</RadzenDropDownDataGrid>
</RadzenStack>
@code {
string value = "AROUT";
IEnumerable<Customer> customers;
RadzenDropDownDataGrid<string> gridRef;
string firstColSize = string.Empty;
protected override async Task OnInitializedAsync()
{
await base.OnInitializedAsync();
customers = dbContext.Customers;
}
}
https://blazor.radzen.com/dropdown-datagrid#multiple-columns
You can use this code to check it.
It will be part of our release early next week:
https://github.com/radzenhq/radzen-blazor/commit/9e0a57ca5b79dacff4f5665f786d8aff1372048a
Hi, is it possible to add a ContextMenuDataGrid for the datagrid inside the DropDownDataGrid?
Can you clarify whatβs the goal?
Yes, I want to be able to add a ContextMenu to the DataGrid which inside the DropDownDataGrid.
Currently, the ContextMenu can only be called by clicking on the dropdown.
Sure! It will be part of our next update next week!