This is a migrated thread and some comments may be shown as answers.

Getting error in Retrieving PartyParentRowId....

1 Answer 12 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Gopi
Top achievements
Rank 2
Gopi asked on 06 Jan 2015, 12:48 PM
 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;

        }

1 Answer, 1 is accepted

Sort by
0
Pavlina
Telerik team
answered on 09 Jan 2015, 01:09 PM
Hello,

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.

Regards,
Pavlina
Telerik
 

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.

 
Tags
General Discussions
Asked by
Gopi
Top achievements
Rank 2
Answers by
Pavlina
Telerik team
Share this question
or