March 26, 2009
Due to user feedback, I created a sample that shows how you can use ContentControl3D to host content in the cells of the Infragistics XamDataGrid. I really like this idea, and think it has a lot of potential in many different kinds of applications. It allows you to compress a lot of information into one column in the data grid. The following screenshot from the demo app shows two records: one is showing the front side of a ContentControl3D, the other is showing the back side (the edit form)…
You can download this demo app from the Releases page of the Thriple project. The demo app requires that you have the Infragistics NetAdvantage for WPF product installed (trial version or regular version) in order to run it.
September 14, 2008
I spent the weekend building and expanding on my previous work adorning XamDataGrid with editor controls. I made leaps and bounds of progress, and am very excited about the result. As much of the functionality that can be abstracted away now lives as an attached behavior, called DisplayAdornerEditors. I wrote a big post about it on my other blog, so if you’re interested, I highly recommend you check it out here!
WPF is amazing!
September 12, 2008
Today I created a solution to a problem involving where and how to edit metadata about a value in the XamDataGrid. I blogged about it on my work blog here. The really cool part about the solution, in my opinion, is that I host an editor for the metadata in the adorner layer. The metadata is an explanation for why the user modified the value of a cell in the grid. To me, it just makes sense to put such extraneous information “outside of” the grid, so that it does not clutter up the UI and require the grid cells to be larger than necessary.
Here’s a screenshot of the metadata editor in action:
I think this sample really shows how powerful and flexible WPF is.
September 4, 2008
On my other blog, I published a way to put CheckBoxes into the XamDataGrid. The interesting aspect of the implementation, in my opinion, is how it uses the Model-View-ViewModel pattern to maintain the check state of each CheckBox. Since I put a CheckBox into the header area above the CheckBoxes in each row, I used a ViewModel object to encapsulate the logic that figures out what state the header CheckBox should have, and how to update the state of each row’s CheckBox. It’s just another example of how great MVVM is when working with WPF.
Here’s a screenshot of that demo app:
You can read that blog post here.
July 3, 2008
I tackled an interesting programming task where I needed the width of cells in child records of a XamDataGrid to stay in sync with the width of the corresponding cells in the parent record. I worked through the problem and ended up with a pretty interesting solution, which I blogged about here. Eventually the datagrid will provide that functionality out-of-the-box, but until then at least there’s a temporary solution. WPF is so much fun!
June 20, 2008
I have been writing a lot about XamDataGrid on my other blog recently. My most recent post shows how to save and load the widths of columns/fields across runs of the application. This is just a temporary solution that will eventually be replaced by built-in functionality in the control, but until then, at least we now have a way to do this with ease. My implementation even supports saving/loading the width of fields when showing hierarchical data (i.e. multiple related tables in the same grid). Enjoy!
June 16, 2008
If you use the Infragistics XamDataGrid, you might want to check out my latest post about it. I put together a demo app that shows the proper way to embed controls into unbound fields, and react to the user interacting with them. Here’s the obligatory screenshot…