Rank: Newbie
Groups: Registered
Joined: 11/26/2021(UTC) Posts: 0 Thanks: 1 times
|
In my report I displayed datatable consists of employeeID, employeeName and Yes/No Questions. For Yes, I want tick mark to be displayed.
EmployeeID EmployeeName IsActive IsFinished 1 SSS Yes No
Here, instead of Yes I want tick mark. Can anyone help me in this?
|
|
|
|
Rank: Administration
Groups: Administrators
Joined: 12/20/2013(UTC) Posts: 1,209 Thanks: 14 times Was thanked: 206 time(s) in 199 post(s)
|
Hi, one option is to use the 'Cell Script' of your element. Select your element in the model and edit the 'Cell Script' property: Code:@{
ResultCell cell= Model;
if (!cell.IsTitle) {
cell.FinalValue = "<input type='checkbox' " + (cell.Value == "Yes" ? "checked" : "") + ">";
}
}
This will generate a checkbox instead of the text.
|
|
|
|
Rank: Newbie
Groups: Registered
Joined: 11/26/2021(UTC) Posts: 0 Thanks: 1 times
|
Originally Posted by: epf Hi, one option is to use the 'Cell Script' of your element. Select your element in the model and edit the 'Cell Script' property: Code:@{
ResultCell cell= Model;
if (!cell.IsTitle) {
cell.FinalValue = "<input type='checkbox' " + (cell.Value == "Yes" ? "checked" : "") + ">";
}
}
This will generate a checkbox instead of the text. Thanks for the reply. It worked. Is it possible to remove the checkbox border? Edited by user Monday, November 29, 2021 1:33:50 PM(UTC)
| Reason: Not specified
|
|
|
|
Rank: Administration
Groups: Administrators
Joined: 12/20/2013(UTC) Posts: 1,209 Thanks: 14 times Was thanked: 206 time(s) in 199 post(s)
|
As it is just HTML. You may try a simple checkbox got from https://getbootstrap.com/docs/3.3/components/Code:@{
ResultCell cell= Model;
if (!cell.IsTitle) {
cell.FinalValue = "";
if (cell.Value == "Yes") {
cell.FinalValue = "<span class='glyphicon glyphicon-ok' aria-hidden='true'></span>";
}
}
}
|
1 user thanked epf for this useful post.
|
|
|
Forum Jump
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.