Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How do you implement SKIP 1 in WPF / LINQ?
Message
From
25/06/2008 11:44:34
 
 
To
25/06/2008 00:50:25
General information
Forum:
ASP.NET
Category:
Windows Presentation Foundation (WPF)
Miscellaneous
Thread ID:
01326110
Message ID:
01326648
Views:
14
So does the List-based method you suggested work for binding to WPF UI controls, and will it lend to updateing the SQL tables using the Linq-to-Sql SubmitChanges method?

My plan is to create a detail edit form with VCR Buttons and a bunch of TextBoxes nested in a ContentControl to display the data from the table. Then, when the user finds the desired record, and edits the data in the TextBoxes, I will have a Save Button to commit the changes to the SQL table, via the Linq-to-Sql features.

So far, my Linq queries have pulled IEnumerable collections that I have displayed in a ListView, so the List collection is new to me.



> There are a lot of ways to go about this the simplest would just be:
>
>
>List<customer> customers = (from a in db.customers
>    where SqlMethods.Like(a.custno,CustomerFilter) || SqlMethods.Like(a.company,CustomerFilter)
>    orderby a.custno
>    select a).ToList();
>
>
>Then you get an indexer customers[x] that you can use like a skip.
>
>
>>OK... After HOURS of digging around on the internet and various blogs, MSDN, etc. I have figured out at a little more about this topic. I thought
>I'd share what I've found so far, in case anyone was interested.
>>
>>
>>Here are some helpful links:
>>
>>How to: Navigate Through the Objects in a Data CollectionView:
>> http://msdn.microsoft.com/en-us/library/ms754244.aspx
>>
>>How to: Bind to a Collection and Display Information Based on Selection:
>> http://msdn.microsoft.com/en-us/library/aa970558(VS.85).aspx
>>
>>
>>How to: Use the Master-Detail Pattern with Hierarchical Data:
>> http://msdn.microsoft.com/en-us/library/ms742531.aspx
>>
>>
>>>I pull a list of Jobs from a table using a Linq statement, and I want to build a UI form in WPF to show the records one at a time with a VCR-type control to navigate forward and backward through the Linq data set. How do I implement the equivalent of VFP's Skip behavior to navigate through the records one-at-a-time?
>>>
>>>In my VFP (Visual Foxpro) app, I open a table and use a VCR control in my UI form to "Skip 1" and go to the next record to present the data fields in a detail form and allow the the user viewing or editing capabilites. It is a simple and common UI design that I have not been able to find samples of for WPF.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform