Adnan
asked on
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...?!
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;
}
In order to create a custom property, you would need to create a CustomDataGridViewRow that inherits from DataGridViewRow. You could use Tag property instead.
ASKER
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?
Can somone help me with this?
ASKER
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.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
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";
}
}
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";
}
}
ASKER
??
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?
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?
ASKER