470,636 Members | 1,526 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 470,636 developers. It's quick & easy.

Problems with DataBinding not updating

I have a textbox bound to a column in a DataTable using DataBinding. I have a
Next button and in the Click Event it moves the current position of the
CurrencyManager to the next position. The CurrencyManager is moving to the
next position but the textbox is not being updated with the value of the next
row, it stays at the value of the first row.

// Initialization
string stockItemSelect = "SELECT stock_number "FROM po_stock_item ";
m_daStockItem = new NpgsqlDataAdapter(stockItemSelect, m_posDBConn);
m_daStockItem.Fill(m_dsLineItem, "stock_item");
tb_item.DataBindings.Add("Text", m_dsLineItem.Tables["stock_item"],

// Code in Click event of Next button
CurrencyManager cmItem = (CurrencyManager)this.BindingContext[m_dsLineItem,
if (cmItem.Position < cmItem.Count - 1)
Mar 20 '06 #1
0 964

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

3 posts views Thread by Michael | last post: by
15 posts views Thread by Tim Jarvis | last post: by
reply views Thread by Kevin Hodgson | last post: by
5 posts views Thread by Mark R. Dawson | last post: by
8 posts views Thread by Joey Chömpff | last post: by
2 posts views Thread by clickon | last post: by
2 posts views Thread by John Rusk | last post: by
11 posts views Thread by =?Utf-8?B?R29rdWw=?= | last post: by
1 post views Thread by Korara | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.