How do I force a refresh of form controls


Author
Message
Marcia G Akins
Marcia G Akins
StrataFrame VIP (1.8K reputation)StrataFrame VIP (1.8K reputation)StrataFrame VIP (1.8K reputation)StrataFrame VIP (1.8K reputation)StrataFrame VIP (1.8K reputation)StrataFrame VIP (1.8K reputation)StrataFrame VIP (1.8K reputation)StrataFrame VIP (1.8K reputation)StrataFrame VIP (1.8K reputation)
Group: StrataFrame Users
Posts: 322, Visits: 529
Hi All.

This really should be obvious, but its not. I have a grid on a form and when i change rows, I want the text boxes and other form controls to stay synchronized. Here is the code:

// Synchronize the upper portion in the form when the user

// clicks on a new row in the grid

if (e.RowIndex > -1)

{

boNotes.SeekToPrimaryKey(Convert.ToInt32(grdViewNoteLog.Rows[e.RowIndex].Cells["note_pk"].Value.ToString()));

this.Refresh();

}

The Notes BO is on the corrrect row, because if I click the edit button in the form, the controls all get updated with the correct values.

What do I need to do to handle this programmatically?

Thanks!

Teddy Jensen
Teddy Jensen
StrataFrame User (338 reputation)StrataFrame User (338 reputation)StrataFrame User (338 reputation)StrataFrame User (338 reputation)StrataFrame User (338 reputation)StrataFrame User (338 reputation)StrataFrame User (338 reputation)StrataFrame User (338 reputation)StrataFrame User (338 reputation)
Group: StrataFrame Users
Posts: 52, Visits: 8K
Hi Marcia,

I think you shold use navigate instead of seek on your bo. This will update any bound controls.

/Teddy

Marcia G Akins
Marcia G Akins
StrataFrame VIP (1.8K reputation)StrataFrame VIP (1.8K reputation)StrataFrame VIP (1.8K reputation)StrataFrame VIP (1.8K reputation)StrataFrame VIP (1.8K reputation)StrataFrame VIP (1.8K reputation)StrataFrame VIP (1.8K reputation)StrataFrame VIP (1.8K reputation)StrataFrame VIP (1.8K reputation)
Group: StrataFrame Users
Posts: 322, Visits: 529
Teddy Jensen (09/25/2008)
Hi Marcia,

I think you shold use navigate instead of seek on your bo. This will update any bound controls.

That was it - thanks a million. I knew it had to be something simple Smile

Trent Taylor
Trent Taylor
StrataFrame Developer (37K reputation)StrataFrame Developer (37K reputation)StrataFrame Developer (37K reputation)StrataFrame Developer (37K reputation)StrataFrame Developer (37K reputation)StrataFrame Developer (37K reputation)StrataFrame Developer (37K reputation)StrataFrame Developer (37K reputation)StrataFrame Developer (37K reputation)
Group: StrataFrame Developers
Posts: 6.6K, Visits: 7K
Yup...Teddy is on the job Smile
GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search