Hello, it's possible to make row's and column's header editable?
and is possible to bind the row headers to a list?
And is possible to add a context menu for row headers?
Regards
|
Queries |
Solutions | ||
|
it's possible to make column's header editable?
|
Your requirement can be achieved by using HeaderTemplate in SfDataGrid. Please refer the below code snippet,
| ||
|
it's possible to make row's header editable?
|
We are a little unclear with your scenario. Can you please provide more information related to your query?
Kindly revert to us with the above requested details. It will be more helpful for us to check the possibilities to resolve the reported problem. | ||
|
is possible to bind the row headers to a list?
| |||
|
is possible to add a context menu for row headers?
|
Yes. Your requirement can be achieved by using RecordContextMenu and show context menu only for RowHeader by customizing the GridContextMenuOpening event in SfDataGrid. Please refer the below code snippet,
XAML Code Snippet:
C# Code Snippet:
UG Link: https://help.syncfusion.com/wpf/datagrid/context-menu#context-menu-for-record-rows https://help.syncfusion.com/wpf/datagrid/context-menu#gridcontextmenuopening |
I need to build a table like in picture, where the bold numbers are the headers of row and columns. This numbers are provided from 2 list : "rhead"(20,30,40,50) and "chead" (100,200,300,400), Since the list content can change I wolud bind in some way the list, so if I change the list the headers change to and if I edit the headers from the datagrid view, the list change according.
|
Queries |
Solutions | ||
|
it's possible to make row's header editable?
|
SfDataGrid does not contain direct support to achieve your requirement "make row's header editable". Because RowHeaderCell is not editable. However, Your requirement can be achieve by maintain the model property for RowHeaderCell and bound the property and customize the GridRowHeaderCell like below mentioned code snippet, XAML Code Snippet:
C# Code Snippet:
| ||
|
is possible to bind the row headers to a list?
| |||
|
it's possible to make column's header editable?
|
Your requirement can be achieved by using HeaderTemplate in SfDataGrid and customize the LostFocus event like below mentioned code snippet,
XAML Code Snippet:
C# Code Snippet:
|
Hello, can you check my code please? I copied from your sample, but row header not show.
Hi Matteo,
We have analyzed the sample. You have bound the collection to the TextBox.Text which is loaded in RowHeaderCell.ControlTemplate. You should not bind the collection instead you should introduce a property to the underlying data object for binding. Please refer the sample and let us know if you have any concerns.
Sample : https://www.syncfusion.com/downloads/support/forum/171574/ze/testdatagridUpdated2131302877
Regards,
Sampath Narayanan.S
Hello,
I tested the sample, the row headers are editable
Attached a picture. Now I can edit the Row header, but the aren't showed on startup( taken from bpR).
As you can see from my code I create bpR and bpC as collection of numbers to use them as header; I need to show them and if the user change some header(they must be editable), the collections have to change together.
Hi, what's the process to make the column headers editible in React?
Also is it possible to have control over which headers are
thanks
Hi Matthew,
You can add any editor component in the header using the “Header Template” feature. Please refer to the below documentation link for more information.
https://ej2.syncfusion.com/react/documentation/grid/columns/headers/#header-template
If the above doesn’t meet your requirement please share a pictorial representation and the difficulties you are facing with the above solution which will be helpful for us to provide a better solution as early as possible.
Regards,
Pavithra S