Question: I could not understand what this javascript line does. 

```
chkBox.setAttribute("CheckList", range);

```

What is the "CheckList" attribute is used for?

Answer: 
Easiest way is to connect a DataSet as datasource and then save the dataset to xml and load the xml the next time.

```
    DataSet ds = new DataSet();
    //save the dataset as xml
    ds.WriteXml("your path to save the xml");

    //read the xml into your dataset
    ds.ReadXml("your path to save the xml");

```
You need to serialize your DataSource not DataGrid.

Create new DataTable, add columns, bound DataTable to DataGrid. Then use DataTable.WriteXml and DataTable.ReadXml to save and load xml.