using
System;
using
System.Collections;
using
System.Configuration;
using
System.Data;
using
System.Linq;
using
System.Web;
using
System.Web.Security;
using
System.Web.UI;
using
System.Web.UI.HtmlControls;
using
System.Web.UI.WebControls;
using
System.Web.UI.WebControls.WebParts;
using
System.Xml.Linq;
using
System.Collections.Generic;
using
Telerik.Web.UI;
using
System.Threading;
namespace
RadTestApp
{
public
partial
class
SnippetHttpPanel : System.Web.UI.Page
{
protected
void
Page_Load(
object
sender, EventArgs e)
{
}
protected
void
XmlHttpPanel_ServiceRequest(
object
sender, RadXmlHttpPanelEventArgs e)
{
Thread.Sleep(1000);
rgSearchResults.DataSource = GetData();
rgSearchResults.DataBind();
}
protected
void
rgSearchResults_ItemCreated(
object
sender, Telerik.Web.UI.GridItemEventArgs e)
{
if
(e.Item
is
GridHeaderItem)
{
GridHeaderItem gridHeader = e.Item
as
GridHeaderItem;
RadComboBox sortoptions = (RadComboBox)gridHeader.FindControl(
"cboSortOptions"
);
sortoptions.SelectedIndex = 1;
DropDownList ddl = (DropDownList)gridHeader.FindControl(
"sortOptions"
);
ddl.SelectedIndex = 1;
}
}
private
List<SnippetResult> GetData()
{
List<SnippetResult> results =
new
List<SnippetResult>();
results.Add(
new
SnippetResult { DocSequenceNumber = 1, Title =
"Title 1"
, Snippet =
"This is a snippet view text repeated three times.This is a snippet view text repeated three times.This is a snippet view text repeated three times."
});
results.Add(
new
SnippetResult { DocSequenceNumber = 2, Title =
"Title 1"
, Snippet =
"This is a snippet view text repeated three times.This is a snippet view text repeated three times.This is a snippet view text repeated three times."
});
results.Add(
new
SnippetResult { DocSequenceNumber = 3, Title =
"Title 1"
, Snippet =
"This is a snippet view text repeated three times.This is a snippet view text repeated three times.This is a snippet view text repeated three times."
});
results.Add(
new
SnippetResult { DocSequenceNumber = 4, Title =
"Title 1"
, Snippet =
"This is a snippet view text repeated three times.This is a snippet view text repeated three times.This is a snippet view text repeated three times."
});
results.Add(
new
SnippetResult { DocSequenceNumber = 5, Title =
"Title 1"
, Snippet =
"This is a snippet view text repeated three times.This is a snippet view text repeated three times.This is a snippet view text repeated three times."
});
results.Add(
new
SnippetResult { DocSequenceNumber = 6, Title =
"Title 1"
, Snippet =
"This is a snippet view text repeated three times.This is a snippet view text repeated three times.This is a snippet view text repeated three times."
});
return
results;
}
}
public
class
SnippetResult
{
public
int
DocSequenceNumber {
get
;
set
; }
public
string
Title {
get
;
set
; }
public
string
Snippet {
get
;
set
; }
}
}
Please let me know I can paste sample code.