I am using OnRowRender and OnCellRender to get custom alternating row colors on my grids. The problem is that I'd like to centralize the code for this in a base object and these methods have to match a delegate setup by each grid. Here is my general setup.
private void OnRowRender(RowRenderEventArgs<WaybillDumpCandidate> args) { evenRow = !evenRow; } private void OnCellRender(DataGridCellRenderEventArgs<WaybillDumpCandidate> args) { if (args.Column.Grid.AllowAlternatingRows) { if (evenRow) { args.Attributes.Add("style", $"background-color: aliceblue;"); } else { args.Attributes.Add("style", $"background-color: lightskyblue;"); } } }What I would like to do, since I'm not using the arguments passed in, is setup methods with a generic argument, or no parameters at all. Is this possible?