views:

229

answers:

0

I have an aspx page with gridview. This grid view is bound to a ObjectDataSource. The objectdatasource fetches data from a View. I have class which I have specified in Type property of objectdatasource and the method of class which returns data is specified in SelectMethod property of objectdatasource.

The method returns DataTable object. Each field in grid view is a bound field which is mapped to each column of datatable.

 <asp:BoundField DataField="Process Order" HeaderText="Process Order"  
      SortExpression="Process Order" />
      <asp:BoundField DataField="Material" HeaderText="Material"  
      SortExpression="Material" />
      <asp:BoundField DataField="User" HeaderText="Initiator" SortExpression="User" />



    public  DataTable GetAllData() {
    SqlConnection conn = GetDBConnection();
    conn.Open();
    string queryString = "SELECT ProcessOrder AS [Process Order],MaterialId AS   
    [Material], User_Str AS [User],MaterialOwners As [Material Owner] FROM   

     WorkflowView";

    SqlDataAdapter daGetAllData = new System.Data.SqlClient.SqlDataAdapter();
    daGetAllData.SelectCommand = GetCommandObject(queryString, conn);
    daGetAllData.Fill(dataset,"GetAllDataTable");
    conn.Close();
    return dataset.Tables["GetAllDataTable"];
}

The problem is one column has serialized xml string of my custom type. I want to deserialize the string and display only one attribute in the column. I am stuck here , How do I do it?