We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
close icon

Using GridDataControl & trying not to break MVVM pattern.

So I have a very simple application to demonstrate what I'm trying to accomplish. Specifically, I have my GridDataControl bound to a DataTable object that's being initialized in the ViewModel constructor (in the real application the DataTable is different each time the ViewModel instance is created).

Because the columns could be different I can't setup formatting in the XAML code.

Is it possible to bind this column specific information to a collection?

Attachment: Testing001_49feaa58.zip

1 Reply

SV Srinivasan Vasu Syncfusion Team July 9, 2017 06:50 PM UTC

Hi Lazic, 
Thanks for contacting Syncfusion support. 
We have checked your query and you can bind the column with specific information to GridDataControl by using GridDataControl.QueryCellInfo event in runtime. In QueryCellInfoCommand is used to allow customization of each cell in the specified format. QueryCellInfo accepts an argument of type GridQueryCellInfoEventArgs. The GridQuerryCellInfoEventArgs contains the following customization properties. Now you can make use of this, 
Cell – Gives the cell co-ordinates. 
Style – Specifies the style for the cell represented by the above cell property. 
Please refer the below UG Link: 
Also, we have checked the provided sample and but we didn’t find GridDataControl anywhere in the project.  

Live Chat Icon For mobile
Up arrow icon