How to handle Table row selected changed?

前端 未结 2 1115
清酒与你
清酒与你 2021-01-29 05:26

How to handle row selected changed event for a table using Blazor? I tried handling @onchange as well as @onselectionchange. The syntax for the table looks like this:

2条回答
  •  盖世英雄少女心
    2021-01-29 06:07

    You can use Onclick in the row:

      
                @foreach (var item in Forecasts)
                {
                  
                    
                        @item.Date
                        
                        @item.TemperatureC
                        @item.TemperatureF
                        @item.Summary
                    
                    }
                
    

    and create a Dosomething to receive the item

提交回复
热议问题