Skip to content

Commit 5cbeb06

Browse files
Merge pull request #7168 from syncfusion-content/993969-UgDataGrid
993969 ug data grid
2 parents 46b80c3 + 0955529 commit 5cbeb06

File tree

2 files changed

+6
-12
lines changed

2 files changed

+6
-12
lines changed

blazor/datagrid/editing.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -765,11 +765,11 @@ The [EditTemplate](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Grids
765765

766766
To customize the default Grid EditForm input component, you can define an `EditTemplate` inside the GridColumn for the complex field. You can edit complex objects using `EditTemplate` by defining two-way (**@bind-Value**) binding inside the GridColumn to reflect changes in the DataGrid.
767767

768-
For focus management and validation to work properly, you must set the `ID` attribute of the input elements inside the `EditTemplate` to match the [Field](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Grids.GridColumn.html#Syncfusion_Blazor_Grids_GridColumn_Field) value of the corresponding GridColumn. When dealing with complex fields, use a double underscore `(__)` in place of the dot `(.)` operator. For example, if the field is **Name.FirstName**, set the `ID` as **Name__FirstName**.
768+
For focus management and validation to work properly, you must set the `ID` attribute of the input elements inside the `EditTemplate` to match the [Field](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Grids.GridColumn.html#Syncfusion_Blazor_Grids_GridColumn_Field) value of the corresponding GridColumn. When dealing with complex fields, use a Triple underscore `(___)` in place of the dot `(.)` operator. For example, if the field is **Name.FirstName**, set the `ID` as **Name___FirstName**.
769769

770-
> Ensure that both `ID` and `Name` attributes inside the `EditTemplate` follow this double underscore (__) format to avoid issues with validation and focus handling.
770+
> Ensure that both `ID` and `Name` attributes inside the `EditTemplate` follow this Triple underscore (___) format to avoid issues with validation and focus handling.
771771
772-
In the following example, the input element is rendered in the edit template of the FirstName and LastName columns. The edited changes can be saved using the `Name` property of the input element. Since the complex data is bound to the FirstName and LastName columns, the `Name` property should be defined as **Name__FirstName** and **Name__LastName**, respectively, instead of using the dot notation (**Name.FirstName** and **Name.LastName**).
772+
In the following example, the input element is rendered in the edit template of the FirstName and LastName columns. The edited changes can be saved using the `Name` property of the input element. Since the complex data is bound to the FirstName and LastName columns, the `Name` property should be defined as **Name___FirstName** and **Name___LastName**, respectively, instead of using the dot notation (**Name.FirstName** and **Name.LastName**).
773773

774774
{% tabs %}
775775
{% highlight razor tabtitle="Index.razor" %}

blazor/datagrid/searching.md

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -213,6 +213,7 @@ The following example demonstrates how to set the `SearchSettings.Operator` prop
213213

214214
{% tabs %}
215215
{% highlight razor tabtitle="Index.razor" %}
216+
@using Syncfusion.Blazor
216217
@using Syncfusion.Blazor.Grids
217218
@using Syncfusion.Blazor.DropDowns
218219

@@ -223,6 +224,7 @@ The following example demonstrates how to set the `SearchSettings.Operator` prop
223224
</SfDropDownList>
224225

225226
<SfGrid DataSource="@Orders" Toolbar=@ToolbarItems>
227+
<GridSearchSettings Operator="@SearchOperator"></GridSearchSettings>
226228
<GridColumns>
227229
<GridColumn Field=@nameof(OrderData.OrderID) HeaderText="Order ID" TextAlign="TextAlign.Right" Width="120"></GridColumn>
228230
<GridColumn Field=@nameof(OrderData.CustomerID) HeaderText="Customer ID" Width="150"></GridColumn>
@@ -246,14 +248,6 @@ The following example demonstrates how to set the `SearchSettings.Operator` prop
246248
public Operator Value { get; set; }
247249
}
248250

249-
public enum Operator
250-
{
251-
StartsWith,
252-
EndsWith,
253-
Contains,
254-
Equal
255-
}
256-
257251
List<DropDownOrder> DropDownData = new List<DropDownOrder>
258252
{
259253
new DropDownOrder(){Text="StartsWith",Value= Operator.StartsWith },
@@ -316,7 +310,7 @@ The following example demonstrates how to set the `SearchSettings.Operator` prop
316310
{% endhighlight %}
317311
{% endtabs %}
318312

319-
{% previewsample "https://blazorplayground.syncfusion.com/embed/hZBgCXKXMPQpCngI?appbar=false&editor=false&result=true&errorlist=false&theme=bootstrap5" %}
313+
{% previewsample "https://blazorplayground.syncfusion.com/embed/rtheMWibUKtkPFVK?appbar=true&editor=true&result=true&errorlist=true&theme=bootstrap5" %}
320314

321315
## Search by external button
322316

0 commit comments

Comments
 (0)