﻿<?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?)  » DataGridView behavior?</title><generator>InstantForum 2017-1 Final</generator><description>StrataFrame Forum</description><link>http://forum.strataframe.net/</link><webMaster>StrataFrame Forum</webMaster><lastBuildDate>Thu, 28 May 2026 11:13:50 GMT</lastBuildDate><ttl>20</ttl><item><title>DataGridView behavior?</title><link>http://forum.strataframe.net/FindPost23277.aspx</link><description>I am working with a DataGridView which is giving me a lot of headache :D.&lt;br&gt;
&lt;br&gt;
The end use needs to modify data in 2 consecutives columns of this DataGridView, and I am having the following issues:&lt;br&gt;
1- When press Enter key, I want the cursor to move to the 2nd column (like when pressing the Tab key), but instead it is going to the next row.&lt;br&gt;
2 - Still I am having problem with the BBS not synchronizing with the BBS BO, for now I had to add code to the DataGridView.RowEnter to handle this, but when I edit a cell, the value is not reflected in the BO.Field assigned to that cell, so in my validation code I have to assign the value of the cell to the BO.Field.  Is this the way the DataGridView suppose to work?&lt;br&gt;
&lt;br&gt;
I really appreciate some inside on this one since I am waisting a lot of time trying to make this DataGridView work.  Unfortunately in this case I can not use a ListView because it would be very difficult to the end user to handle the data for the 2 columns that needs to be editable.:w00t:</description><pubDate>Tue, 02 Jun 2009 06:45:36 GMT</pubDate><dc:creator>Edhy Rijo</dc:creator></item><item><title>RE: DataGridView behavior?</title><link>http://forum.strataframe.net/FindPost23304.aspx</link><description>Yeah...that looks good.</description><pubDate>Tue, 02 Jun 2009 06:45:36 GMT</pubDate><dc:creator>Trent L. Taylor</dc:creator></item><item><title>RE: DataGridView behavior?</title><link>http://forum.strataframe.net/FindPost23295.aspx</link><description>I tried this code in the form's New() but did not make any difference:&lt;br&gt;
[codesnippet]&lt;br&gt;
 Public Sub New()&lt;br&gt;
        ' This call is required by the Windows Form Designer.&lt;br&gt;
        InitializeComponent()&lt;br&gt;
&lt;br&gt;
&lt;br&gt;
        '-- Ensure that the home page is initially shown.&lt;br&gt;
        pmMain.SetActivePage(PageHome)&lt;br&gt;
&lt;br&gt;
        [b]Me.DataGridView1.DataBindings.DefaultDataSourceUpdateMode = DataSourceUpdateMode.OnPropertyChanged[/b]&lt;br&gt;
    End Sub&lt;br&gt;
[/codesnippet]&lt;br&gt;
&lt;br&gt;
Am I in the right path here?</description><pubDate>Mon, 01 Jun 2009 08:49:14 GMT</pubDate><dc:creator>Edhy Rijo</dc:creator></item><item><title>RE: DataGridView behavior?</title><link>http://forum.strataframe.net/FindPost23292.aspx</link><description>[quote][b]Trent L. Taylor (06/01/2009)[/b][hr]Also, you will want to be sure to update the bound contents on PropertyChanged versus on validation.[/quote]&lt;br&gt;
&lt;br&gt;
Humm, I can not find where to do this change, could you provide some hint?;)</description><pubDate>Mon, 01 Jun 2009 07:36:42 GMT</pubDate><dc:creator>Edhy Rijo</dc:creator></item><item><title>RE: DataGridView behavior?</title><link>http://forum.strataframe.net/FindPost23287.aspx</link><description>[quote]1- When press Enter key, I want the cursor to move to the 2nd column (like when pressing the Tab key), but instead it is going to the next row.[/quote]&lt;br&gt;
&lt;br&gt;
You will have to code this yourself.  You will have to capture this keystroke and then programatically manage the behavior you want.&lt;br&gt;
&lt;br&gt;
[quote]2 - Still I am having problem with the BBS not synchronizing with the BBS BO, for now I had to add code to the DataGridView.RowEnter to handle this, but when I edit a cell, the value is not reflected in the BO.Field assigned to that cell, so in my validation code I have to assign the value of the cell to the BO.Field. Is this the way the DataGridView suppose to work?[/quote]&lt;br&gt;
&lt;br&gt;
No.  If this were the case, then it would really make binding pretty pointless.  If you can figure out your indexing issue that we were not able to reproduce with the same sample you sent, then you can most likely get this resolved as well.&lt;br&gt;
&lt;br&gt;
Also, you will want to be sure to update the bound contents on PropertyChanged versus on validation.</description><pubDate>Mon, 01 Jun 2009 07:22:27 GMT</pubDate><dc:creator>Trent L. Taylor</dc:creator></item></channel></rss>