protected override DataTable GetData() { try { SuperKey = ApplicationCommon.GetSuperKey(); SetId = ApplicationCommon.GetSetId(); var selectedrows = new DataTable(); var fieldConfigurationdata = new FieldConfigurationDataModel(); selectedrows = FieldConfigurationDataManager.GetDetails(fieldConfigurationdata, SessionVariables.RequestProfile).Clone(); if (!string.IsNullOrEmpty(SuperKey)) { var systemEntityTypeId = (int)PrimaryEntity; var lstEntityKeys = ApplicationCommon.GetSuperKeyDetails(systemEntityTypeId, SuperKey); foreach (var entityKey in lstEntityKeys) { fieldConfigurationdata.FieldConfigurationId = entityKey; var result = FieldConfigurationDataManager.GetDetails(fieldConfigurationdata, SessionVariables.RequestProfile); selectedrows.ImportRow(result.Rows[0]); } } else { fieldConfigurationdata.FieldConfigurationId = SetId; var result = FieldConfigurationDataManager.GetDetails(fieldConfigurationdata, SessionVariables.RequestProfile); selectedrows.ImportRow(result.Rows[0]); } return(selectedrows); } catch (Exception ex) { Response.Write(ex.Message); } return(null); }