Комментарии:
Hello Sir, i want to add OnRowClick="OnRowClicked" event, please tell me how can i do?
Below is my code, but i am getting Error
@using BlazorApp1.Client.Models
@page "/"
<Table Items="@twoColumnDataList" OnRowClick="OnRowClicked">
<Columns>
<Column Name="Column1" Label="Column1"/>
<Column Name="Column2" Label="Column2"/>
</Columns>
</Table>
@code{
IList<TwoColumnData> twoColumnDataList;
protected override void OnInitialized()
{
// Creating the IList with two items
twoColumnDataList = new List<TwoColumnData>
{
new TwoColumnData { Column1 = "Value 1A", Column2 = "Value 1B" },
new TwoColumnData { Column1 = "Value 2A", Column2 = "Value 2B" }
};
}
private void OnRowClicked(TwoColumnData twocolumnData)
{
}
}
below is table content
@attribute [CascadingTypeParameter(nameof(TItem))]
@typeparam TItem
@if (Items == null)
{
<p><em>Loding....</em></p>
}
else
{
<table class="table">
<thead>
<tr>
@Columns(default(TItem))
</tr>
</thead>
<tbody>
@foreach (var item in Items)
{
<CascadingValue Value="item">
<tr @onclick="() => OnRowClick.InvokeAsync(item)">
@Columns(item)
</tr>
</CascadingValue>
}
</tbody>
</table>
}
@code {
[Parameter]
public IList<TItem> Items { get; set; }
[Parameter]
public RenderFragment<TItem>? Columns { get; set; }
[Parameter]
public EventCallback<TItem> OnRowClick { get; set; }
}
Error: Argument 2: cannot convert from 'method group' to 'Microsoft.AspNetCore.Components.EventCallback'
Git hub link for complete custom Grid (pagination, sorting)
ОтветитьGreat Video - Between one question - what if we need to have action button on particular column, let's say Delete or Edit on each row, How we can able to manage the event and action ? Since you are appending @Columns(item) in the table body section how we can mention there is a special event for a single column ?
ОтветитьPractical and useful. Thankful
ОтветитьHi great video. I have a MudDataGrid and i would like to have an event on row-cell click. I want the particular cell that was clicked. Any change anyone know how to do this?
ОтветитьClear explanation of principles and at a good slow pace to help Blazor novices like me to follow 👍
ОтветитьGood articles!
Have you thought about creating a github account? Maybe better than google drive?
Heck yeah! Lots of concepts covered practically with clear reasons why.
Ответитьسلام مهندس عزیز
وقتتون بخیر
خیلی متشکرم از اینکه این ویدئوی مفید رو آپلود کردین
من توی برنامه خودم میخوام که یه TEntity رو به صورت پارامتر به یه کامپوننت ارسال کنم ولی هر کاری کردم نشد.
پیشنهاد شما چی هست؟
Very well explained.
Really informative.
Keep up the good work.
Thanks.
Will there be a follow up to implement the paging?
ОтветитьI couldn't find a guide this in depth anywhere else, I appreciate your video! It was very helpful.
ОтветитьGood work. 👍
ОтветитьGreat video tutorial, keep the good work
I'm new to your channel, where can I download the source code to play around with it?
Best Regards
Just AMAZING 😍..
Keep coding
Thank you so much.
I think this is what I've been looking for. Thank you
ОтветитьHi
The CRUD operations do not show how the images are saved in the database ?
Thanks
request you to make it inline editable with blazor custom textbox component. please..
ОтветитьMagnificent 👏
Ответить