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 : Nov 16th 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

How do I add the Click hander for celltype=button

Thread ID:

Created:

Updated:

Platform:

Replies:

77319 Oct 24,2008 08:01 PM UTC Oct 24,2008 10:06 PM UTC WPF 2
loading
Tags: GridControl
Karl Meissnersd
Asked On October 24, 2008 08:01 PM UTC

I have a made a cell type be a button. How do I add a handler for the click event to a particular button.


_grid.Model[ 0, 0 ].CellType = "Button";
_grid.Model[ 0, 0 ].Description = "ButtonA";
// += button handler for A

_grid.Model[ 1, 0 ].CellType = "Button";
_grid.Model[ 1, 0 ].Description = "ButtonB";
// += button handler for B



Karl Meissnersd
Replied On October 24, 2008 08:38 PM UTC


Also really fustrating is this does not work.
Button b = (Button)_grid.Model[ 0, 0 ].CellModel.ActiveRenderer.CurrentCellUIElement;
b.Click += new RoutedEventHandler( b_Click );

ActiveRenderer is null during load.

The interfaces needs a lot more comments....



Administrator [Syncfusion]
Replied On October 24, 2008 10:06 PM UTC

Currently, you have to create a CellRenderer and subscribe the the click event in the WireUIElement event in the renderer.

Here is a little sample.




WpfGridStub_52460aa2.zip

CONFIRMATION

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.

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

;