We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
close icon

Button in a grid view

Can you please instruct me how I can add another column in the gridcontrol and then add a button in the column which will give the possibility to execute a popup window?

thanks


3 Replies

RR Ranjithkumar R G Syncfusion Team March 25, 2011 11:42 AM UTC

Hi Malcolm,

Thanks for using Syncfusion products.

Your requirement of opening a pop up window by clicking a button in the GridControl can be achieved by adding Button Control inside Item Template.By Clicking the Button we can pop up the Window Control. Please refer to the code snippet below.

[ASPX]












[CodeBehind-C#]

protected void btn_click(object sender, EventArgs e)
{

Button b = sender as Button;
GridCell gc = b.Parent.Parent as GridCell;
GridRow gr = gc.Row;
Window1.InitiallyShown = true;
}


Please refer to the below link to download the sample application.

forum-987491401243600.zip

Let me know if you need further assistance.

Regards,
Ranjithkumar.





AH Adrian Hedley March 30, 2011 09:08 AM UTC

Its ok as you said but then I need to make the button click event as it is keep getting this error.


Line 199:
Line 200: Line 201: UseSubmitBehavior="false" />
Line 202:


Can you help me to solve this problem??

Thanks and lot for your patience :)




RR Ranjithkumar R G Syncfusion Team April 5, 2011 05:59 AM UTC

Hi Malcolm,

Thanks for using Syncfusion products.

We are sorry for inconvenience caused. We are unable to reproduce the issue. We have prepared a simple sample, video demonstrating the working of the sample and the same can be downloaded from the following links.

forum-98749-1815912228.zip

Could you please try the above sample and get back to us whether you are able to reproduce the issue? If not, could you please give more information or by reproducing the issue in the above sample so that we could sort out the issue and provide you with solution.The information provided would be of great help in resolving the issue.

Please let us know if you need further assistance.

Regards,
Ranjithkumar.


Loader.
Live Chat Icon For mobile
Up arrow icon