SfDataGrid Column Sorting by Time
Hi All,
Using VB.net and Syncfusion 18.1.0.42
Could someone please tell/show me how to sort a column in the SfDataGrid by time (HH:mm:ss) only, i have an observable collection which includes a DateTime property but no matter what i try i cannot get the column to auto sort by time when an item is updated, the data is updated in the SfDataGrid but it will not sort, it does if click the column header but then when the data is updated it no longer sorts correctly.
i have tried with DateTimeColumn and a Text column with the DateTime both as a DateTime and DateTime to string but have the same issue.
i have also tried the various formats options for the column as in Longtime, Shorttime and also Custom with HH:mm:ss set.
If i use the Microsoft datagrid that comes with visual studio it all works as expected.
Thanks for any help
Regards
Nic
SIGN IN To post a reply.
8 Replies
SS
Susmitha Sundar
Syncfusion Team
April 27, 2020 02:06 PM UTC
Hi Nic,
Thank you for using Syncfusion controls.
You can update the sorting and filtering while update data in SfDataGrid by using the LiveDataUpdateMode property as AllowDataShaping.
Please let us know if you need further assistance on this.
Regards,
Susmitha S
NI
Nic
April 27, 2020 09:30 PM UTC
Hi Susmitha,
Thank you for your reply, I have AllowDataShaping enabled already but still have the sorting issue, I think it could be because my data is updated on a timer every 30 seconds and then i do SfDataGrid refresh to see the changes and it seem this is not supported by SfDataGrid.
Can you think of any other way i can get this to be able to sort automatically as i SfDataGrid works really well otherwise.
Kind Regards
Nic
SS
Susmitha Sundar
Syncfusion Team
April 28, 2020 05:19 PM UTC
Hi Nic,
Thank you for your update.
We have prepared the sample based on your requirement. While we are updating the values by Timer.Tick event, Time column sorting works fine.
Please check the sample and let us know if you still facing the same issue? If not, please modify the sample based on your scenario and revert us back with the following details,
· Issue reproducing video (if possible)
· Syncfusion update version
It will be helpful for us to check on it and provide you the solution at the earliest.
Regards,
Susmitha S
NI
Nic
May 2, 2020 11:01 AM UTC
Hi Susmitha,
Nic
Thank you for the sample i have since changed to using a dataset/datatable and sorting is working as expected.
I do however have a new issue where if i group by a column then when the data is updated every 10 seconds if i have a row selected various rows are highlighted/flashing one at a time as they are updated and the selected row is then unselected is there a way i can stop this from happening?
Kind Regards
Nic
SS
Susmitha Sundar
Syncfusion Team
May 4, 2020 01:41 PM UTC
Hi Nic,
Thank you for your update.
We have prepared the sample based on your requirement “Update the data in Timer tick with grouping”. Selected items maintained properly.
Sample link: https://www.syncfusion.com/downloads/support/forum/153900/ze/DataGrid_DataupdatedWithGrouping-827941504
Please check the sample and let us know if you still facing the same issue? If not, please modify the sample based on your scenario and revert us back with the following details,
· Issue reproducing video (if possible)
· Syncfusion update version
It will be helpful for us to check on it and provide you the solution at the earliest.
Regards,
Susmitha S
NI
Nic
May 8, 2020 12:50 PM UTC
Hi Susmitha,
Attachment: row_selection_20200508_134212672_82f13724.rar
I have attached a sample video showing what is happening if i have a row selected and the data is refreshed at 10 second interval, you will notice the rows highlight as they are updated and the selected row has then lost focus. i am using VB.net with SfDataGrid.WinForms version 18.1460.0.42
Regards
Nic
Attachment: row_selection_20200508_134212672_82f13724.rar
SS
Susmitha Sundar
Syncfusion Team
May 11, 2020 04:24 PM UTC
Hi Nic,
Thank you for providing the details.
We have checked the reported issue with mentioned version. But unfortunately, we unable to replicate this case. We need some time to analyzing this. We will update the details on May 12, 2020.
We appreciate your patience until then.
Regards,
Susmitha S
SS
Susmitha Sundar
Syncfusion Team
May 12, 2020 05:59 PM UTC
Hi Nic,
We have created a new incident under your Direct trac account. We suggest you to follow up with the incident for further updates. Please log in using the below link.
Regards,
Susmitha S
SIGN IN To post a reply.
- 8 Replies
- 2 Participants
-
NI Nic
- Apr 24, 2020 11:58 AM UTC
- May 12, 2020 05:59 PM UTC