Click here to Skip to main content
15,915,172 members
Home / Discussions / C#
   

C#

 
AnswerRe: Slope method optimisation Pin
RobCroll5-Mar-12 18:24
RobCroll5-Mar-12 18:24 
AnswerRe: Slope method optimisation Pin
A*****5-Mar-12 23:12
A*****5-Mar-12 23:12 
AnswerRe: Slope method optimisation Pin
Luc Pattyn5-Mar-12 19:30
sitebuilderLuc Pattyn5-Mar-12 19:30 
GeneralRe: Slope method optimisation Pin
A*****5-Mar-12 23:17
A*****5-Mar-12 23:17 
AnswerRe: Slope method optimisation Pin
BobJanova5-Mar-12 22:04
BobJanova5-Mar-12 22:04 
QuestionSemantic music engine Pin
Abdul Salam Shaikh5-Mar-12 8:49
Abdul Salam Shaikh5-Mar-12 8:49 
AnswerRe: Semantic music engine Pin
PIEBALDconsult5-Mar-12 8:52
mvePIEBALDconsult5-Mar-12 8:52 
AnswerRe: Semantic music engine Pin
Pete O'Hanlon5-Mar-12 8:54
mvePete O'Hanlon5-Mar-12 8:54 
QuestionReturn Value From Async Call Pin
Kevin Marois5-Mar-12 6:15
professionalKevin Marois5-Mar-12 6:15 
AnswerRe: Return Value From Async Call Pin
Pete O'Hanlon5-Mar-12 6:45
mvePete O'Hanlon5-Mar-12 6:45 
AnswerRe: Return Value From Async Call Pin
Luc Pattyn5-Mar-12 8:12
sitebuilderLuc Pattyn5-Mar-12 8:12 
AnswerRe: Return Value From Async Call Pin
SledgeHammer015-Mar-12 10:08
SledgeHammer015-Mar-12 10:08 
GeneralRe: Return Value From Async Call Pin
Dave Kreskowiak5-Mar-12 11:34
mveDave Kreskowiak5-Mar-12 11:34 
AnswerRe: Return Value From Async Call Pin
Mycroft Holmes5-Mar-12 14:46
professionalMycroft Holmes5-Mar-12 14:46 
AnswerRe: Return Value From Async Call Pin
BobJanova5-Mar-12 22:01
BobJanova5-Mar-12 22:01 
QuestionWinform linked to Entity Data Model Pin
pmcm5-Mar-12 5:25
pmcm5-Mar-12 5:25 
QuestionVB input box in C# Pin
glennPattonWork35-Mar-12 5:23
professionalglennPattonWork35-Mar-12 5:23 
AnswerRe: VB input box in C# Pin
Richard MacCutchan5-Mar-12 5:30
mveRichard MacCutchan5-Mar-12 5:30 
AnswerRe: VB input box in C# Pin
DaveyM695-Mar-12 7:02
professionalDaveyM695-Mar-12 7:02 
AnswerRe: VB input box in C# Pin
Luc Pattyn5-Mar-12 8:16
sitebuilderLuc Pattyn5-Mar-12 8:16 
GeneralRe: VB input box in C# Pin
glennPattonWork35-Mar-12 21:40
professionalglennPattonWork35-Mar-12 21:40 
AnswerRe: VB input box in C# Pin
glennPattonWork35-Mar-12 21:42
professionalglennPattonWork35-Mar-12 21:42 
QuestionCheckbox Column in DataGridView Pin
MWRivera5-Mar-12 5:20
MWRivera5-Mar-12 5:20 
I have a DataGridView with three columns (checkbox, text, int). The text and int columns are bound to data from a data source. I want to manipulate in c#, which of the checkbox rows should be checked. I have the below code, however setting the value of the checkbox to true isn't displaying the required checkboxes as checked. Does anyone know how I could implement this?

C#
// Populate dataGridView with all available options for the given field (stored in oCodeList)
dgvMultiCodes.AutoGenerateColumns = false;
            dgvMultiCodes.DataSource = oCodeList.Table;

            string SQLState = ChcekedSQLStatement();        // Build SQL statement for options that are already checked

            SortedList<int, string> slCodeList = new SortedList<int, string>();
            int codeCD = 0;
            string desc = "";
            oCodeList.GoTop();
            // Save options DataTable values and keys in a SortedList
            while (!oCodeList.EoF)
            {
                codeCD = oCodeList.GetInteger("CD");
                desc = oCodeList.GetString("DEF");
                slCodeList.Add(codeCD, desc);
                oCodeList.Skip();
            }


            bool bChecked = false;
            // Select/check already selected checkboxes in the dataGridView
            ##DataReader checkedList = new ##DataReader(SQLState, currentUser.oConnection);
            while (checkedList.Read())
            {
                bChecked = slCodeList.ContainsKey(checkedList.GetInteger("KEYCODE"));

                if (bChecked)
                {
                    foreach (DataGridViewRow row in dgvMultiCodes.Rows)
                    {
                        if (row.Cells[dgvCodeCol.Index].Value.ToString() == checkedList.GetString("KEYCODE"))
                        {
                            row.Cells[dgvCheckCol.Index].Value = true;  // DOESN’T CHECK CHECKBOX IN DATAGRIDVIEW
                            break;
                        }
  }
                }

                bChecked = false;
            }
            …

AnswerRe: Checkbox Column in DataGridView Pin
MWRivera5-Mar-12 7:22
MWRivera5-Mar-12 7:22 
QuestionInsert Duplicate into Hashset Pin
sharma.ravi215-Mar-12 1:11
sharma.ravi215-Mar-12 1:11 

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.