This thread looks to be a little on the old side and therefore may no longer be relevant. Please see if there is a newer thread on the subject and ensure you're using the most recent build of any software if your question regards a particular product.
This thread has been locked and is no longer accepting new posts, if you have a question regarding this topic please email us at support@mindscape.co.nz
|
Hi, I'm new to Dynamic Data grids and so far I've managed to get my LightSpeed model connected up to a simple DD website (very quick and easy!) but from what I can understand, the following ASP code, the default in a Dynamic Data project, should result in a grid that can be re-ordered by the user (by clicking on column headers for example). It doesn't.
<asp:GridView ID="GridView1" runat="server" DataSourceID="GridDataSource"
Is there just some required ASP.NET code that I've missed in the DD tutorials and samples, am I expecting too much or is there something I need to do with my LightSpeed model to enable support for sorting data?
Thanks, Chris |
|
|
None of the above *grin* -- Dynamic Data only allows sorting on a column if the data source explicitly identifies the column as sortable, and LightSpeed wasn't doing so. I've committed a fix that will allow sorting on any non-association column, and this will be in the 23 July nightly. Depending on the kinds of properties you have in your domain model, you may find that this is a bit too generous, and that it enables users to try to sort on columns which turn out not to be sortable at all: please let us know if you run into such situations and we will try to address them. One particular caveat: SQL Server doesn't allow ORDER BY on "text" (as opposed to varchar) columns, but a LightSpeed domain model doesn't know that sort of database level detail -- it just sees a string property -- so it will allow users to try to sort, which will cause a SqlException. If this is an issue for you, let us know and we will see what we can do to remedy it. And of course please do let us know if you run into any other problems with the fix. |
|
|
Hi Ivan, Thanks for the quick fix. I've not had much time to try it out today but a brief play with it looks good. I can at least sort all of the expected columns in the first Entity I looked at. We use MySQL so hopefully this fix will be good enough to get things moving. The DD website is actually for a small internal admin team of intelligent people so the occasional glitch like a column that appears sortable when it is not will probably not be an insurmountable problem - and it's certainly preferred to no sorting at all! I'll let you know if I come across any other related issues but you should assume no news is good news :-) Thanks, Chris |
|