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
<%@ WebService Language="C#" CodeBehind="~/App_Code/Products.cs" Class="Products" %>
using
System;
System.Collections.Generic;
System.Configuration;
System.Data;
System.Data.SqlClient;
System.Web;
System.Web.Script.Services;
System.Web.Services;
Telerik.Web.UI;
[ScriptService]
public
class
Products : WebService
{
[WebMethod]
RadComboBoxData GetCompanyNames(RadComboBoxContext context)
string
sql =
"SELECT * from Customers WHERE CompanyName LIKE @text + '%'"
;
SqlDataAdapter adapter =
new
SqlDataAdapter(sql,
ConfigurationManager.ConnectionStrings[
"NorthwindConnectionString"
].ConnectionString);
DataTable data =
DataTable();
adapter.SelectCommand.Parameters.AddWithValue(
"@text"
, context.Text);
adapter.Fill(data);
List<RadComboBoxItemData> result =
List<RadComboBoxItemData>(context.NumberOfItems);
RadComboBoxData comboData =
RadComboBoxData();
try
int
itemsPerRequest = 10;
itemOffset = context.NumberOfItems;
endOffset = itemOffset + itemsPerRequest;
if
(endOffset > data.Rows.Count)
endOffset = data.Rows.Count;
}
(endOffset == data.Rows.Count)
comboData.EndOfItems =
true
else
false
result =
List<RadComboBoxItemData>(endOffset - itemOffset);
for
(
i = itemOffset; i < endOffset; i++)
RadComboBoxItemData itemData =
RadComboBoxItemData();
itemData.Text = data.Rows[i][
"CompanyName"
].ToString();
itemData.Value = data.Rows[i][
result.Add(itemData);
(data.Rows.Count > 0)
comboData.Message = String.Format(
"Items <b>1</b>-<b>{0}</b> out of <b>{1}</b>"
, endOffset.ToString(), data.Rows.Count.ToString());
comboData.Message =
"No matches"
catch
(Exception e)
comboData.Message = e.Message;
comboData.Items = result.ToArray();
return
comboData;