Click here to Skip to main content
15,891,033 members
Home / Discussions / C#
   

C#

 
QuestionHow to get HBITMAP form BitMap Pin
vibindia13-Nov-09 1:45
vibindia13-Nov-09 1:45 
AnswerRe: How to get HBITMAP form BitMap Pin
dan!sh 13-Nov-09 2:37
professional dan!sh 13-Nov-09 2:37 
Questionhow to generate licence key for my product which is developed with c# Pin
happies13-Nov-09 1:27
happies13-Nov-09 1:27 
AnswerRe: how to generate licence key for my product which is developed with c# Pin
Shameel13-Nov-09 4:15
professionalShameel13-Nov-09 4:15 
AnswerRe: how to generate licence key for my product which is developed with c# Pin
Eddy Vluggen13-Nov-09 4:55
professionalEddy Vluggen13-Nov-09 4:55 
QuestionProgrammatically select multiple cells in DataGridView C# / VB.NET application Pin
willempipi12-Nov-09 23:40
willempipi12-Nov-09 23:40 
AnswerRe: Programmatically select multiple cells in DataGridView C# / VB.NET application Pin
dan!sh 13-Nov-09 3:35
professional dan!sh 13-Nov-09 3:35 
AnswerRe: Programmatically select multiple cells in DataGridView C# / VB.NET application Pin
willempipi13-Nov-09 3:39
willempipi13-Nov-09 3:39 
Found the solution myself, the setting of selected cell's is only effective after the datasource is bound to the control. This is not done jet when you are in the Form_Load, so you have to wait for it. This is my solution:

private string Selection_ColumnName = null;
private List<object> Selection_CellValues = null;

public void SetSelectedValues(string ColumnName, List<object> CellValues)
{
    Selection_ColumnName = ColumnName;
    Selection_CellValues = CellValues;
    gridData.DataBindingComplete += new DataGridViewBindingCompleteEventHandler(gridData_DataBindingComplete);
}
private void gridData_DataBindingComplete(object sender, DataGridViewBindingCompleteEventArgs e)
{
    bool CellFound = false;

    for (int ColumnIndex = 0; ColumnIndex < gridData.Columns.Count; ColumnIndex++)
    {
        if (gridData.Columns[0].Name == Selection_ColumnName)
        {
            gridData.ClearSelection();

            for (int RowIndex = 0; RowIndex < gridData.Rows.Count; RowIndex++)
            {
                foreach (object CellValue in Selection_CellValues)
                {
                    try
                    {
                        if (gridData.Rows[RowIndex].Cells[ColumnIndex].Value.ToString() == CellValue.ToString())
                        {
                            gridData.Rows[RowIndex].Cells[ColumnIndex].Selected = true;
                            if (!CellFound) gridData.CurrentCell = gridData.SelectedCells[0];

                            CellFound = true;
                        }
                    }
                    catch
                    {
                    }
                }
            }

            break;
        }
    }

    gridData.DataBindingComplete -= new DataGridViewBindingCompleteEventHandler(gridData_DataBindingComplete);
}

QuestionSslStream.Authenticate method Pin
nirmalsat12-Nov-09 22:55
nirmalsat12-Nov-09 22:55 
AnswerRe: SslStream.Authenticate method Pin
Paulo Zemek12-Nov-09 23:57
mvaPaulo Zemek12-Nov-09 23:57 
QuestionHow can I know/see on which core a thread run ? (In win XP) Pin
evyatar.v12-Nov-09 22:44
evyatar.v12-Nov-09 22:44 
AnswerRe: How can I know/see on which core a thread run ? (In win XP) Pin
Covean12-Nov-09 23:06
Covean12-Nov-09 23:06 
GeneralRe: How can I know/see on which core a thread run ? (In win XP) Pin
Luc Pattyn13-Nov-09 0:47
sitebuilderLuc Pattyn13-Nov-09 0:47 
GeneralRe: How can I know/see on which core a thread run ? (In win XP) Pin
Covean13-Nov-09 1:43
Covean13-Nov-09 1:43 
GeneralRe: How can I know/see on which core a thread run ? (In win XP) Pin
evyatar.v13-Nov-09 5:38
evyatar.v13-Nov-09 5:38 
GeneralRe: How can I know/see on which core a thread run ? (In win XP) Pin
evyatar.v13-Nov-09 0:58
evyatar.v13-Nov-09 0:58 
AnswerRe: How can I know/see on which core a thread run ? (In win XP) Pin
Eddy Vluggen13-Nov-09 1:22
professionalEddy Vluggen13-Nov-09 1:22 
GeneralRe: How can I know/see on which core a thread run ? (In win XP) Pin
Shameel13-Nov-09 4:23
professionalShameel13-Nov-09 4:23 
GeneralRe: How can I know/see on which core a thread run ? (In win XP) Pin
Eddy Vluggen13-Nov-09 4:42
professionalEddy Vluggen13-Nov-09 4:42 
GeneralWindows service using custom DLL Pin
TurboTaMan12-Nov-09 20:39
TurboTaMan12-Nov-09 20:39 
GeneralRe: Windows service using custom DLL Pin
Shameel12-Nov-09 22:17
professionalShameel12-Nov-09 22:17 
GeneralRe: Windows service using custom DLL Pin
Covean12-Nov-09 23:14
Covean12-Nov-09 23:14 
GeneralRe: Windows service using custom DLL Pin
TurboTaMan16-Nov-09 8:06
TurboTaMan16-Nov-09 8:06 
QuestionFolder Access permission Pin
anishkannan12-Nov-09 20:39
anishkannan12-Nov-09 20:39 
AnswerRe: Folder Access permission Pin
Dave Kreskowiak13-Nov-09 5:17
mveDave Kreskowiak13-Nov-09 5:17 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.