You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am trying to implement an rowselected style in the datagrid, I have multiple datagrids in the same razorpage, now I do it with jquery but it feels the wrong way to do it.
Any tips to use : Func<Country, string?> rowClass = x => x.Name.StartsWith("A") ? "highlighted-row" : null;
Func<Country, string?> rowStyle = x => x.Name.StartsWith("Au") ? "background-color: var(--highlight-bg);" : null;
and use <FluentDataGrid Id="grida" OnRowFocus="@rowafocus" and pinpoint the correct grid by id and use the row.item to change the rowStyle to a "rowselected" style.
Also an idea if the "selected rows" could end up in a list of selectedrows "variable" would be super something like:
<FluentDataGrid Id="grida"
SelectedItems=@selectedItems ItemKey=@(c => c.rowid)...
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
Hi
I am trying to implement an rowselected style in the datagrid, I have multiple datagrids in the same razorpage, now I do it with jquery but it feels the wrong way to do it.
Any tips to use :
Func<Country, string?> rowClass = x => x.Name.StartsWith("A") ? "highlighted-row" : null;
Func<Country, string?> rowStyle = x => x.Name.StartsWith("Au") ? "background-color: var(--highlight-bg);" : null;
and use <FluentDataGrid Id="grida" OnRowFocus="@rowafocus" and pinpoint the correct grid by id and use the row.item to change the rowStyle to a "rowselected" style.
Also an idea if the "selected rows" could end up in a list of selectedrows "variable" would be super something like:
<FluentDataGrid Id="grida"
SelectedItems=@selectedItems ItemKey=@(c => c.rowid)...
Beta Was this translation helpful? Give feedback.
All reactions