treeSrc.trackChanges();
treeDst.trackChanges();
var count = selectedNodes.length;
for(var i = 0; i < count; i++)
{
treeSrc.get_nodes().remove(selectedNodes[i]);
treeDst.get_nodes().add(selectedNodes[i]);
}
treeSrc.commitChanges();
treeDst.commitChanges();
...
When I work with several tree nodes it seems ok. However once I try to move 50 nodes at the same time it stucks for approximately 10sec!
Is there any problem with my code? Or some tips for this issue?
Regards,
Elton
protected
void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
}
}
protected void Page_PreRender(object sender, EventArgs e)
{
this.BuildGrid();
}
protected void Page_Init(object source, System.EventArgs e)
{
}
private void BuildGrid()
{
GridBoundColumn boundColumn;
boundColumn = new GridBoundColumn();
boundColumn.DataField = "CountryId";
boundColumn.HeaderText = "Country Number";
this.RadGrid1.MasterTableView.Columns.Add(boundColumn);
boundColumn = new GridBoundColumn();
boundColumn.DataField = "CountryName";
boundColumn.HeaderText = "Country Name";
this.RadGrid1.MasterTableView.Columns.Add(boundColumn);
RadGrid1.Width = Unit.Percentage(50);
RadGrid1.PageSize = 50;
RadGrid1.AllowPaging = true;
RadGrid1.PagerStyle.Mode = Telerik.Web.UI.GridPagerMode.NextPrevNumericAndAdvanced;
RadGrid1.AutoGenerateColumns = false;
RadGrid1.ShowStatusBar = true;
RadGrid1.Skin = "Web20";
RadGrid1.ShowStatusBar = true;
RadGrid1.GridLines = GridLines.Horizontal;
RadGrid1.HorizontalAlign = HorizontalAlign.Left;
RadGrid1.ShowFooter = true;
RadGrid1.ShowHeader = true;
RadGrid1.ShowStatusBar = true;
RadGrid1.AllowSorting = true;
RadGrid1.Visible = true;
this.RadGrid1.DataSource = this.GetData();
this.RadGrid1.DataBind();
}
private DataSet GetData()
{
SqlConnection sqlConnection = new SqlConnection();
SqlCommand sqlCommand = new SqlCommand();
SqlParameter sqlParameter = new SqlParameter();
DataSet dataSet = new DataSet();
try
{
if (sqlConnection.State != ConnectionState.Open)
{
sqlConnection.ConnectionString = SqlConnectionString.GetConnectionString();
sqlConnection.Open();
}
sqlCommand.Connection = sqlConnection;
sqlCommand.CommandType = CommandType.StoredProcedure;
sqlCommand.CommandText = ApplicationStoredProcedures.GetCountries();
sqlCommand.Parameters.Add("@WebPageName", SqlDbType.NVarChar).Value = "Authors.aspx";
sqlCommand.Parameters.Add("@CultureCode", SqlDbType.NVarChar).Value = "en-US";
sqlCommand.Parameters.Add("@ControlName", SqlDbType.NVarChar).Value = "ddlCountry";
sqlCommand.ExecuteNonQuery();
SqlDataAdapter sqlDataAdapter = new SqlDataAdapter(sqlCommand);
sqlDataAdapter.Fill(dataSet);
return dataSet;
}
catch (SqlException sql)
{
throw sql;
}
catch (Exception ex)
{
throw ex;
}
finally
{
if (sqlConnection.State != ConnectionState.Closed)
{
sqlConnection.Close();
}
sqlCommand.Dispose();
}
}
public void RadGrid1_PageIndexChanged(object source, Telerik.Web.UI.GridPageChangedEventArgs e)
{
this.RadGrid1.CurrentPageIndex = e.NewPageIndex;
}
/// <summary>
/// You can get the exact numbers of rows in your RadGrid either directly from the DataSource or in the following manner in the ItemDataBound event:
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void RadGrid1_ItemDataBound(object sender, GridItemEventArgs e)
{
if (e.Item is GridPagerItem)
{
Label1.Text = (e.Item as GridPagerItem).Paging.DataSourceCount.ToString();
}
}
protected void RadGrid1_NeedDataSource(object source, Telerik.Web.UI.GridNeedDataSourceEventArgs e)
{
// RadGrid1.DataSource = this.GetData() ;
}
I cannot find the issue. Am I doing something wrong.
Hi
I have just updated to the new Futures release and I run into a problem with a calendar control inside of a tooltip (in IE only - works in firefox). The problem is that the calendar appears under the tooltip making it impossible to to select dates. I haven't had this problem with Q3 2007.
Is there anything that can be done to quickly solve this? I tried to find z-index or something like that but not sure where to look since I'm just using the embedded skins.
Thanks,
Marek