void StandardGrid_ItemCreated(object sender, GridItemEventArgs e)
{
switch (e.Item.ItemType)
{
case
GridItemType.FilteringItem:
GridFilteringItem filteringItem = e.Item as GridFilteringItem;
try
{
//Insert the GridFilterButton @ position 0 in the Grid
Control GridFilterButton = this.Page.LoadControl("~\\UserControls\\GridFilterButton.ascx");
filteringItem[
"CommandColumn"].Controls.AddAt(0, GridFilterButton);
<
script>
function
movetoend()
{
var range = document.selection.createRange();
range.moveStart(
"textedit");
range.select();
}
</script>
<telerik:RadTextBox ID="RadTextBoxName" runat="server" TabIndex="1" onfocus="movetoend()"
OnTextChanged="RadTextBoxName_OnTextChanged">
</telerik:RadTextBox>
aspx.cs code:
protected
void Page_Load(object sender, EventArgs e)
{
if (!Page.IsPostBack)
{
RadTextBoxName.Attributes.Add(
"onkeyup", "setTimeout('__doPostBack(\\'" + RadTextBoxName.ClientID.Replace("_", "$") + "\\',\\'\\')', 0);");
}
}
protected
void RadTextBoxName_OnTextChanged(object sender, EventArgs args)
{
soNameSearch(RadTextBoxName.Text);
RadTextBoxName.Focus();
}
The problem is with the postback there is a page flash each time the grid reloads.
How can i avoid the page flash?
Can you guide me towards the right approach to achieve the desired functionality?
| Me.rcbSite.SelectedValue = DR("SiteID") |
| Me.FillFacility(Convert.ToInt32(DR("SiteID"))) |
| 'Here is the problem I think |
| Me.RG2.SelectedValues = DR("FacilityID") |
| Me.FillDepartment(Convert.ToInt32(DR("FacilityID"))) |