0

i have a below function in which the variable dataCollection hold the dataview having some datas. i need to change the column "AllDay" in the dataCollection from string datatype to boolean data type.

public override void FetchData(IEnumerable data)
        {
                foreach (DataRowView ds in data)
                {
                    if ((ds.Row["AllDay"].Equals("false")))
                        ds.Row["AllDay"] = false;
                    else if ((ds.Row["AllDay"].Equals("true")))
                        ds.Row["AllDay"] = true;
                }
        }

But it does not works.please help me resolve this. thanks in advance...

user2877778
  • 37
  • 1
  • 8

1 Answers1

0

I don't think it is possible. XmlDataSource does not have a mechanism to declare the type of specific attributes or elements in the XML, hence everything will be a string .

MiMo
  • 11,793
  • 1
  • 33
  • 48