﻿<?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?)  / UltraGrid (InitializeRow) fires at will / 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>Mon, 13 Oct 2008 07:58:11 GMT</lastBuildDate><ttl>20</ttl><item><title>RE: UltraGrid (InitializeRow) fires at will</title><link>http://forum.strataframe.net/Topic16316-7-1.aspx</link><description>Here is an example of what is happening.&lt;/P&gt;&lt;P&gt;I have the grid attached to a BBS and is calling a Childform. As I type in the controls, the BO seems to be moving through the records as you can see from the attached zipped flash demo.  &lt;/P&gt;&lt;P&gt;Michael&lt;/P&gt;&lt;P&gt;Edit Code from Calling Form&lt;/P&gt;&lt;P&gt;&lt;FONT color=#0000ff size=2&gt;Private&lt;/FONT&gt;&lt;FONT color=#000000 size=2&gt; &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;Sub&lt;/FONT&gt;&lt;FONT color=#000000 size=2&gt; cmdEdit_Click(&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;ByVal&lt;/FONT&gt;&lt;FONT color=#000000 size=2&gt; sender &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;As&lt;/FONT&gt;&lt;FONT color=#000000 size=2&gt; &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;Object&lt;/FONT&gt;&lt;FONT color=#000000 size=2&gt;, &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;ByVal&lt;/FONT&gt;&lt;FONT color=#000000 size=2&gt; e &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;As&lt;/FONT&gt;&lt;FONT color=#000000 size=2&gt; System.EventArgs) &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;Handles&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;FONT color=#000000&gt; cmdEdit.Click&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#008000 size=2&gt;'Get and Set the Company ID from the Row being called&lt;/P&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;Dim&lt;/FONT&gt;&lt;FONT size=2&gt; LocCompanyID &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;As&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;Integer&lt;/FONT&gt;&lt;FONT size=2&gt; = GridData.ActiveRow.Cells(&lt;/FONT&gt;&lt;FONT color=#a31515 size=2&gt;"cusRecParID"&lt;/FONT&gt;&lt;FONT size=2&gt;).Value&lt;/P&gt;&lt;P&gt;aBOMain.SeekToPrimaryKey(&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;Me&lt;/FONT&gt;&lt;FONT size=2&gt;.GridData.ActiveRow.Cells(&lt;/FONT&gt;&lt;FONT color=#a31515 size=2&gt;"recRecID"&lt;/FONT&gt;&lt;FONT size=2&gt;).Value)&lt;/P&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#008000 size=2&gt;'-- Show the child editing form&lt;/P&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;If&lt;/FONT&gt;&lt;FONT size=2&gt; ChildServiceForm.ShowDialog(LocCompanyID) = Windows.Forms.DialogResult.OK &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;Then&lt;/P&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;Else&lt;/P&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#008000 size=2&gt;'-- Undo the changes to the current row&lt;/P&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;P&gt;aBOMain.Undo(BusinessUndoType.CurrentRowOnly)&lt;/P&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;End&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;If&lt;/P&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;End&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;Sub&lt;/P&gt;&lt;/FONT&gt;</description><pubDate>Thu, 29 May 2008 11:24:35 GMT</pubDate><dc:creator>Michael Reese</dc:creator></item><item><title>RE: UltraGrid (InitializeRow) fires at will</title><link>http://forum.strataframe.net/Topic16316-7-1.aspx</link><description>I know. I hope that this is not an issue with Version 2008.1? I do not think that I saw this behavior before?</description><pubDate>Thu, 15 May 2008 10:08:38 GMT</pubDate><dc:creator>Michael Reese</dc:creator></item><item><title>RE: UltraGrid (InitializeRow) fires at will</title><link>http://forum.strataframe.net/Topic16316-7-1.aspx</link><description>Well, that does sound suspect...but this is a highly used control, by SF developers (including ourselves) and this is the first time I have ever heard of this behavior.</description><pubDate>Thu, 15 May 2008 09:25:18 GMT</pubDate><dc:creator>Trent L. Taylor</dc:creator></item><item><title>RE: UltraGrid (InitializeRow) fires at will</title><link>http://forum.strataframe.net/Topic16316-7-1.aspx</link><description>Ok Trent, &lt;/P&gt;&lt;P&gt;I will try to put something together. I do not think that I am doing anything special? &lt;/P&gt;&lt;P&gt;Could the execution of InitializeRow be because the BO on the parent and child are the same? As I am entering data in editmode (before save) in the Childform, the parentform BO seems to be trying to populate as well?</description><pubDate>Thu, 15 May 2008 03:28:45 GMT</pubDate><dc:creator>Michael Reese</dc:creator></item><item><title>RE: UltraGrid (InitializeRow) fires at will</title><link>http://forum.strataframe.net/Topic16316-7-1.aspx</link><description>This sounds like more of a Grid issue versus a BBS/BO issue.  We actaully use this grid in a number of places and amongst the 3500+ properties :D there could be something set that is changing the behavior of the grid.  Honestly, these types of questions are really hard to help with without some type of sample that reproduces the problem.  If you produce a simple sample that reproduces the problem then I will take a gander at it to see if I can tell where the issue is.  Thanks. :)</description><pubDate>Tue, 13 May 2008 09:53:02 GMT</pubDate><dc:creator>Trent L. Taylor</dc:creator></item><item><title>UltraGrid (InitializeRow) fires at will</title><link>http://forum.strataframe.net/Topic16316-7-1.aspx</link><description>I have a Grid on my main form attached to a BBS. I also have a childform attached to the BO which is attached to the BBS. I also have the standard add edit code (BO.ADD,BO.EDIT in the childform not in the mainform) calling the child form. &lt;/P&gt;&lt;P&gt;The problem seems to be that the Grid's InitializeRow seems to not only fire when the grid initially(as it should) loads, it also fires when I call a BO.ADD and load of the childform? It seems to get called when I am in edit mode as well? I set the debugger and discovered that it fires while I am entering data in fields on the subform?&lt;/P&gt;&lt;P&gt;SF = Latest Version (Beta)&lt;/P&gt;&lt;P&gt;Ultragrid 2008.1&lt;/P&gt;&lt;P&gt;VS 2008&lt;/P&gt;&lt;P&gt;Michael</description><pubDate>Sun, 11 May 2008 22:54:21 GMT</pubDate><dc:creator>Michael Reese</dc:creator></item></channel></rss>