﻿<?xml version='1.0' encoding='UTF-8'?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/"><channel><title>StrataFrame Forum / StrataFrame Application Framework / WinForms (How do I?)  / Binding to an editable grid? / Latest Posts</title><generator>InstantForum.NET v4.1.4</generator><description>StrataFrame Forum</description><link>http://forum.strataframe.net/</link><webMaster>forum@strataframe.net</webMaster><lastBuildDate>Wed, 07 Jan 2009 17:05:17 GMT</lastBuildDate><ttl>20</ttl><item><title>RE: Binding to an editable grid?</title><link>http://forum.strataframe.net/Topic1889-7-1.aspx</link><description>I am glad you got going.  Sorry again. :blush:</description><pubDate>Fri, 21 Jul 2006 09:37:58 GMT</pubDate><dc:creator>Trent L. Taylor</dc:creator></item><item><title>RE: Binding to an editable grid?</title><link>http://forum.strataframe.net/Topic1889-7-1.aspx</link><description>That's okay, I've worked through it and have it working now.  Thanks though :)</description><pubDate>Fri, 21 Jul 2006 09:35:24 GMT</pubDate><dc:creator>Andria Jensen</dc:creator></item><item><title>RE: Binding to an editable grid?</title><link>http://forum.strataframe.net/Topic1889-7-1.aspx</link><description>Andria,&lt;/P&gt;&lt;P&gt;Sorry for the slow response.  I guess I missed this post.  At what point are you getting the error message?  Can you give me a code snippet?</description><pubDate>Fri, 21 Jul 2006 09:20:49 GMT</pubDate><dc:creator>Trent L. Taylor</dc:creator></item><item><title>RE: Binding to an editable grid?</title><link>http://forum.strataframe.net/Topic1889-7-1.aspx</link><description>Everything seems to be working fine, except for when I add a new row to a blank table.  It gives me an error on my BO.Save method saying 'An error occured while saving data to the server' and to check the InnerException.  Well basically it looks like CurrentRowIndex is set to -1 even though there is a record in the BO.  The actual error message is this: &lt;/P&gt;&lt;P&gt;{"The CurrentRow could not be evaluated because the CurrentRowIndex is out of range.  Business object record count: 1.  CurrentRowIndex: -1."}&lt;/P&gt;&lt;P&gt;Any idea what would cause this?  I can add records to a table that already has records, but not to a blank table. </description><pubDate>Wed, 19 Jul 2006 12:10:59 GMT</pubDate><dc:creator>Andria Jensen</dc:creator></item><item><title>RE: Binding to an editable grid?</title><link>http://forum.strataframe.net/Topic1889-7-1.aspx</link><description>Great!  Thanks, I think I have something working now.  This will be great for what I'm trying to do.</description><pubDate>Wed, 19 Jul 2006 10:23:58 GMT</pubDate><dc:creator>Andria Jensen</dc:creator></item><item><title>RE: Binding to an editable grid?</title><link>http://forum.strataframe.net/Topic1889-7-1.aspx</link><description>StrataFrame uses an ADO.NET data table internally in a BO to store the data.  If the internal data table (CurrentDataTable, CurrentView, or CurrentRow) changes any of the contents either manually or through a control of some sort, the BO will know that it is dirty and requires an update.&lt;P&gt;For example, the code below changes the field through the weak typed ADO.NET data table instead of using the strong-typed properties of the BO.&lt;/P&gt;&lt;P&gt;&lt;FONT color=#1111ff&gt;MyBO.CurrentDataTable.Rows(0).Item("my_field") = "Testing"&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;This will change the contents of the field and the business object will still know that a save is required just as though it had been changed through a strong-typed property or an SF control.&lt;/P&gt;&lt;P&gt;&lt;FONT color=#1111ff&gt;If MyBO.IsDirty Then&lt;BR&gt;     MyBO.Save()&lt;BR&gt;End If&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;So if you use ADO.NET data binding to the DevExpress grid, the BO will still function properly.  But you will still be required to manually call the Save() method on the BO to save commit the changes back to the server.</description><pubDate>Wed, 19 Jul 2006 10:11:46 GMT</pubDate><dc:creator>Trent L. Taylor</dc:creator></item><item><title>RE: Binding to an editable grid?</title><link>http://forum.strataframe.net/Topic1889-7-1.aspx</link><description>That's kind of what I'm asking. I guess what I mean is does it work like the other SF controls which you can just set to a BO and they automatically update as you change the contents using the Edit and Save events.  Will it work along with something like the Maintenance Toolstrip?</description><pubDate>Wed, 19 Jul 2006 10:05:09 GMT</pubDate><dc:creator>Andria Jensen</dc:creator></item><item><title>RE: Binding to an editable grid?</title><link>http://forum.strataframe.net/Topic1889-7-1.aspx</link><description>You will have to save the changes back to the database yourself.  You will need to call the Save on the BO before the changes are committed to the database.  Is this what you mean?  The same is true for any other StrataFrame control, it requires a Save before any change is committed.</description><pubDate>Wed, 19 Jul 2006 09:41:54 GMT</pubDate><dc:creator>Trent L. Taylor</dc:creator></item><item><title>RE: Binding to an editable grid?</title><link>http://forum.strataframe.net/Topic1889-7-1.aspx</link><description>Ok, is there a way to have it accept changes made by the user in the grid and save them to the bound data source?  Or is this just something that I'll have to do manually somehow?</description><pubDate>Wed, 19 Jul 2006 09:38:31 GMT</pubDate><dc:creator>Andria Jensen</dc:creator></item><item><title>RE: Binding to an editable grid?</title><link>http://forum.strataframe.net/Topic1889-7-1.aspx</link><description>The Enhanced list is a grid modified for list-like interaction.  This is to produce a behavior more like the ListView within the standard StrataFrame control collections.  If you want to allow editing within a grid, then you will need to use the DevExpress grid.  When using a grid you will need to use the CurrentDataTable or CurrentView of the business object as the data source. </description><pubDate>Wed, 19 Jul 2006 09:34:26 GMT</pubDate><dc:creator>Trent L. Taylor</dc:creator></item><item><title>Binding to an editable grid?</title><link>http://forum.strataframe.net/Topic1889-7-1.aspx</link><description>Is there any way to bind to the enhanced list and also have it be editable so that users can make changes directly to the grid itself?  If not with the enhanced list is there a way to do it with the DevExpress grid control?</description><pubDate>Wed, 19 Jul 2006 09:31:39 GMT</pubDate><dc:creator>Andria Jensen</dc:creator></item></channel></rss>