Sign UpSign Up   Sign InSign In Welcome Guest,
Live Chat Live Chat

Eventclick from an external button

Last post 06-22-2009, 2:01 PM by erjona. 2 replies.
Sort Posts: Previous Next
  •  06-22-2009, 11:37 AM 184909

    Eventclick from an external button

    Hello,

    We are facing a new problem with ASPOSE.WEB grid.

    We have a added a custom button inside the grid Id="Preview" (we added it form the Custom command buttons editor, at design time in VS.NET)

    We would like to arise an eventclick on the "Preview" button, from another aspx button that is external to the grid Id="btnPrev".

    Is this possible with your product?

    Thanks and regards

    Erjona

     
  •  06-22-2009, 12:54 PM 184919 in reply to 184909

    Re: Eventclick from an external button

    Hi,

    Well, when a gridweb's custom button is clicked, the GridWeb1_CustomCommand event is raised.I think you may add an asp.net button and write code for what you want to perform.

    For example we add an asp.net button, now you should add a line of code to get gridweb's data to post back on the server.

    e.g

    protected void Page_Load(object sender, EventArgs e)

    {

    if (!IsPostBack)

    {

    // Update the GridWeb's data on the server.

    Button1.Attributes["onclick"] = "GridWeb1.updateData(); return GridWeb1.validateAll();";

    ...........................

    }

    }

    ...................

    protected void Button1_Click(object sender, EventArgs e)

    {

    //Your code goes here.

    }

     

    And,  you may customize context menu of the GridWeb for your need too, for reference, please check the demo: http://www.aspose.com/demos/visual-components/aspose.grid/csharp/demos/common/custom-context-menu.aspx

     

    Thank you.


    Amjad Sahi
    Support Developer,
    Aspose Sialkot Team
    Contact Us
     
  •  06-22-2009, 2:01 PM 184935 in reply to 184919

    Re: Eventclick from an external button

    It works perfectly...

    thanks a lot

    Erjona

     
View as RSS news feed in XML