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
295
FieldCollection from the loaded xamdatagrid
posted

i am looking for fields collection so then i can manipulate them further for my use. what i am doing is i am setting templates for the auto generated fields which is already generated but unfortunately i am not able to get the collection of fields when the grid get loaded or even after the field layout initialized.

Could somebody guide me here to find the collection of fields on loaded event of grid..

  • 30945
    Verified Answer
    Offline posted

    Hello,

     

    Thank you for your post. I have investigate the functionality that you  are looking for and when the AutoGenerateFields is set to True, you should be able to get the full list of generated fields in the FieldLayoutInitialized event, using the e.FieldLayout.Fields. If you are handling the FieldLayoutInitializing event, there the fields are not generated. You can also access the auto generated fields in the Loaded event of the XamDataGrid, by using its FielLayouts property. I have created a sample application for you that shows how you can apply styles for the CellValuePresenters of the different fields in the FieldLayoutInitialized event and also how you can get a list of the fields in the Loaded event of the control.

     

    In you need any further assistance on the matter please do not hesitate to ask.

     

    Sincerely,

    Krasimir

    Developer Support Engineer

    Infragistics

    www.infragistics.com/support

    GetFieldsListAndSetStyles.zip