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
120
How to delete a column of an child record in an Ultrawingrid
posted

Can anyone help me out with the below issue,

I have a Ultrawingrid showing up records where each record is collapsable and have child records to it as shown below.

Here, I need to delete a column PatientNumber in the Child record.I have set the Hidden property to true for that column and also removed the column, even then the value is binding to the child datatable.

Please, check below code, underlined the code for more info.Do suggest me how can I resolve this issue.

dsPatientSearch = new DataSet();

                dtPatienDetails = EligibilityDataAccess.GetPatientDetails(patientNumber,patientName,patientSsn,patientDob,shortCut,iCode,claimNumber);

                dtPatienDetails.TableName = "PatientDetails";

                dtClaimDetails = CreateClaimDetailsTable();

                dtClaimDetails.TableName = "ClaimDetails";

                DataTable dtGetClaimDetails = null;

                foreach (DataRow dr in dtPatienDetails.Rows)

                 {

                   foreach(DataRow drClaimDetails in EligibilityDataAccess.GetClaimDetails(Convert.ToInt32(dr[0])).Rows)

                    {

                      dtClaimDetails.Rows.Add(drClaimDetails.ItemArray);

                    }

                 }

                   dsPatientSearch.Tables.Add(dtPatienDetails.Copy());

                  dsPatientSearch.Tables.Add(dtClaimDetails.Copy());

         // Here dsPatientSearch.Tables[0].Columns[0] is the primary to key to the Parent band and dsPatientSearch.Tables[1].Columns[5] is the foreign key to the child band.

            dsPatientSearch.Relations.Add("patientClaimRelation",dsPatientSearch.Tables[0].Columns[0],

                            dsPatientSearch.Tables[1].Columns[5]);

                              ugMain.DataSource = dsPatientSearch;

Parents
No Data
Reply
  • 469350
    Offline posted

    Hi,

    The WinGrid binds to the DataSource you give it. So if the column exists in the data source, then grid will create a column for that field. There is no way around this, the column cannot be remove from the grid.

    You can hide the column, but it will always exist in the grid if it exists in your data source.

Children
No Data