Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
627
Hidden columns in a webgrid
posted

Hi,

I have created a webgrid and bounced it to a dataTable which is related to another dataTable (in order to have drill down).

I defined hidden columns in both dataTables, but still these columns are presented in the webGrid.

below is part of the code:

 

resDataSet.Relations.Add("Cascade_Lots", resDataSet.Tables[2].Columns["cascadeID"],resDataSet.Tables[1].Columns["cascadeID"], false);

// Set the WebGrid's view type to Hierarchical

this.wGrid_RRCalc.DisplayLayout.ViewType = Infragistics.WebUI.UltraWebGrid.ViewType.Hierarchical;

//Hide the irrelevant columns

resDataSet.Tables[1].Columns["eventID"].ColumnMapping = MappingType.Hidden;

resDataSet.Tables[1].Columns["parent_eventID"].ColumnMapping = MappingType.Hidden;

resDataSet.Tables[1].Columns["cascadeSize"].ColumnMapping = MappingType.Hidden;

resDataSet.Tables[1].Columns["cascadeID"].ColumnMapping = MappingType.Hidden;

resDataSet.Tables[2].Columns["cascadeID"].ColumnMapping = MappingType.Hidden;

this.wGrid_RRCalc.DataSource = resDataSet.Tables[2];

this.wGrid_RRCalc.DataBind();

 

 

Please advice

Thanks

Maya

Parents Reply Children
No Data