Link to home
Start Free TrialLog in
Avatar of Victor  Charles
Victor CharlesFlag for United States of America

asked on

Help with controling changes in DataGridView rows

Hi,

How do i allow users to only update(amend, delete) rows where values in country column is login country, for example countrylogin.text = USA, using VB.NET?

Thanks,

Victor
Avatar of Jacques Bourgeois (James Burger)
Jacques Bourgeois (James Burger)
Flag of Canada image

If you feed the grid through your code, simply check the data for the country column when adding a row and set it's ReadOnly property when needed.

If you fill the row through data binding, then loop through the rows after it is full and mark as ReadOnly the rows that do not have the proper value in the country column.
Avatar of Victor  Charles

ASKER

Hi,

Can you please send me an example of the second option. I am loading the grid  to a Dataset.

Thanks,,
V.
ASKER CERTIFIED SOLUTION
Avatar of Jacques Bourgeois (James Burger)
Jacques Bourgeois (James Burger)
Flag of Canada image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
James,

Thank You for your very good advice and   solution.

Victor