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. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback


Thread ID:





43639 Apr 27,2006 09:45 PM UTC May 1,2006 09:52 AM UTC WinForms 3
Tags: GridControl
Asked On April 27, 2006 09:45 PM UTC

I need to resize a row, I have a text box and a pushbutton in the row, and when I do a resizetofit on rowheights, the button also resize''s it size to fit the entire column, is it possible to keep the button to its default size. I have posted a sample app, herewith. And the version used is .Net 2003 with syncfusion Thanks, Shankar


Administrator [Syncfusion]
Replied On April 28, 2006 04:40 AM UTC

Hi Shankar, You need to handle the Grid''s DrawCellButton event to keep the pushbutton size.Here is a code snippet private void gridControl1_DrawCellButton(object sender, Syncfusion.Windows.Forms.Grid.GridDrawCellButtonEventArgs e) { if(e.Style.CellType == "PushButton") { int width = 64; int height = 17; e.Button.Bounds = new Rectangle(e.Button.Bounds.X,e.Button.Bounds.Y,width,height); } } Please let me know if you need any further assistance. Thanks for choosing Syncfusion Products. Regards, Haneef

Replied On April 28, 2006 03:32 PM UTC

Thanks for the code, Haneef. But the entire column is able to pick the mouseclick event, Is there any way in which I can clip only the button bounds to pick the mouse click event. Thanks, shankar

Administrator [Syncfusion]
Replied On May 1, 2006 09:52 AM UTC

Hi Shankar, Please try this code to cancel the mouse click.Here is a code snippet. if( e.CellButton != null ) { if( rect.IntersectsWith(new Rectangle(e.MouseEventArgs.X ,e.MouseEventArgs.Y ,1,1) )) { flag = false; } else { flag = true; } } Here is a modified sample. http://www.syncfusion.com/Support/user/uploads/SampleApp_32b0256e.zip Please let me know if you need any further assistance. Thanks for choosing Syncfusion Products. Regards, Haneef


This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

or the page will be automatically redirected to sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon