Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

RowState Problem

Status
Not open for further replies.

Becks25Not

Programmer
Jun 23, 2004
176
US
Hi All,

I have a form with a grid and some controls. I have a data table bound to the grid and the controls are bound to the current row in the grid. My problem is, the row always says its modified after its been active (meaning had the focus in the grid) even though none of the column values have change. How can I stop this?

Thanks!
Becca
 
Can you post the related code and exact error message?

Sharing the best from my side...

--Prashant--
 

I am not getting an error -- the rows says that they are modified when nothing in the row has changed. It happens after the row has been displayed in the bound controls.
 
If the rowState is showing as modified, then the data ARE getting changed in some way, whether it is intentional or not.

When you display the data in the bound textboxes, are you changing the value of any of the displayed data? Perhaps you are changing NULL values to show as blank in a textbox? Maybe rounding a long decimal value to display only a couple of decimal places? If so, this is a change to the data, and will cause the row to show as Modified. Check everything, and you will probably find something like this.

This is one of the major reasons I do not use databinding to display data in textboxes.



I used to rock and roll every night and party every day. Then it was every other day. Now I'm lucky if I can find 30 minutes a week in which to get funky. - Homer Simpson

Arrrr, mateys! Ye needs ta be preparin' yerselves fer Talk Like a Pirate Day! Ye has a choice: talk like a pira
 
I actually dumped the values before and after and they are the same!! Null to Null, space to space

I wrote a routine to check and cancel the Modified if there really wasn't any changes but its just extra processing.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top