Hi all,
have a strange thing: I created a table adapter on a SQL table. All settings in the table adapter seem to be ok. The preview works fine.
If I'm now drag and drop the XamDataGrid into the WPF, the message appears: "Cannot add the control to the design surface or bind to the control because the type '<DataSourceDatabase>' cannot be resolved."
It doesn't work in WPF and WEB, but it does in Forms.
Any idea?
Hello,
According to the provided pictures you are trying to drag datasoure to the designer and not XamDataGrid, which is something that I believe will work only in winforms.
In order to use XamDataGrid, you have to drag the grid first, then bind it to the datasource. You can check how to do the binding in our documentation here:
https://es.infragistics.com/help/wpf/xamdatagrid-accessing-data
If this is not the case, can you provide more information how to recreate this on our side.
Sincerely,Tihomir TonevAssociate Software DeveloperInfragistics
Hi Tihomir,
thanks for your quick response.
I don't get the ponit now. Becuase in May,2017 I followed Infragistics Youtube
https://www.youtube.com/watch?v=7ATzMapcV44
at this time, everything was right.
To get back to your question - how to recreate:1.) open a new project2.) create a new data source and select a table.3.) VS shows now the symbol of the xamdatagrid below the data source.4.) As seen in the Infragistics video, drag the xamDatagrid icon into the WPF.
Afterwards there should be the xamDatagrid in WPF, and in the next steps change the settings...
On the over hand, if i start to create manually, I struggle at the first command <windows.resources>
I dragged a xamDatagrid to WPF.
Then i try to specify the resource.
see hardcopy
Best regards, Alexander
I have followed the steps provided and the error indeed showed, but after building the project there were no more issues.
Regarding the issue with manual building, you have not specified data source for the XamDataGrid, so the grid will not display data until you do so.
try:
DataSource = {StaticResource HD_eCOMData}
Sincerely,
Tihomir TonevAssociate Software DeveloperInfragistics
thank's for pointing out "Building Project"..... Problem solved!
Best regards Alexander