React MUI v5 Data Grid Tutorial: Sort, Filter, Export, Pagination and Cell Editing

preview_player
Показать описание
Do you want to build a full MUI app from beginning to end, learn every aspect of the sx prop, styled API, and the theme, and never again fear styling any MUI component?!? Do you want an active Q&A with me?!? Then check out my Udemy course (with coupon)! (Currently I have an active COUPON!!!):

The Material-UI v5 Data Grid component is a great data visualization tool for very large data sets. I'll explore several core features and how to customize them, as well as challenges I encountered. This tutorial includes TypeScript.

Рекомендации по теме
Комментарии
Автор

Thank you for this! When would you use a datagrid compared to mui's data table?

jamesarnold
Автор

Hey thanks for the Video!

Im implementing the datagrid with dynamic columns(fetching the columns from API) and rows from API . Im only able to render the columns but I'm unable to render the rows . I there any rowProp that is used to render the rows which is specific to column Header?

swarupap
Автор

thanks. it get me started now. Next is i want server provide filter and search instead of mui control

freespeech
Автор

is it possible to show action only on row hover in material-UI v5 data grid

blowepicgames
Автор

I have to disable one column. The video was useful. Thanks

syedgulmohammad
Автор

Nice job sir and can do more deep videos on export print option customisation of filter export options

manjunathamj
Автор

hey man. do you have a video on themes. specifically dark mode and how to micro manage how certain stylings react to dark mode(ie change the way certain colors map { blues -> purples }, or change default dark mode pallette).

timezcooler
Автор

Hi,

I need one help

Is there any option to remove/hide "Manage column" option from column menu list

payalverma
Автор

hey how to set the filename of the CSV ?

gandharvaravi
Автор

The most important thing is current page where is if i click it how it works

webdeveloper
Автор

Hi sir, Can you please make a video on MUI V5 table pagination, sorting, filtering and searching.

VarunKumar-ypns
Автор

Ok i need to figure out few things. I want sort is done in server. There seems to be two methods but it is called at wrong time.

<DataGrid
rows={data}
columns={columns}
sortingMode="server"

filterMode="server"

loading={isLoading}

/>

const handleSortModelChange = React.useCallback((sortModel : GridSortModel) => {
// Here you save the data you need from the sort model
setQueryOptions({ sortModel: [...sortModel] });
is called");
}, []);



const onFilterChange = GridFilterModel) => {
// Here you save the data you need from the filter model
setQueryOptions({ filterModel: { ...filterModel } });
console.log("onFilterChange is called")
}, []);

Not sure how i handle those method so Datagrid call server to getdata

Also i do not want any sort happens or filter happens in client side but passed onto server to provide that data.

freespeech
Автор

Hey and Thanks for this video!

After more than 1 hour of searching, I now know:
Filters like these work.
{
columnField: "fullname",
operatorValue: "contains",
value: "Thomas",
}

Use the original filter and search for the operatorValues there.
Some I have found, for example ('contains', 'equals', 'startsWith', 'endsWith', 'is',
The type of column decisive. But for dates I have not found a solution.

I can't believe there is no list of operators.

tom_gtom