Getting error in Retrieving PartyParentRowId....

Thread is closed for posting
2 posts, 0 answers
  1. Gopi
    Gopi avatar
    15 posts
    Member since:
    Jan 2013

    Posted 06 Jan 2015 Link to this post

     protected void RadButton1_Click(object sender, EventArgs e)

                RadTreeList1.ItemCommand -= new EventHandler<TreeListCommandEventArgs>(RadTreeList1_ItemCommand);

                ContentPlaceHolder contentPage = this.Page.Master.FindControl("ContentPlaceHolder1") as ContentPlaceHolder;
                RadButton R = sender as RadButton;
                RadButton radbutton1 = R.Parent.FindControl("RadButton1") as RadButton;
                CommandEventArgs e2 = new CommandEventArgs(null, radbutton1.CommandArgument);
                TreeListCommandEventArgs e1 = new TreeListCommandEventArgs(null, radbutton1.CommandArgument, e2);
                //TreeListDataItem dataItem = e1.Item as TreeListDataItem;
                Hashtable table = new Hashtable();
                TreeListEditFormItem item = e1.Item as TreeListEditFormItem;
                //string title = (item["PartyParentRowId"].FindControl("TextBox1") as Label).Text;
                //TableCell cell = item["PartyParentRowId"];
                table["PartyParentRowId"] = (item.FindControl("TextBox1") as TextBox).Text;
                table["PartyAlias"] = (item.FindControl("Label2") as Label).Text;

  2. Pavlina
    Pavlina avatar
    6187 posts

    Posted 09 Jan 2015 Link to this post


    Find attached a sample test page which demonstrates how you can retrieve the value of textbox in edititemtemplate. Give it a try and see if it works for you. In case this is not your scenario elaborate a bit more in the details.


    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

Back to Top