﻿<?xml version="1.0" encoding="utf-8"?><rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:sy="http://purl.org/rss/1.0/modules/syndication/" xmlns:media="http://search.yahoo.com/mrss/" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0"><channel><title>Intersoft Community - WebGrid Enterprise - Applying SortedColumns along with RetrieveStructure</title><link>http://www.intersoftsolutions.com/Community/WebGrid/Applying-SortedColumns-along-with-RetrieveStructure/</link><description /><generator>http://www.intersoftsolutions.com</generator><language>en</language><copyright>Copyright 2002 - 2015 Intersoft Solutions Corp. All rights reserved.</copyright><ttl>60</ttl><item><title>Applying SortedColumns along with RetrieveStructure</title><link>http://www.intersoftsolutions.com/Community/WebGrid/Applying-SortedColumns-along-with-RetrieveStructure/</link><pubDate>Wed, 16 Jun 2010 09:09:36 GMT</pubDate><dc:creator>bloveall</dc:creator><description>&lt;p&gt;Thanks Glenn. I was able to get this to work. The key, it seems, is that the addition of columns to the various filter collections needs to take place in PrepareDataBinding. That was the difference.&lt;/p&gt;
&lt;p&gt;Thanks,&lt;/p&gt;
&lt;p&gt;Brad&lt;/p&gt;</description></item><item><title>Applying SortedColumns along with RetrieveStructure</title><link>http://www.intersoftsolutions.com/Community/WebGrid/Applying-SortedColumns-along-with-RetrieveStructure/</link><pubDate>Tue, 15 Jun 2010 22:58:29 GMT</pubDate><dc:creator>Glayaar</dc:creator><description>&lt;p&gt;Attached is a simple sample of WebGrid with programatic data bind and retrieve structure functionality. It is demonstrated that adding the field to sorted column collection after retrieve structure will sort the WebGrid data. &lt;br /&gt;&lt;/p&gt;&lt;p&gt;The data binding is performed in the InitializeDataSource server side event handler, while the retrieve structure will be performed during the PrepareDataBinding server side event handler.&lt;br /&gt;&lt;/p&gt;</description></item><item><title>Applying SortedColumns along with RetrieveStructure</title><link>http://www.intersoftsolutions.com/Community/WebGrid/Applying-SortedColumns-along-with-RetrieveStructure/</link><pubDate>Tue, 15 Jun 2010 15:43:12 GMT</pubDate><dc:creator>bloveall</dc:creator><description>&lt;p&gt;Handy,&lt;/p&gt;
&lt;p&gt;The columns are ultimately specified; what I meant is that they're not specified in the aspx page but, rather, RetrieveStructure() is used to specify the columns. We have some scenarios where the same WebGrid is used for a couple of different searches and we display the different result sets in the same WebGrid. Then the user is allowed to save their preferences, both their form field entries which generate the results, as well as the field(s) that they sorted on, columns that they filtered on, etc. So, we want our users to be able to load one of the reports that they have saved in this manor, call "RetrieveStructure" and then apply the filters via SortedColumns.Add() but it doesn't seem to work. It doesn't work if I call it before or after RetrieveStructure. Is there a way to accomplish this goal? This same process does work in situations where the columns are added to the grid without RetrieveStructure.&lt;/p&gt;
&lt;p&gt;Thanks,&lt;/p&gt;
&lt;p&gt;Brad&lt;/p&gt;</description></item><item><title>Applying SortedColumns along with RetrieveStructure</title><link>http://www.intersoftsolutions.com/Community/WebGrid/Applying-SortedColumns-along-with-RetrieveStructure/</link><pubDate>Tue, 15 Jun 2010 15:01:42 GMT</pubDate><dc:creator>handy@intersoftpt.com</dc:creator><description>&lt;p&gt;Hello Brad,&lt;/p&gt;&lt;p&gt;If the columns are not specified, what do you need sort for? Only when column structure is specified, you can use sort. I think you can do yor sorting after you called RetrieveStructure. If you specified the sort before RetrieveStructure, of course WebGrid would not sort.&lt;/p&gt;
&lt;p&gt;Regards,&lt;br /&gt;Handy&lt;/p&gt;</description></item><item><title>Applying SortedColumns along with RetrieveStructure</title><link>http://www.intersoftsolutions.com/Community/WebGrid/Applying-SortedColumns-along-with-RetrieveStructure/</link><pubDate>Tue, 15 Jun 2010 11:43:36 GMT</pubDate><dc:creator>bloveall</dc:creator><description>&lt;p&gt;I am using the WebGrid in two scenarios, one where the columns are known and added in the aspx page and the other where the columns are dynamic and not known and in that case we rely on the RetrieveStructure method. In some cases, we are sorting the grid at runtime via Me.RootTable.SortedColumns.Add(New WebGridGroup("PersonName", 2)). When we run this code and the columns are known at design time, it works fine, i.e., the grid is sorted correctly. In the cases where we have to call RetrieveStructure, on the other hand, and we run the same code, the grid is not sorted on the columns that we specify. So my question is: when we have a grid where the columns are not specified, at what point do we call Me.RootTable.SortedColumns.Add()??? A second question is whether or not there is some other code that needs to be executed in RetrieveStructure scenarios in order to sort.&lt;/p&gt;
&lt;p&gt;Thanks,&lt;/p&gt;
&lt;p&gt;Brad&lt;/p&gt;</description></item></channel></rss>