Thread ID: |
Created: |
Updated: |
Platform: |
Replies: |
142897 | Feb 25,2019 11:50 AM UTC | Feb 26,2019 08:39 AM UTC | ASP.NET MVC | 3 |
![]() |
Tags: Grid |
@(Html.EJ().Grid<EmployeeView>("CustomGrid")
.Datasource((IEnumerable<object>)ViewBag.datasource)
.EnableRowHover(false)
.AllowSelection(false)
.Columns(col =>
{
col.Field("EmployeeID").HeaderText("Employee ID").IsPrimaryKey(true).TextAlign(TextAlign.Right).Width(100).Add();
col.Field("FirstName").HeaderText("First Name").Width(100).Add();
col.Field("LastName").HeaderText("Last Name").Width(100).Add();
col.Field("HireDate").HeaderText("Hire Date").TextAlign(TextAlign.Right).Width(100).Format("{0:MM/dd/yyyy}").Add();
col.Field("Country").Width(100).HeaderText("Country").Add();
col.HeaderText("Employee Details").Commands(command =>
{
command.Type("detail")
.ButtonOptions(new Syncfusion.JavaScript.Models.ButtonProperties()
{
Text = "Details",
Width = "100px",
Click = "onClick"
}).Add();
})
.IsUnbound(true)
.TextAlign(TextAlign.Left)
.Width(150)
.Add();
})
)
………………………………
<script type="text/javascript">
function onClick(args) {
$(args.target.closest("tr")).find("td").css("text-decoration", "line-through"); // to strike the text inside the td element
}
</script>
//To remove the strike use below css
$(args.target.closest("tr")).find("td").css("text-decoration", "none ");
|
|
This post will be permanently deleted. Are you sure you want to continue?
Sorry, An error occured while processing your request. Please try again later.
This page will automatically be redirected to the sign-in page in 10 seconds.