﻿<?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 » Business Objects and Data Access (How do I?)  » Using FillDataTable method</title><generator>InstantForum 2017-1 Final</generator><description>StrataFrame Forum</description><link>http://forum.strataframe.net/</link><webMaster>StrataFrame Forum</webMaster><lastBuildDate>Sun, 20 Sep 2026 10:28:46 GMT</lastBuildDate><ttl>20</ttl><item><title>Using FillDataTable method</title><link>http://forum.strataframe.net/FindPost7931.aspx</link><description>Hi,&lt;br&gt;
&lt;br&gt;
i am showing some data in a grid present in the form.&lt;br&gt;
i want user can modify the customers in grid and also can add new.&lt;br&gt;
lets say i have customers.&lt;br&gt;
&lt;br&gt;
so what is do is. &lt;br&gt;
//in the BO&lt;br&gt;
public Datatable GetExistingCustomers()&lt;br&gt;
{&lt;br&gt;
   return GetByStoredProcedure("proc_GetCustomers");&lt;br&gt;
}&lt;br&gt;
&lt;br&gt;
//in the form &lt;br&gt;
DataTable dtCustomers = customerBO1.GetExistingCustomers();&lt;br&gt;
gridCustomer.DataSource = dtCustomers;&lt;br&gt;
&lt;br&gt;
now i want to use fill the BO i use on my form with same records as i am showing in the grid.&lt;br&gt;
please tell me how can i do this.&lt;br&gt;
should i need to use the CopyDataFrom() function. i tried this but when i use &lt;br&gt;
customerBO1.NewRow() i got exception [b]"The given key was not present in the dictionary."[/b].&lt;br&gt;
&lt;br&gt;
am i missing some thing??...please give me any solution..&lt;br&gt;</description><pubDate>Fri, 06 Apr 2007 10:04:43 GMT</pubDate><dc:creator>Vikram Saxena</dc:creator></item><item><title>RE: Using FillDataTable method</title><link>http://forum.strataframe.net/FindPost7943.aspx</link><description>Well I think that you are going about this in a more difficult way than you need to.&amp;nbsp; I would use a BusinessBindingSource control, Fill by business object and just bind it to the grid.&amp;nbsp; There is a sample that comes with the framework named the BusinessBindingSource Sample (I think).&amp;nbsp; I know that it is on the first page of the&amp;nbsp;Sample Console.&amp;nbsp; I recommend looking at this sample, I think it will help you as you move forward.</description><pubDate>Fri, 06 Apr 2007 10:04:43 GMT</pubDate><dc:creator>Trent L. Taylor</dc:creator></item></channel></rss>