or
private string _filterExpression;
protected void RadGrid1_NeedDataSource(object source, GridNeedDataSourceEventArgs e)
{
int startRowIndex = RadGrid1.CurrentPageIndex * RadGrid1.PageSize;
int maximumRows = RadGrid1.PageSize;
string sort = RadGrid1.MasterTableView.SortExpressions.GetSortString();
_filterExpression = RadGrid1.MasterTableView.FilterExpression;
//needed to bypass RadGrid's internal filtering
RadGrid1.MasterTableView.FilterExpression = string.Empty;
if (configuration == null)
{
configuration = new SystemSetupFieldConfiguration(TagPrefixList, startRowIndex, maximumRows, sort, _filterExpression);
}
var combinedfields = configuration.GetCombinedFields();
var fieldcount = configuration.CombinedFieldsCount;
RadGrid1.VirtualItemCount = fieldcount;
RadGrid1.DataSource = combinedfields;
}

protected void RadGrid1_NeedDataSource(object source, Telerik.Web.UI.GridNeedDataSourceEventArgs e){ var Eds = new EntityDataSource(); Eds.DefaultContainerName = "EntityDb"; Eds.ConnectionString = "name=EntityDb"; Eds.EntitySetName = "Meetings"; Eds.EnableDelete = true; Eds.EnableInsert = true; Eds.EnableUpdate = true; Eds.AutoPage = true; Eds.Include = "Venue"; Eds.OrderBy = "it.StartDate"; RadGrid1.DataSource = Eds;}protected void RadGrid1_NeedDataSource(object source, Telerik.Web.UI.GridNeedDataSourceEventArgs e){ OleDbConnection conn = new OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0; Data Source=" + Server.MapPath("~/App_Data/Nwind.mdb")); OleDbDataAdapter adapter = new OleDbDataAdapter(); adapter.SelectCommand = new OleDbCommand("SELECT * FROM Customers", conn); DataTable myDataTable = new DataTable(); conn.Open(); try { adapter.Fill(myDataTable); } finally { conn.Close(); } RadGrid1.DataSource = myDataTable;}
protected
void grdDelegation_ItemCommand(object source, GridCommandEventArgs e)
{
try
{
hdnDelegationCommandName.Value = e.CommandName;
switch (e.CommandName)
{
case RadGrid.EditCommandName:
hdnDelegationGridAddUpdate.Value =
"2";
if (grdDelegation.MasterTableView.IsItemInserted)
{
e.Canceled =
true;
}
break;
case RadGrid.InitInsertCommandName:
//Pair filterPair = (Pair)e.CommandArgument;
//TextBox filterBox = (e.Item as GridFilteringItem)[filterPair.Second.ToString()].Controls[0] as TextBox;
//filterBox.Text = "";