private void DeserializeColumns(string layoutData) { XmlDocument doc = new XmlDocument(); doc.LoadXml(layoutData); GridViewInfo gridInfo = null; XmlSerializer xmlSerializer = new XmlSerializer(typeof(GridViewInfo)); using (XmlReader xr = XmlReader.Create(new StringReader(layoutData))) { gridInfo = (GridViewInfo)xmlSerializer.Deserialize(xr); } gridInfo.RestoreGridViewLayout(grid); }