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
645
Ultragrid: setting values in new rows based on data on the hosting form
posted

I have a form showing data from a database table (top level in the databse). This is the "case" table. The primary keys in this table, are "CaseYear" and "CaseNumber". These data are shown in textboxes on the form: "txtCaseYear" and "txtCaseNumber".

On the form I have a ultragrid showing data from a related table (with "child" records) which are multiple samples belonging to this particular case. In this table (and the ultragrid) column 1 and 2 is the foreign keys of the "sample" table.:  "CaseYear" and "CaseNumber". How can I populate the cells  in these columns with "default" values based on the textboxes "txtCaseYear" and "txtCaseNumber" on the mother form when new grid rows are added?

I dont want the user having to enter this manually as it is obvious that the samples belongs to the case currently viewed in the mother form. In fact, I would keep both these grid columns hidden in the grid.

Regards,

Kai

Parents Reply Children
No Data