Some questions about treegrid
Hello.
I am working on treegrid.
I am checking for duplication of the entered code value when adding a row and entering a code value in the code column and moving to another column.
1. When adding a row, how can I get the focus to the code column of the added row?
2. The code column can only be modified when added, and when data is imported, it should not be modified when clicking or double-clicking.
3. I am checking for duplication when moving to another column after entering the code column. The duplication check works fine, but the problem is that after checking for duplication, if the value is duplicated, I do not want to move to another column, but move back to the code column and delete the value or select all the values.
Thank you for your help every time.
Hi Junghwi,
Greetings from
Syncfusion Support,
Query 1- When adding a row, how can I get the
focus to the code column of the added row?
We need to clarify the behavior of the TreeGrid. By default, when a record is
added, the focus automatically goes to the first column. Please confirm whether
you need to set focus for other column(which is not first column) to proceed
further. Kindly share Screenshot for this scenario.
Query 2- The code column can only be modified when added, and when data is imported, it should not be modified when clicking or double-clicking.
To achieve your requirement, we suggest setting the AllowEditing and AllowAdding
properties for the specific column in the TreeGrid. By setting AllowAdding to
true, you can allow adding values to the required column. Meanwhile, setting
AllowEditing to false will prevent editing the column after it has been added.
We have attached a code snippet and a sample for your reference.
|
<SfTreeGrid @ref="tree"> <TreeGridColumns> … <TreeGridColumn Field="CodeColumn" ValidationRules="@(new ValidationRules() { Required = true })" HeaderText="CodeColumn" Width="100" Type='ColumnType.Integer' AllowAdding="true" AllowEditing="false" TextAlign="Syncfusion.Blazor.Grids.TextAlign.Right"></TreeGridColumn> … </TreeGridColumns> .. </SfTreeGrid>
|
Sample link: https://blazorplayground.syncfusion.com/embed/LXBzXPrWzwdsLxqv?appbar=true&editor=true&result=true&errorlist=true&theme=bootstrap5
For more information, you may
refer to the following link:
https://blazor.syncfusion.com/documentation/datagrid/editing#disable-editing-for-particular-column
Query 3- I am checking for duplication when moving to another column after entering the code column. The duplication check works fine, but the problem is that after checking for duplication, if the value is duplicated, I do not want to move to another column, but move back to the code column and delete the value or select all the values.
Before proceeding this, we request
you to share the following details
- Please confirm whether you need this requirement on mouseclick or Tab key navigation.
- Have you handled duplication checking using your own customized code or default validation message. Share us the code details for duplication check.
- Are you using Row or cell edit mode in EditSettings property.
. 4)
Screenshot or Video demo about this
requirement.
Regards,
Farveen sulthana T
- 1 Reply
- 2 Participants
-
JU junghwi
- Aug 15, 2024 02:46 PM UTC
- Aug 21, 2024 02:30 PM UTC