Click here to Skip to main content
15,884,472 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Appeal to Silverlight senior coders out there. I am a .Net developer with a few years of ASP.Net and a year or so Web Forms, and 6 months of Silverlight and WPF.

I have a datagrid on a tab in silverlight that must total itself based on check columns selected. Columns are annual budget amounts for each type of account. Change in checkboxes column must fire an update of totals.

I have another datagrid where users can spend the money in first datagrid. The first two columns are dropdowns. This spending grid has a separate summary grid that tells ammount of money left for each year from column totals of the first.

Before you paste in your XAML from WPF, just a moment, the worst is yet to come.

This is a legacy, large website that is a mixture of ASP.Net and Silverlight with some WCF services. I know some parts of the Silverlight were coded with MEF/PRISM.

I also know that it is impossible to handle any bindings in XAML. I suspect this is because of the MEF/PRISM.

Now for my question. I am looking for how to code template columns in a datagrid without ANY XAML! Not even as a resource library item, or in another assembly. Coders before me did check columns and textbox columns that were declared and bound in VB code.

I can declare a datagrid and do its top tag attributes in xaml, but no column definitions or bindings can be done in XAML. I am after a checkbox column event that catches updates in checkbox columns, and a selection changed event to update two dropdowns where second is dependent on info from the first.

If you can define this and show that the event handlers are firing for the checkbox column and two dropdowns where second loads based on the first from XAML, I would greatly appreciate it.

My best guess is that PRISM/MEF can't runs before and can't see into xaml. When xaml does more that a GUI (e.g. setting up columns/databindings) it crashes. I have done this successfully with xaml in a separate prototype project that does not use PRISM.

I am open to building up a string and pushing it through the XAML reader class, but not sure if that will work as of yet since I am not sure why it is crashing when working xaml is pasted from almost exact protoype file.
Posted

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900