DevPinoy.org
A Filipino Developers Community

>>> First two to make 3 wins! <<<

Storing rows in an array

rated by 0 users
This post has 6 Replies | 1 Follower

Top 50 Contributor
Posts 29
Points 845
hydrocephalus Posted: 01-17-2008 5:55 AM

Good day,

I have some question here, and this is the scenario 

 I have a datagridview and a textboxes in my form., when I selected a row and I edit it in the textbox, there will be an action flag that this row is edited.

So if I transfer to another row, I want to hold the edited values in an array. So when I save all the edited rows all the values in my array will be save and , it will reflect to my datagridview.

My question is how to hold the values I entered in my textboxes,?

Sorry for bad english 

Btw, the datagridview is bounded to a binding source., and i set my datagridview property, ALlow to edit to false.,

Thanks 

Jeric John Romero 4th yr-BS Information Technology Adamson University
  • | Post Points: 35
Top 75 Contributor
Posts 23
Points 370

by the way d mo kailangan mg english.. hehe dami nakakaintindi sayo d2..sa totoo lng nasagot mo na din sarili mong prob: 

 I want to hold the edited values in an array.

 

and why are you disabling the edit function.. pwede naman paisaisa yung pgeedit ng user db? mgkaron ka din ng save action para ang gagawin ng user is edit lng paisaisa... 

  • Filed under:
  • | Post Points: 5
Top 500 Contributor
Posts 3
Points 30

Also bind your textboxes with the binding source.  That will propably solve your problem.

  • | Post Points: 20
Top 50 Contributor
Posts 29
Points 845

naisip ku na rin po ito,

pero pede ku po ba i-cancel ung mga na edit ku and ibalik sa original data kapag kinancel ku?

Jeric John Romero 4th yr-BS Information Technology Adamson University
  • | Post Points: 35
Top 500 Contributor
Posts 3
Points 15

Assuming the data is stored in a data table, you could call the RejectChanges Method to abort all changes. Likewise, Acceptchanges accepts all changes. 

Oops sorry, array pala yung datasource mo. Mukang hindi n ata marerevert yun once n binago mo na...

 

  • | Post Points: 5
Top 25 Contributor
Posts 103
Points 1,610

bakit mo iistore yung mga rows sa array hindi ba pwede sa datatable? 

Dwarvend's Review

  • | Post Points: 20
Top 500 Contributor
Posts 3
Points 15

 One  more thing, since your data source is an array object, i suppose that you won't be  able to add/remove new entries. From what i know, the dimensions of an array object is "fixed," and the only way for you to add/remove fields is to create a new instance of the array and copy the new version of your data.

  • | Post Points: 5
Page 1 of 1 (7 items) | RSS

Copyright DevPinoy 2005-2008