1

This is my event on RadTreeView Node Click can i write this event on client side JAVASCRIPT because it take much time to load when it is post back . I am using dataset here which is filled when page is load first time . Is there anyway to access dataset in client side or anyway that i could make this method more faster or can i make this method in client side so it can execute much faster .

protected void radTreeView1_NodeClick(object sender, RadTreeNodeEventArgs e)
    {
        ds = (DataSet)Session["dsgrr"];
        foreach (GridDataItem item in radGridView2.Items)
        {
            item["SN#"].Text = null;
            item["TYPE"].Text = null;
            item["ACCOUNTTITLE"].Text = null;
            item["DESCRIPTION"].Text = null;
            item["COSTCENTER"].Text = null;
            item["Debit"].Text = null;
            item["Credit"].Text = null;

        }
        if (e.Node != null && e.Node.Value != null)
        {
            DataRow[] dr = ds.Tables["jv"].Select("ref = '" + e.Node.Value + "'");
            if (!dr.Length.ToString().Equals("0"))
            {
                for (int i = 0; i < dr.Length; i++)
                {
                        this.date.SelectedDate = Convert.ToDateTime(dr[i]["mdate"]);

                        this.refer.Text = dr[i]["ref"].ToString();

                        this.radGridView2.Items[i]["SN#"].Text = (i + 1).ToString();

                        this.radGridView2.Items[i]["TYPE"].Text = dr[i]["initial"].ToString();

                        this.radGridView2.Items[i]["ACCOUNTTITLE"].Text = dr[i]["title"].ToString();

                        this.radGridView2.Items[i]["DESCRIPTION"].Text = dr[i]["disc"].ToString();

                        this.radGridView2.Items[i]["COSTCENTER"].Text = dr[i]["job"].ToString();

                        this.radGridView2.Items[i]["DEBIT"].Text = Class1.fr(dr[i]["dRR"].ToString(), 2);

                        this.radGridView2.Items[i]["CREDIT"].Text = Class1.fr(dr[i]["CRR"].ToString(), 2);


                }
            }
        }
      ttl();   
    }
meraname
  • 53
  • 2
  • 11

0 Answers0