Query |
Comments |
If all Columns are Auto generated (We are not defining any column) in that case, Why DATETime Field is auto generated as a String ?
Ex. In MYSQLDB one field is in DATETIME Type, but after auto generate, this field is generated as String.
After all columns auto generated, can we define and change any column to another type ?
ex. in above 1, if field are auto generated and one field is as String, can we change that single fields Type from String to Datetime Type. ? Or We have to define each and every field manually. |
We have checked the reported case in a simple application using MySql and we are able to reproduce the reported case in our end. On analysis we have found that the type of the date column in the DataTable is MySqlDateTime. We have only considered DateTime and nullable DateTime types to generate GridDateTimeColumn. Due to this that column is generated as text column.
This can be changed to a GridDateTimeColumn using SfDataGrid.AutoGenaratingColumn event. But the sorting will not work as expected in such cases. |
While grouping this Date field, it is showing Date with Time, where as there is no time in the data set.
While filtering this Date field, it is showing Date with Time, where as there is no time in the data set.
|
We have checked these queries from your previous updates.
This can be resolved by setting GridColumn. GroupMode as DataReflectionMode.Display and GridColumn.FilterMode as ColumnFilter.DisplayText.
However for DataTable the GroupMode property will not be work as expected. |
Query |
Solution | |
Regarding the auto generation of DateTime column |
We have checked the cause for this in your application. We suggest you to make the following changes in your application.
As given below.
| |
Regarding the GroupMode property not working for DataTable. |
We have checked this case in our end and currently GroupMode support is not provided for DataTable. We have considered this and we are planned to include this support. We will update you with the patch including this support on 31st October, 2019. |
Query | STATUS AS ON 17/10/2019 |
After data fetch from Database ex. MYSQL Database, we have to again initialised columns and set the data type for all the columns. Instead of this, directly set data from database with initialised columns and date must be as per the defined date format in selected query. So further there will be no additional codes. | As per your suggetion of "Convert Zero DateTime=True" Function, getting Auto Data and Date column is working fine and Date Column Sorting Is also working fine. So this ID Query is solved and working fine. |
While grouping this Date field, it is showing Date with Time, where as there is no time in the data set. | After giving above "Convert Zero DateTime=True" function, Still it is showing the same. As per your Reply, You will provide the patch on 31st October, 2019. You are requested to please do the needful at the earliest. |
While filtering this Date field, it is showing Date with Time, where as there is no time in the data set. | After giving above "Convert Zero DateTime=True" function, Still it is showing the same. As per your Reply, You will provide the patch on 31st October, 2019. You are requested to please do the needful at the earliest. |
this.sfDataGrid1.Columns["ShippingDate"].FilterMode = Syncfusion.Data.ColumnFilter.DisplayText; |
this.sfDataGrid1.Columns["ShippingDate"].GroupMode = Syncfusion.Data.DataReflectionMode.Display; |
Query |
Solution | |
Query 1 : While filtering this Date field, it is showing Date with Time, whereas there is no time in the data set.
If Column is define separately and applying the given code then while filtering the Date is not showing Time, which is working fine as per requirement. But in Filter Box/Popup, the date is not sorted. After Applying Sorting in ascending/descending order, the sorting is not working. You are requested to check the sample you had send me.
|
We are able to reproduce these scenarios in our end. We are currently working on this with high priority. We will update you with details on 23rd October 2019. We appreciate your patience until then. | |
Query 2 : While grouping this Date field, it is showing Date with Time, whereas there is no time in the data set.
Its working Fine. But Default sorting of Date is as per arrow is in ascending whereas data is in descending mode, and the vice versa. You are requested to check the sample you had send me.
| ||
Query 3 : To Apply this code, I have to define the column, Whereas all the columns are auto generated at our side. And After Auto Generated all columns, to make the necessary changes of this column as per your suggestion is not working. So, requested to please implement this in defaults where columns are auto generated dynamically. |
You can set the GroupMode and FilterMode for the column while autogenerating the columns by using the SfDataGrid.AutoGeneratingColumn event as shown in the following code example.
Code example :
Sample link : https://www.syncfusion.com/downloads/support/directtrac/general/ze/147722_AutoGenerateSample-1278516561
|
Query |
Solution | |
Query 1 : While filtering this Date field, it is showing Date with Time, whereas there is no time in the data set.
If Column is define separately and applying the given code then while filtering the Date is not showing Time, which is working fine as per requirement. But in Filter Box/Popup, the date is not sorted. After Applying Sorting in ascending/descending order, the sorting is not working. You are requested to check the sample you had send me.
|
We have checked this scenario and it is confirmed as a defect. We have logged a bug report on this regard. We will fix this issue and provide the patch for the fix on 6th November 2019.
| |
Query 2 : While grouping this Date field, it is showing Date with Time, whereas there is no time in the data set.
Its working Fine. But Default sorting of Date is as per arrow is in ascending whereas data is in descending mode, and the vice versa. You are requested to check the sample you had send me.
|
We have checked this scenario and it is the expected behavior. Based on our architecture sort order on grouping will be decided based on the display value when the GroupMode is set to Display. So the sorting will be performed using the string values not by using actual date value. However you can resolve this by creating a custom sort comparer for the date column as shown in the following code example.
Code example :
Sample link : https://www.syncfusion.com/downloads/support/directtrac/general/ze/147722_CustomSort1949943201
|