@*<RadzenGridColumn TItem="TimeSlotModel" Property="@nameof(TimeSlotModel.IsEnabled)" Title="Is Enabled" />*@
<RadzenGridColumn TItem="TimeSlotModel" Property="IsEnabled" Title="Is Enabled">
<Template Context="timeslott">
@timeslott.IsEnabled
</Template>
<EditTemplate Context="timeslott">
// want to place a toggle button to enable or disable.
</EditTemplate>
I want to place a toggle button to enable or disable. . how could the code will appear.
Can anyone help me solve this.
And also how to change the Isenabled value according to database value.
I am afraid I don't understand what you are trying to do, what you have tried so far etc. You can check the forum FAQ for tips how to improve your question.
Hi @korchev , Sorry for my bad English.
i want to place a toggle button inside grid .i have a column named IsEnabled .so i want to show the Isenabled field as toggle button.when value from the database is true.it should be true otherwise false. and i could edit that toggle button when i click that. how could i achieve that.
like this. But the toggle button is not changing wen i tried to edit. Actually i dont know how to meet my requirements. even wen i tried to edit this I cant do that. And another problem i'm facing is i cant give the datetimepicker for the timespan fields. in this 2 fields are timespan(in sql server its declared as timespan) i dont know how to change that inside radzen grid. I dont know the option for that too.
My requirement is to add edit and delete the time slots accordingly . there should be an option to disable the time if there is any day off. i dont know how to achieve that. i tried this .
@korchev Can you tell me how could i add,edit and delete rows to the grid . columns are FromTime and ToTime (declared as timespan in database), . ,IsEnabled as Bool ,DisplayOrder as int, DisplayText (its the combination of FromTime and ToTime so its a string. these are the fields.
Is there any other way to achieve this
I suggest you check our inline editing example which shows how to implement editing and data-bind components in the EditTemplate. The DatePicker does not support TimeSpan properties.
@korchev i did check that. i was so confused . i'm new to blazor .and this is my training period. i dint understand the example fully when i tried implimenting that to my task
Is it possible to display data (true or false) as a radzen switch component inside the radzen grid?
Exactly how the image that @jizi has posted? Exactly like that on the IsActive Column?