@@ -33,6 +33,7 @@ public abstract class GridColumnBase<T> : GridStyledColumn, IGridColumn<T>, IExp
3333 public IList < Action < object > > CrudActions { get ; private set ; }
3434 public IList < Func < object , Task > > CrudFunctions { get ; private set ; }
3535 public object CrudObject { get ; private set ; }
36+ public bool EnableCard { get ; private set ; } = true ;
3637
3738 public Func < T , string > ValueConstraint { get ; private set ; }
3839 public string ValuePattern { get ; private set ; }
@@ -283,86 +284,86 @@ public IGridColumn<T> RenderComponentAs<TComponent>(IList<Action<object>> action
283284 return RenderComponentAs ( typeof ( TComponent ) , actions , functions , obj ) ;
284285 }
285286
286- public IGridColumn < T > RenderCrudComponentAs < TComponent > ( )
287+ public IGridColumn < T > RenderCrudComponentAs < TComponent > ( bool enableCard = true )
287288 {
288- return RenderCrudComponentAs < TComponent > ( null , null , null ) ;
289+ return RenderCrudComponentAs < TComponent > ( null , null , null , enableCard ) ;
289290 }
290291
291- public IGridColumn < T > RenderCrudComponentAs < TComponent > ( IList < Action < object > > actions )
292+ public IGridColumn < T > RenderCrudComponentAs < TComponent > ( IList < Action < object > > actions , bool enableCard = true )
292293 {
293- return RenderCrudComponentAs < TComponent > ( actions , null , null ) ;
294+ return RenderCrudComponentAs < TComponent > ( actions , null , null , enableCard ) ;
294295 }
295296
296- public IGridColumn < T > RenderCrudComponentAs < TComponent > ( IList < Func < object , Task > > functions )
297+ public IGridColumn < T > RenderCrudComponentAs < TComponent > ( IList < Func < object , Task > > functions , bool enableCard = true )
297298 {
298- return RenderCrudComponentAs < TComponent > ( null , functions , null ) ;
299+ return RenderCrudComponentAs < TComponent > ( null , functions , null , enableCard ) ;
299300 }
300301
301302 public IGridColumn < T > RenderCrudComponentAs < TComponent > ( IList < Action < object > > actions ,
302- IList < Func < object , Task > > functions )
303+ IList < Func < object , Task > > functions , bool enableCard = true )
303304 {
304- return RenderCrudComponentAs < TComponent > ( actions , functions , null ) ;
305+ return RenderCrudComponentAs < TComponent > ( actions , functions , null , enableCard ) ;
305306 }
306307
307- public IGridColumn < T > RenderCrudComponentAs < TComponent > ( object obj )
308+ public IGridColumn < T > RenderCrudComponentAs < TComponent > ( object obj , bool enableCard = true )
308309 {
309- return RenderCrudComponentAs < TComponent > ( null , null , obj ) ;
310+ return RenderCrudComponentAs < TComponent > ( null , null , obj , enableCard ) ;
310311 }
311312
312- public IGridColumn < T > RenderCrudComponentAs < TComponent > ( IList < Action < object > > actions , object obj )
313+ public IGridColumn < T > RenderCrudComponentAs < TComponent > ( IList < Action < object > > actions , object obj , bool enableCard = true )
313314 {
314- return RenderCrudComponentAs < TComponent > ( actions , null , obj ) ;
315+ return RenderCrudComponentAs < TComponent > ( actions , null , obj , enableCard ) ;
315316 }
316317
317- public IGridColumn < T > RenderCrudComponentAs < TComponent > ( IList < Func < object , Task > > functions , object obj )
318+ public IGridColumn < T > RenderCrudComponentAs < TComponent > ( IList < Func < object , Task > > functions , object obj , bool enableCard = true )
318319 {
319- return RenderCrudComponentAs < TComponent > ( null , functions , obj ) ;
320+ return RenderCrudComponentAs < TComponent > ( null , functions , obj , enableCard ) ;
320321 }
321322
322323 public IGridColumn < T > RenderCrudComponentAs < TComponent > ( IList < Action < object > > actions ,
323- IList < Func < object , Task > > functions , object obj )
324+ IList < Func < object , Task > > functions , object obj , bool enableCard = true )
324325 {
325- return RenderCrudComponentAs < TComponent , TComponent , TComponent , TComponent > ( actions , functions , obj ) ;
326+ return RenderCrudComponentAs < TComponent , TComponent , TComponent , TComponent > ( actions , functions , obj , enableCard ) ;
326327 }
327328
328- public IGridColumn < T > RenderCrudComponentAs < TCreateComponent , TReadComponent , TUpdateComponent , TDeleteComponent > ( )
329+ public IGridColumn < T > RenderCrudComponentAs < TCreateComponent , TReadComponent , TUpdateComponent , TDeleteComponent > ( bool enableCard = true )
329330 {
330- return RenderCrudComponentAs < TCreateComponent , TReadComponent , TUpdateComponent , TDeleteComponent > ( null , null , null ) ;
331+ return RenderCrudComponentAs < TCreateComponent , TReadComponent , TUpdateComponent , TDeleteComponent > ( null , null , null , enableCard ) ;
331332 }
332333
333- public IGridColumn < T > RenderCrudComponentAs < TCreateComponent , TReadComponent , TUpdateComponent , TDeleteComponent > ( IList < Action < object > > actions )
334+ public IGridColumn < T > RenderCrudComponentAs < TCreateComponent , TReadComponent , TUpdateComponent , TDeleteComponent > ( IList < Action < object > > actions , bool enableCard = true )
334335 {
335- return RenderCrudComponentAs < TCreateComponent , TReadComponent , TUpdateComponent , TDeleteComponent > ( actions , null , null ) ;
336+ return RenderCrudComponentAs < TCreateComponent , TReadComponent , TUpdateComponent , TDeleteComponent > ( actions , null , null , enableCard ) ;
336337 }
337338
338- public IGridColumn < T > RenderCrudComponentAs < TCreateComponent , TReadComponent , TUpdateComponent , TDeleteComponent > ( IList < Func < object , Task > > functions )
339+ public IGridColumn < T > RenderCrudComponentAs < TCreateComponent , TReadComponent , TUpdateComponent , TDeleteComponent > ( IList < Func < object , Task > > functions , bool enableCard = true )
339340 {
340- return RenderCrudComponentAs < TCreateComponent , TReadComponent , TUpdateComponent , TDeleteComponent > ( null , functions , null ) ;
341+ return RenderCrudComponentAs < TCreateComponent , TReadComponent , TUpdateComponent , TDeleteComponent > ( null , functions , null , enableCard ) ;
341342 }
342343
343344 public IGridColumn < T > RenderCrudComponentAs < TCreateComponent , TReadComponent , TUpdateComponent , TDeleteComponent > ( IList < Action < object > > actions ,
344- IList < Func < object , Task > > functions )
345+ IList < Func < object , Task > > functions , bool enableCard = true )
345346 {
346- return RenderCrudComponentAs < TCreateComponent , TReadComponent , TUpdateComponent , TDeleteComponent > ( actions , functions , null ) ;
347+ return RenderCrudComponentAs < TCreateComponent , TReadComponent , TUpdateComponent , TDeleteComponent > ( actions , functions , null , enableCard ) ;
347348 }
348349
349- public IGridColumn < T > RenderCrudComponentAs < TCreateComponent , TReadComponent , TUpdateComponent , TDeleteComponent > ( object obj )
350+ public IGridColumn < T > RenderCrudComponentAs < TCreateComponent , TReadComponent , TUpdateComponent , TDeleteComponent > ( object obj , bool enableCard = true )
350351 {
351- return RenderCrudComponentAs < TCreateComponent , TReadComponent , TUpdateComponent , TDeleteComponent > ( null , null , obj ) ;
352+ return RenderCrudComponentAs < TCreateComponent , TReadComponent , TUpdateComponent , TDeleteComponent > ( null , null , obj , enableCard ) ;
352353 }
353354
354- public IGridColumn < T > RenderCrudComponentAs < TCreateComponent , TReadComponent , TUpdateComponent , TDeleteComponent > ( IList < Action < object > > actions , object obj )
355+ public IGridColumn < T > RenderCrudComponentAs < TCreateComponent , TReadComponent , TUpdateComponent , TDeleteComponent > ( IList < Action < object > > actions , object obj , bool enableCard = true )
355356 {
356- return RenderCrudComponentAs < TCreateComponent , TReadComponent , TUpdateComponent , TDeleteComponent > ( actions , null , obj ) ;
357+ return RenderCrudComponentAs < TCreateComponent , TReadComponent , TUpdateComponent , TDeleteComponent > ( actions , null , obj , enableCard ) ;
357358 }
358359
359- public IGridColumn < T > RenderCrudComponentAs < TCreateComponent , TReadComponent , TUpdateComponent , TDeleteComponent > ( IList < Func < object , Task > > functions , object obj )
360+ public IGridColumn < T > RenderCrudComponentAs < TCreateComponent , TReadComponent , TUpdateComponent , TDeleteComponent > ( IList < Func < object , Task > > functions , object obj , bool enableCard = true )
360361 {
361- return RenderCrudComponentAs < TCreateComponent , TReadComponent , TUpdateComponent , TDeleteComponent > ( null , functions , obj ) ;
362+ return RenderCrudComponentAs < TCreateComponent , TReadComponent , TUpdateComponent , TDeleteComponent > ( null , functions , obj , enableCard ) ;
362363 }
363364
364365 public IGridColumn < T > RenderCrudComponentAs < TCreateComponent , TReadComponent , TUpdateComponent , TDeleteComponent > ( IList < Action < object > > actions ,
365- IList < Func < object , Task > > functions , object obj )
366+ IList < Func < object , Task > > functions , object obj , bool enableCard = true )
366367 {
367368 /// Get type arguments from any <see cref="ICustomGridComponent<>"/> interface
368369 /// in <paramref name="componentType"/> to make sure <see cref="T"/> is assignable to it
@@ -423,6 +424,7 @@ where iType.IsGenericType &&
423424 CrudActions = actions ;
424425 CrudFunctions = functions ;
425426 CrudObject = obj ;
427+ EnableCard = enableCard ;
426428
427429 return this ;
428430 }
0 commit comments