Product Bundles
DevCraft
All Telerik .NET and Kendo UI JavaScript components and AI Tools in one package.
Kendo UI
Bundle of AI Tools plus four JavaScript UI libraries built natively for jQuery, Angular, React and Vue.
Build JavaScript UI
Javascript
Telerik
Build modern .NET business apps
.Net Web
Cross-Platform
Desktop
Reporting and Documents
AI for Developers & IT
Ensure AI program success
AI Coding
AI Engineering
Additional Tools
Enhance the developer and designer experience
Testing & Mocking
Debugging
AI-Enhanced UI Tools
CMS
Free Tools
Support and Learning
Productivity and Design Tools
I have a toggle button in a grid and would like to set its initial setting dependant on a Boolean in the database. Is there a way to bind it or set it via code.
Thanks
<
telerik:GridTemplateColumn
UniqueName
=
"ToggleButton"
>
ItemTemplate
telerik:RadButton
ID
"btnToggle"
runat
"server"
ToggleType
"CheckBox"
ButtonType
</
protected
void
grdEmail_ItemDataBound(
object
sender, GridItemEventArgs e)
{
if
(e.Item
is
GridDataItem)
GridDataItem item = (GridDataItem)e.Item; RadButton rdBtn = (RadButton)item.FindControl(
);
DataRowView row = (DataRowView)e.Item.DataItem;
//accessing the value from data rowview
rdBtn.Checked =Convert.ToBoolean(row[
"bool"
]);
}