﻿<?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 - V1 » WinForms (How do I?)  » Binding to an editable grid?</title><generator>InstantForum 2017-1 Final</generator><description>StrataFrame Forum</description><link>http://forum.strataframe.net/</link><webMaster>StrataFrame Forum</webMaster><lastBuildDate>Tue, 09 Jun 2026 00:35:03 GMT</lastBuildDate><ttl>20</ttl><item><title>Binding to an editable grid?</title><link>http://forum.strataframe.net/FindPost1889.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?&amp;nbsp; If not with the enhanced list is there a way to do it with the DevExpress grid control?</description><pubDate>Fri, 21 Jul 2006 09:37:58 GMT</pubDate><dc:creator>Andria Jensen</dc:creator></item><item><title>RE: Binding to an editable grid?</title><link>http://forum.strataframe.net/FindPost1914.aspx</link><description>I am glad you got going.&amp;nbsp; 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/FindPost1913.aspx</link><description>That's okay, I've worked through it and have it working now.&amp;nbsp; 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/FindPost1911.aspx</link><description>Andria,&lt;/P&gt;&lt;P&gt;Sorry for the slow response.&amp;nbsp; I guess I missed this post.&amp;nbsp; At what point are you getting the error message?&amp;nbsp; 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/FindPost1896.aspx</link><description>Everything seems to be working fine, except for when I add a new row to a blank table.&amp;nbsp; 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.&amp;nbsp; Well basically it looks like CurrentRowIndex is set to -1 even though there is a record in the BO.&amp;nbsp; 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.&amp;nbsp; Business object record count: 1.&amp;nbsp; CurrentRowIndex: -1."}&lt;/P&gt;&lt;P&gt;Any idea what would cause this?&amp;nbsp; I can add records to a table that already has records, but not to a blank table.&amp;nbsp;</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/FindPost1895.aspx</link><description>Great!&amp;nbsp; Thanks, I think I have something working now.&amp;nbsp; 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/FindPost1894.aspx</link><description>StrataFrame uses an ADO.NET data table internally in a BO to store the data.&amp;nbsp; 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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 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.&amp;nbsp; 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/FindPost1893.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.&amp;nbsp; Will&amp;nbsp;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/FindPost1892.aspx</link><description>You will have to save the changes back to the database yourself.&amp;nbsp; You will need to call the Save on the BO before the changes are committed to the database.&amp;nbsp; Is this what you mean?&amp;nbsp; 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/FindPost1891.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?&amp;nbsp; 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/FindPost1890.aspx</link><description>The Enhanced list is a grid modified for list-like interaction.&amp;nbsp; This is to produce a behavior more like the ListView within the standard StrataFrame control collections.&amp;nbsp; If you want to allow editing within a grid, then you will need to use the DevExpress grid.&amp;nbsp; When using a grid you will need to use the CurrentDataTable or CurrentView of the business object as the data source.&amp;nbsp;</description><pubDate>Wed, 19 Jul 2006 09:34:26 GMT</pubDate><dc:creator>Trent L. Taylor</dc:creator></item></channel></rss>