資料網格 - 行釘選
釘選行以使其始終可見。
釘選(或凍結、鎖定或浮動)的行是指在使用者垂直滾動資料網格時始終可見的行。
您可以通過 pinnedRows
屬性傳遞釘選的行資料,將行釘選在資料網格的頂部或底部
const pinnedRows: GridPinnedRowsProp = {
top: [{ id: 0, brand: 'Nike' }],
bottom: [
{ id: 1, brand: 'Adidas' },
{ id: 2, brand: 'Puma' },
],
};
<DataGridPro pinnedRows={pinnedRows} />;
釘選行的資料格式與 rows
屬性相同(請參閱餵入資料)。
釘選行的資料也應符合行識別碼要求。
按 Enter 鍵開始編輯