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
Agent and App Development Solutions
Build. Accelerate. Govern.
AI-Ready Application Experiences
AI-Assisted SDLC
Agent Governance and Control
Telerik
Build modern .NET business apps
.Net Web
Desktop
Reporting and Documents
Cross-Platform
Additional Tools
Enhance the developer and designer experience
Testing & Mocking
CMS
Debugging
UI Tools
Free Tools
Support and Learning
Productivity and Design Tools
<
telerik:GridDropDownColumn
HeaderText
=
"ShipCity"
UniqueName
DataField
ListTextField
ListValueField
DataSourceID
"SqlDataSource1"
>
</
protected
void
RadGrid1_ItemDataBound(
object
sender, GridItemEventArgs e)
{
//Populate in EditMode
if
(e.Item
is
GridEditableItem && e.Item.IsInEditMode)
GridEditableItem edititem = (GridEditableItem)e.Item;
GridEditManager editMan = edititem.EditManager;
GridDropDownListColumnEditor editor = (GridDropDownListColumnEditor)(editMan.GetColumnEditor(
));
RadComboBox rComboBox = editor.ComboBoxControl;
string
selectedVal = DataBinder.Eval(edititem.DataItem,
).ToString();
DataTable table = GetRelatedRecords(
"SELECT ShipCity FROM [Orders]"
);
editor.DataSource = table;
rComboBox.DataSource = table;
rComboBox.DataTextField =
;
rComboBox.DataValueField =
rComboBox.DataBind();
rComboBox.SelectedValue = selectedVal;
}
public
static
DataTable GetRelatedRecords(
query)
SqlConnection conn =
new
SqlConnection(ConnString);
SqlDataAdapter adapter =
SqlDataAdapter();
adapter.SelectCommand =
SqlCommand(query, conn);
DataTable myDataTable =
DataTable();
conn.Open();
try
adapter.Fill(myDataTable);
finally
conn.Close();
return
myDataTable;