Hi.
Could you guys give me some directions on how to accomplish a Master-Detail with the DevExtreme dxDataGrid Extension?
It looks like I have hit a brick wall when I need to add a “function” in the wrapper Options. I have another thread here in the forum where I needed to set customLoad and customSave for the stateStoring and haven’t been able to accomplish that either. This is the Master-Detail sample I need to work on:
Would it be possible to have a simple sample having a Wisej form showing this grid?
Thanks in advance.
Ivan
(Wisej 2.2.46.0 – VS 2019 – C#)
Here is the dxDataGrid sample demonstrating how to use the Master-Detail view. Please update the DevExpress extension library from GitHub.
The detail grid’s structure is defined in the template within the WidgetFunction.
The detail and master grids are both populated using service URLs (uses widget WebRequest handler) that feeds the data from two JSON files.
The detail grid’s cellClick is attached to the Wisej application and called “childCellClick”. See the format for attaching detail grid events in the WidgetFunction.
The detail grid is saved within the master widget’s context (client-side format: this.id_widgetId_detail_rowNumber, i.e. this.id_3_detail_1).
CustomSave and CustomLoad function initializers are now added too, used like this:
this.dxDataGrid1.Options.stateStoring = new { customLoad = "myWidgetFunctionName1", customSave = "myWidgetFunctionName2" ... };
If you have any questions or issues with the sample, please let me know!
Best regards,
Levie
WOW, Levie!
Your sample is great. It will help immensely.
Thank you so much.
Hi Levie.
I have a feeling you haven’t added dx.aspnet.data.js to the GitHub repository:
Getting the error in the Console:
qx.js?v=2.2.52.0:86735 GET http://localhost:64780/resource.wx/Wisej.Web.Ext.DevExtreme/Wisej.Web.Ext.DevExtreme.DevExtreme/js/dx.aspnet.data.js?v=637595201744946203 net::ERR_ABORTED 404 (Not Found)
Hi Luca.
Thanks for the reply.
Yep, I understood your sample, I just can’t figure out how to add a second dxDataGrid, set its datasource to an Array Class I have in the server, and tell the Master this is to be returned from its call to the MasterDetail template function.
I will see what we can do.
It was in the sample I have attached to the other replies. Click the arrow next to the row and you get the HTML for the detail table. Look at the WidgetFunctions and you will find a getMasterDetailTemplate() javascript function where you can add all the javascript you see in the devex samples. It get complicated but it’s the way all third party widjets work. If you need more targeted development we have support packages that are available at sales@wisej.com.
Please login first to submit.