UpdateCommand fire from button click

3 posts, 0 answers
  1. mohamed
    mohamed avatar
    311 posts
    Member since:
    Mar 2011

    Posted 04 Jan 2013 Link to this post


    I want to call RadTreeListWork_UpdateCommand from radbutton click event

    Thanks Advance,
    Mohamed.
  2. mohamed
    mohamed avatar
    311 posts
    Member since:
    Mar 2011

    Posted 04 Jan 2013 Link to this post



    RadTreeListWork.ItemDataBound += new EventHandler<TreeListItemDataBoundEventArgs>(RadTreeListWork_ItemDataBound);

    I call like that but not come the RadTreeListWork.ItemDataBound

    what i do

    Thanks Advance,
    Mohamed.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Shinu
    Shinu avatar
    17764 posts
    Member since:
    Mar 2007

    Posted 07 Jan 2013 Link to this post

    Hi,

    FireCommand can be used to invoke custom commands along with a single string argument which can be accessed later on using the OnItemCommand server event. Here is the sample code.
    C#:
    protected void RadButton1_Click(object sender, EventArgs e)
    {
        RadTreeList tree = (this.FindControl("RadTreeList1") as RadTreeList);
        TreeListEditableItem item = (TreeListEditableItem)RadTreeList1.GetItems(TreeListItemType.EditItem)[0];
        item.FireCommandEvent("Update","");
    }

    Thanks,
    Shinu.
Back to Top