thanks, it's better, now i see the loading icon, but it's only shows the first time i press the button, at the following clicks , i see no loading icon,
here is the code behind:
using
System;
using
System.Collections.Generic;
using
System.Linq;
using
System.Web;
using
System.Web.UI;
using
System.Web.UI.WebControls;
using
System.Configuration;
using
System.Data;
using
System.Data.SqlClient;
namespace
test
{
public
partial
class
testloadingpage : System.Web.UI.Page
{
static
string
mConnectionString = ConfigurationManager.ConnectionStrings[
"test"
].ToString();
static
string
select =
""
;
protected
void
Page_Load(
object
sender, EventArgs e)
{
if
(!IsPostBack)
{
select =
"SELECT * FROM test"
;
RadGridMailingList.DataBind();
}
}
protected
void
Button1_Click(
object
sender, EventArgs e)
{
select =
"SELECT * from test"
;
RadGridMailingList.Rebind();
}
public
DataTable GetDataTable(
string
query)
{
SqlConnection conn =
new
SqlConnection(mConnectionString);
SqlDataAdapter adapter =
new
SqlDataAdapter();
adapter.SelectCommand =
new
SqlCommand(query, conn);
DataTable myDataTable =
new
DataTable();
conn.Open();
try
{
adapter.Fill(myDataTable);
}
finally
{
conn.Close();
}
return
myDataTable;
}
protected
void
RadGrid1_NeedDataSource(
object
source, Telerik.Web.UI.GridNeedDataSourceEventArgs e)
{
RadGridMailingList.DataSource = GetDataTable(select);
}
}
}