Silverlight Controls and Silverlight Toolkithttp://forums.silverlight.net//35.aspx/1?Silverlight+Controls+and+Silverlight+ToolkitDiscussions around using and developing Silverlight controls and the Silverlight ToolkitMon, 01 Jan 0001 00:00:00 -050035261295http://forums.silverlight.net//p/115892/261295.aspx/1?DataGrid+starts+showing+empty+records+after+moving+to+SL3DataGrid starts showing empty records after moving to SL3 <p>I'm working on a large project that has been converted from SL2 to SL3 recently. Everything worked fine untill one of my colleages loaded the project. He had to remove and add the references to System.Windows.Controls and System.Windows.Controls.Data, because VS couldn't find them. He then checked in his version of the project in our source control system and after I got that version and ran it, one of my datagrids failed to show data. It does show rows (I can see the alternating background), but there is no data in them. It's not the font color, I checked.</p> <p>The thing that puzzles me most is that other datagrids, in the same assembly as the one that failed, are working properly. It's just this one datagrid not working. I have looked at the bindings in the XAML. They appear to be correct. I've set the AutoGenerateColumns attribute to True to see if it would show data. It did show all the available columns, but not any data in them (again it did show the rows / alternating background).</p> <p>I checked to see if the fields are actually filled as I assign the collection to the ItemsSource property and they are. I can't seem to figure out why it isn't showing any data. I'd be thankful for any help.</p> 2009-07-31T13:27:18-04:00261352http://forums.silverlight.net//p/115892/261352.aspx/1?Re+DataGrid+starts+showing+empty+records+after+moving+to+SL3Re: DataGrid starts showing empty records after moving to SL3 <p>&nbsp;Very strange.&nbsp; Could you be using a different font for this datagrid then the others?<br> </p> 2009-07-31T15:16:21-04:00262144http://forums.silverlight.net//p/115892/262144.aspx/1?Re+DataGrid+starts+showing+empty+records+after+moving+to+SL3Re: DataGrid starts showing empty records after moving to SL3 I checked. I don't set any fonts on these datagrids. I'll work some more on this today and let you know what I find.<br> 2009-08-03T07:00:02-04:00262204http://forums.silverlight.net//p/115892/262204.aspx/1?Re+DataGrid+starts+showing+empty+records+after+moving+to+SL3Re: DataGrid starts showing empty records after moving to SL3 <p>I did some more research. It appears that I was referencing some older version of System.Windows.Controls.Data before. I ran a comparison in our source control tool and&nbsp; found that this assembly has a new public key token (obviously), but it's reference was also including a hintpad, which I removed. It also specified specific version = false, which I also removed. Finally there was a processorArchitecture attribute, specificing that MSIL architecture should be used. I removed that too.</p> <p>All this didn't change anything to the workings of our application. Finally I restored the old public key token on the reference. This broke the reference (which used to work on my machine)! I don't understand why it breaks, because the assembly is still there.</p> <p>I also included a listbox in the same UserControl and bound it to the same data. That does work.</p> <p>Any suggestions are very welcome. <br> </p> 2009-08-03T09:00:35-04:00262301http://forums.silverlight.net//p/115892/262301.aspx/1?Re+DataGrid+starts+showing+empty+records+after+moving+to+SL3Re: DataGrid starts showing empty records after moving to SL3 <p>&nbsp;I am making some progress. I've build a test project that uses the same webservice to get the same data and shows it in a datagrid. This works fine. However I did have to build a mechanism to inflate the data as it came from the webservice (this was already part of the original application) and I chose to build a simplified version of it.<br> </p> <p>I've also loaded the data from the failing datagrid into another datagrid in the same assembly and there it did fail the other datagrid. This leads me to conclude that something is wrong with the way the data is inflated, altough it does work in the listbox control.</p> <p>I'll do some more tests, to find out what exactly is the problem. Any suggestions are still very welcome.<br> </p> 2009-08-03T12:26:21-04:00262458http://forums.silverlight.net//p/115892/262458.aspx/1?Re+DataGrid+starts+showing+empty+records+after+moving+to+SL3Re: DataGrid starts showing empty records after moving to SL3 <p>&nbsp;I couldn't find anything wrong with the data. I've had a colleague come in and have a look and we tested some more behavior. What stunned us, was that non of the getters of the business objects we are loading in this particular grid is actually being called. When we sort the records by clicking one of the column headers however, the getter bound to that specific column is being called, but no data is showed.</p> <p>We tested the application on my colleagues system and it worked fine there. This now leads us to believe something has gone wrong with my development computer, while upgrading it to Silverlight 3. To try and correct this I uninstalled both Silveright SDK's, the Silverlight 3 tools for VS2008SP1, both the Silverlight Toolkits and the Silverlight runtime. I then installed only Silverlight 3 SDK, tools, toolkit and runtime, but no luck there.</p> <p>I'm planning to look into the following tomorrow:</p> <ul> <li>Test the solution on a VM I installed to test the upgrade to Silverlight 3 with our codebase</li><li>Get my colleague to compile to total Silverlight solution and deploy it in IIS to see if this works with the runtime on my machine</li><li>If any of these works, compare the contents of the .xap files, to see if some assemblies have different versions or for exmpale if there is something different in a manifest.</li></ul> <p>If anyone has any more suggestions or insights into how to solve this, I'd be very greatful. <br> </p> 2009-08-03T17:16:40-04:00262898http://forums.silverlight.net//p/115892/262898.aspx/1?Re+DataGrid+starts+showing+empty+records+after+moving+to+SL3Re: DataGrid starts showing empty records after moving to SL3 <p>&nbsp;I fixed it!!! Here is a summary of what happened and how I fixed it.</p> <p>In december 2008 a seperate upgrade was brought out by Microsoft for the datagrid. To use it you had to replace the System.Windows.Controls.Data.dll with a new version and recreate references to this assembly. We did this, because some of the issues we had are fixed in this version.</p> <p>When upgrading to SL3 I still had SL2 installed (as you can read in previous replies in this thread). While upgrading my project files, apperantly Microsoft didn't include the upgraded version of System.Windows.Controls.Data.dll in the list of assemblies to change. The reference remained the same.</p> <p>As my colleague started his work on the project, he installed only SL3 and tried running the application. This failed because the upgraded System.Windows.Controls.Data.dll was still referenced and he didn't have that assembly on his machine. He recreate the references to System.Windows.Controls.Data.dll on his machine and it worked. By doing so a hintpad was included in the reference point to the SL2 SDK folder.</p> <p>I went with his changes and suddenly one datagrid in the application failed for some reason. As it happens we dynamically load .xap files and two of these (one with the datagrid that failed and one other .xap file) include a reference to System.Windows.Controls.Data.dll. I fixed the reference in the one that containes the failed datagrid by recreating it once more, but I didn't fix the one in the other .xap file. Only this morning when I tried building my solution on a VM I had setup for testing the upgrade to SL3, did I notice that during build time a conflict between versions of System.Windows.Controls.Data.dll was reported.</p> <p>I checked which project and recreated the reference there and it works again! </p> <p>For a more extended explanation, check this<a href="http://jvdveen.blogspot.com/2009/08/adventures-while-building-silverlight.html" target="_blank"> blog post</a>.<br> </p> 2009-08-04T08:30:21-04:00