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
540
FieldLayout Assignment
posted

Hello:

      I create layout0 for master table and layout1 for child table in xamdatagrid. my problem is as below:

1. Layout0 contains 21 fields and layout1 contains 22 fields.

2. During my UI operation I create first record in master table and this moment there is not any child record exists.

3. After that the xamdatagrid could display layout0 correctly.

4.And then I click on the record and add a child table contains one record from my UI.

5. After that I found xamdatagrid master table layout did not use layout0 but use new layout. The new layout created by xamdatagrid itself contains more one field than layout0 and this field is "relation1" which I created dynamically when there is master child binding relation happens .

The strange thing is that after  I close the application and reexecute the application and then do qry result every thing is ok. Because this moment my database already contains master and child table record. 

To solve the problem I would like to find how to reset fieldLayouts settings each time When  I make xamdatagrid data binding.

Did anyone know how to reset fieldlayouts setting?

 

Regards,

 

   Daniel Lee

 

  • 138253
    Offline posted

    Hello Daniel,

     

    I am just checking if you got this worked out or you still require any assistance or clarification on the matter.

  • 138253
    Offline posted

    Hello Daniel,

     

    Thank you for your post. I have been looking into it and I suggest you use the XamDataGrid’s AssignFieldLayoutToItem event which fires every time a new Record is Initialized. In Its handler you can set the FieldLayout, which you want to be applied. Also you have to set the FieldLayout’s Key Property in order to be able to get it. Please let me know if this helps you or you need further assistance on this matter.

     

    Looking forward for your reply.