Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 20 additions & 6 deletions components/grid/editing/popup.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,16 +36,18 @@ The Popup editing mode supports [validation]({%slug common-features/input-valida
````CSHTML
@using System.ComponentModel.DataAnnotations

<strong>Editing is cancelled for the first two records.</strong>
<strong>Editing is cancelled for the fifth item conditionally.</strong>

<TelerikGrid Data=@MyData EditMode="@GridEditMode.Popup" Pageable="true" Height="500px"
OnUpdate="@UpdateHandler" OnEdit="@EditHandler" OnDelete="@DeleteHandler" OnCreate="@CreateHandler" OnCancel="@CancelHandler">
<GridToolBarTemplate>
<GridCommandButton Command="Add" Icon="@SvgIcon.Plus">Add Employee</GridCommandButton>
</GridToolBarTemplate>
<GridColumns>
<GridColumn Field=@nameof(SampleData.ID) Title="ID" Editable="false" />
<GridColumn Field=@nameof(SampleData.Name) Title="Name" />
<GridColumn Field=@nameof(SampleData.ID) Title="ID" Editable="false" Width="80px" />
<GridColumn Field=@nameof(SampleData.FirstName) Title="First Name" />
<GridColumn Field=@nameof(SampleData.MiddleName) Title="Middle Name" Visible="false" />
<GridColumn Field=@nameof(SampleData.LastName) Title="Last Name" />
<GridCommandColumn>
<GridCommandButton Command="Edit" Icon="@SvgIcon.Pencil">Edit</GridCommandButton>
<GridCommandButton Command="Delete" Icon="@SvgIcon.Trash">Delete</GridCommandButton>
Expand Down Expand Up @@ -120,8 +122,14 @@ The Popup editing mode supports [validation]({%slug common-features/input-valida
{
public int ID { get; set; }

[Required(ErrorMessage = "The employee must have a name")]
public string Name { get; set; }
[Required]
public string FirstName { get; set; }

[Required]
public string MiddleName { get; set; }

[Required]
public string LastName { get; set; }
}

public List<SampleData> MyData { get; set; }
Expand Down Expand Up @@ -157,7 +165,9 @@ The Popup editing mode supports [validation]({%slug common-features/input-valida
_data.Add(new SampleData()
{
ID = i,
Name = "Name " + i.ToString()
FirstName = "First " + i.ToString(),
MiddleName = "Middle " + i.ToString(),
LastName = "Last " + i.ToString(),
});
}
}
Expand Down Expand Up @@ -188,6 +198,10 @@ The Popup editing mode supports [validation]({%slug common-features/input-valida

The Grid exposes options to customize the edit popup and its form. Define the desired configuration in the `GridPopupEditSettings` and `GridPopupEditFormSettings` tags under the `GridSettings` tag.

### Editability of Hidden Columns

Staring from version 7.0, the Grid allows users to edit [hidden columns]({%slug grid-columns-visible%}) by default. To disable editing of a hidden column, set `Editable="false"` to the respective `<GridColumn>` tag.

### Popup Customization

The `GridPopupEditSettings` nested tag exposes the following parameters to allow popup customization:
Expand Down
6 changes: 5 additions & 1 deletion components/treelist/editing/popup.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ Editing is cancelled for the first record.
<TreeListColumn Field="Name" Expandable="true" Width="320px" />
<TreeListColumn Field="Id" Editable="false" Width="120px" />
<TreeListColumn Field="EmailAddress" Width="220px" />
<TreeListColumn Field="HireDate" Width="220px" />
<TreeListColumn Field="HireDate" Width="220px" Visible="false" />
</TreeListColumns>
</TelerikTreeList>

Expand Down Expand Up @@ -319,6 +319,10 @@ Editing is cancelled for the first record.

The TreeList exposes options to customize the edit popup and its form. You can define your desired configuration in the `TreeListPopupEditSettings` and `TreeListPopupEditFormSettings` tags under the `TreeListSettings` tag.

### Editability of Hidden Columns

Staring from version 7.0, the TreeList allows users to edit [hidden columns]({%slug treelist-columns-visible%}) by default. To disable editing of a hidden column, set `Editable="false"` to the respective `<TreeListColumn>` tag.

### Popup Customization

The `TreeListPopupEditSettings` nested tag exposes the following parameters to allow popup customization:
Expand Down
Loading