Click here to Skip to main content
15,921,716 members
Home / Discussions / C#
   

C#

 
GeneralRe: can windows form controls as buttons and progress bars be skinned..... Pin
PIEBALDconsult30-Jan-09 10:59
mvePIEBALDconsult30-Jan-09 10:59 
GeneralRe: can windows form controls as buttons and progress bars be skinned..... Pin
Eddy Vluggen30-Jan-09 11:02
professionalEddy Vluggen30-Jan-09 11:02 
GeneralDataGridViewButton click event Pin
leeoze30-Jan-09 9:54
leeoze30-Jan-09 9:54 
QuestionAllowing Chinese Text in Visual Studio 05 Pin
Cozmo2330-Jan-09 7:15
Cozmo2330-Jan-09 7:15 
QuestionConnection to contactless card reader Pin
Hristiyan30-Jan-09 5:43
Hristiyan30-Jan-09 5:43 
AnswerRe: Connection to contactless card reader Pin
musefan30-Jan-09 6:07
musefan30-Jan-09 6:07 
GeneralRe: Connection to contactless card reader Pin
Hristiyan1-Feb-09 21:37
Hristiyan1-Feb-09 21:37 
Questionmodify type of dataset column Pin
pippyn30-Jan-09 4:24
pippyn30-Jan-09 4:24 
I'm working with a windows foem application. I have a dataset that was returned from a webservice. The third column ("Permanent") contains a bool. When i bind the data to a datagridview, that coulmn shows up as a series of checked checkboxes (since all the rows happened to have "true" for that value). What I want to do is modify the dataset, before binding it to the grid, to display the word "Permanent" if the bool is true and "Temporary" is the bool is false. I've gotten the code the point where I recognise whether it's true or false, but, because the column expects a bool, I can't put in the appropriate string. Any suggestions?

<br />
        private void btnGetAccounts_Click(object sender, EventArgs e)<br />
        {<br />
            BindingSource bs = new BindingSource();<br />
            dsAccounts = new DataSet();<br />
            dsAccounts = myAccount.List(nSessionID, out nError, out sErrorMsg);<br />
            if (dsAccounts != null && dsAccounts.Tables.Count > 0)<br />
            {  <br />
                //modify datadisplay<br />
                for (int i = 0; i < 10; i++)<br />
                {<br />
                    if ((bool)dsAccounts.Tables[0].Rows[i][2] == true)<br />
                    {<br />
                        dsAccounts.Tables[0].Rows[i][2] = "Permanent";<br />
                    }<br />
                }<br />
<br />
                bs.DataSource = dsAccounts;<br />
                bs.DataMember = dsAccounts.Tables[0].TableName;<br />
                dgvAccounts.DataSource = bs;<br />
            }<br />
        }<br />


The error I get is: "String was not recognised as valid Boolean. Couldn't store "Permanent" in Permanent column. Expected type is Boolean."
AnswerRe: modify type of dataset column Pin
howlettt30-Jan-09 4:38
howlettt30-Jan-09 4:38 
GeneralRe: modify type of dataset column Pin
pippyn30-Jan-09 5:06
pippyn30-Jan-09 5:06 
GeneralRe: modify type of dataset column Pin
howlettt30-Jan-09 6:03
howlettt30-Jan-09 6:03 
GeneralRe: modify type of dataset column Pin
pippyn30-Jan-09 6:22
pippyn30-Jan-09 6:22 
QuestionPrint the columns of a DataGrid in individual blocks Pin
pavanip30-Jan-09 4:00
pavanip30-Jan-09 4:00 
AnswerRe: Print the columns of a DataGrid in individual blocks Pin
leeoze30-Jan-09 10:04
leeoze30-Jan-09 10:04 
GeneralRe: Print the columns of a DataGrid in individual blocks Pin
pavanip30-Jan-09 19:40
pavanip30-Jan-09 19:40 
AnswerRe: Print the columns of a DataGrid in individual blocks Pin
leeoze30-Jan-09 23:50
leeoze30-Jan-09 23:50 
AnswerRe: Print the columns of a DataGrid in individual blocks Pin
Najmal31-Jan-09 4:13
Najmal31-Jan-09 4:13 
Questiongetting the tip message for method during design time Pin
Blubbo30-Jan-09 3:33
Blubbo30-Jan-09 3:33 
AnswerRe: getting the tip message for method during design time Pin
musefan30-Jan-09 3:38
musefan30-Jan-09 3:38 
GeneralRe: getting the tip message for method during design time Pin
Blubbo30-Jan-09 3:45
Blubbo30-Jan-09 3:45 
GeneralRe: getting the tip message for method during design time Pin
musefan30-Jan-09 3:47
musefan30-Jan-09 3:47 
GeneralRe: getting the tip message for method during design time Pin
Ennis Ray Lynch, Jr.30-Jan-09 3:54
Ennis Ray Lynch, Jr.30-Jan-09 3:54 
GeneralRe: getting the tip message for method during design time Pin
PIEBALDconsult30-Jan-09 6:50
mvePIEBALDconsult30-Jan-09 6:50 
GeneralRe: getting the tip message for method during design time Pin
Pete O'Hanlon30-Jan-09 4:45
mvePete O'Hanlon30-Jan-09 4:45 
GeneralRe: getting the tip message for method during design time Pin
DaveyM6930-Jan-09 9:19
professionalDaveyM6930-Jan-09 9:19 

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.