[Solved] - Autogeneratecolumn_event question!

I use a datagrid to display 2 datatable (dt1 and dt2), where only dt1 contains one column [datetime format], dt2 only string & number



When using with dt1 (convert to dynamicdt), I used auto_generatecolumn event to format it and work fine.
However if I change datasource = dt2 (right after), then it shows no longer correct (first it is empty column, then when changing to dt1 the position of columns in dt1 will be reversed, if i go back to dt2, a time column will be created at first position dt2) 




I have carefully tested dt1 and dt2 was created correctly. but it seems datasource doesn't work.
How do i fix this?

2 Replies

TG The GridLock May 6, 2020 05:29 AM UTC

Hi,
Reset datagrid, and it worked for me now. I thought that when changing datasource. It resets itself.


VS Vijayarasan Sivanandham Syncfusion Team May 6, 2020 05:43 AM UTC

Hi Khanh Dang, 
 
Thanks for the update. 
 
We are glad to know that the reported problem has been resolved at your end. Please let us know if you have any further queries on this. We are happy to help you😊. 
 
Regards, 
Vijayarasan S 


Loader.
Up arrow icon