|114013||Oct 22,2013 07:26 PM UTC||Nov 19,2013 11:05 AM UTC||WPF||1|
How to apply ActivateCurrentCellBehavior to rows of a nested WPF GridDataControl?
To elaborate, I have Customers list. Each customer has one or more Orders. I need to show all Customers in a grid. Each Customer row will have a nested grid listing all orders of that customer. First cell of each row (Customers as well as Orders row) needs to be checkbox. I databound a WPF GridDataControl to Customers. Using GridDataControl's Relations property my customers list gets rendered as expected. I applied ActivateCurrentCellBehavior="ClickOnCell" to the GridDataControl so that checkbox can be checked in single mouse click.
With this, checkbox in parent rows i.e. Customer rows, can be checked/unchecked with single mouse click. But checkbox in Order rows still needs to be clicked twice. I want these checkboxes to work in single click as well. Can anyone assist please?
I am using WPF GridDataControl from Essential Studio 2011 Vol 4. I
Sorry for the delay in getting back to you.
We have analyzed your query and you can achieve your requirement by using the following code snippet.
this.syncgrid.ModelLoaded += new EventHandler(syncgrid_ModelLoaded);
void syncgrid_ModelLoaded(object sender, EventArgs e)
this.syncgrid.Model.Table.RecordExpanded += new EventHandler<GridDataValueEventArgs<GridDataRecord>>(Table_RecordExpanded);
void Table_RecordExpanded(object sender, GridDataValueEventArgs<GridDataRecord> e)
e.Value.ChildModels.Options.ActivateCurrentCellBehavior = GridCellActivateAction.ClickOnCell;
We have prepared simple sample based on your requirement and please download the sample from the following location.
let us know if you have any queries.
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.
or the page will be automatically redirected to sign-in page in 10 seconds.