Feature request - generating data grid

i think this might be an easy one: let us save a datagrid default options that are used when the radzen blazor studio or the radzen ide generate a page with a datagrid.

i have about 23 items that i am having to go to page after page and manually update the razor html to get the same markup in all my grids.
its simple but takes time to go thru 10-20 or more pages and set all the options over and over..

like this:

AllowColumnPicking="true"
AllowColumnReorder="true"
AllowColumnResize="true"
AllowCompositeDataCells="true"
AllowFiltering="true"
AllowFilterDateInput="true"
AllowGrouping="true"
AllowMultiColumnSorting="true"
AllowPaging="true"
AllowSorting="true"
AllowVirtualization="true"
EditMode="Radzen.DataGridEditMode.Single"
FilterMode="Radzen.FilterMode.Advanced"
GroupFootersAlwaysVisible="true"
HideGroupedColumn="true"
PagerAlwaysVisible="true"
PageSizeOptions=@(new int[]{5, 10, 20, 30})
PageSize="5"
Responsive="true"
RowDoubleClick="@Grid0RowDoubleClick"
ShowPagingSummary="true"
ShowMultiColumnSortingIndex="true"

just allow that to be saved as a default set of options for every time a data grid will be added to a new page....

..

If you are using same settings for all of your pages with DataGrid you can simply create a custom component with desired predefined properties.

1 Like

i am not sure that you understand.

i use RadZen to generate the starting code for an application.

it does not ask me what grid component to use, your application generator writes out the RadZenDataGrid in each page.

with more than a few tables this means quite a lot of editing to update all the grids.
that is why i am asking that the RadZen application that you publish get a small update that just allows the user to save some settings that will be used in generation all of that code.

@figuerres You can create a new blazor Component called e.g. MyRadzenDataGrid. In it you simply call RadzenDataGrid with your desired props e.g. AllowSorting. You can use RenderFragment in MyRadzenDataGrid to pass it the required <Columns>.

and i do not see how that helps with the problem.
the problem is that the RadZen app generates the code and markup. not me.
to use the custom grid that (as fas as i can see) puts me back in the same place where i have to edit 10 or 20 or more pages to modify the code that RadZen Generates.....

In your 20+ pages, you can use MyRadzenDatagrid which will be a RadzenDatagrid pre-configured with your preferred parameters. In case you decide to change anything, you could just change it where you defined the MyRadzenDatagrid component instead of going to 20+ places.

and again i think you are missing the whole point....

this is code that is generated by a tool, i am just asking that the RadZen code generator allow for the setting.

what you are telling me is that every time i create a new application i should find and edit all the pages that radzen generates.....

when if the tool just had a settings page that allowed me to save the settings it could generate the code as i want it.

Sorry I've obviously misunderstood what you were looking for. I'll let the official reps respond.