How to set flag/bookmark on to datagridview rows......

hi

i want to make a simple function to set flag on my datagridview rows. Datagridview is containing a lots of transactions and i want to make function to set flag on transaction i want to set flag on...?!
private void FlagTransactions()
        {
            //MoneyDBDataSet.CountriesRow row = countries[0] as MoneyDBDataSet.CountriesRow;
            //DsReconItems.MatchItemRow[] drows = (DsReconItems.MatchItemRow[])dsReconItems1.MatchItem.Select("Reconciled_ID = " + kPair.Key.ToString());
            DataGridViewRow row = ReconManuallyGridView.CurrentRow;
            int flagColIndex = ReconManuallyGridView.Columns["Amount"].Index;
            DataGridViewCell cell = ReconManuallyGridView.CurrentRow.Cells[flagColIndex];
            cell.Value = row.Flag;
            
        }

Open in new window

AdnanAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

AdnanAuthor Commented:
?
0
Priest04Commented:
In order to create a custom property, you would need to create a CustomDataGridViewRow that inherits from DataGridViewRow. You could use Tag property instead.
0
AdnanAuthor Commented:
Hmm oki, i dident understand how to create a custom property, and i have searched alot on google to find out how to set mark/flag/ or bookmar a row, but there no good samples out there.... :(

Can somone help me with this?
0
Cloud Class® Course: CompTIA Healthcare IT Tech

This course will help prep you to earn the CompTIA Healthcare IT Technician certification showing that you have the knowledge and skills needed to succeed in installing, managing, and troubleshooting IT systems in medical and clinical settings.

AdnanAuthor Commented:
My problem is that I need to allow the user to bookmark a specific row and then easily return to that row after scrolling through the grid.
0
Priest04Commented:
You would add new class called CustomDataGridView and inherit from DataGridView control. Then you would add new property

Then you would need to add this control on a form instead of DataGridView. If you want to replace existing one, go to the form designer window and replace DataGridView with CustomDataHridView manually in code.

I still understand why don't you use DataGridViewRow.Tag property to flag it?
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
AdnanAuthor Commented:
Hi Priest04:


 I want ability to bookmark so that you can jump between the bookmarked transactions, and mark one or several transactions with colour a flag like in outlook

and i dided as you was saying by using property Tag

 private void FlagTransactions()
        {
           
            foreach (DataGridViewRow dr in ReconManuallyGridView.Rows)
            {
                dr.Tag = "Michael Sync";
               
            }
         
         

        }
0
AdnanAuthor Commented:
??
0
Priest04Commented:
gonadn, it seems that you expect that we sit here and wait to answer to someone's question. Most of us here work, too, so you need to be patient.

I do not understand what exactly are you trying to do. I don't use Outlook so I am not aware of its options. The code you have written will work. So, what is it that troubles you?
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
.NET Programming

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.