We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on : Nov 16th 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

SaveCellInfo, ExcelTipComments, and GridDataBoundGrid

Thread ID:

Created:

Updated:

Platform:

Replies:

12892 Apr 14,2004 05:49 PM UTC Apr 14,2004 06:51 PM UTC WinForms 1
loading
Tags: GridControl
Administrator [Syncfusion]
Asked On April 14, 2004 05:49 PM UTC

I found the ExcelCommentGDBG solution and implemented it to add comments to a few cells of my databound grid, but when I reload the grid with new data, the cells with the comments still contain the old data. The grid shows hourly totals for a store, Team, and date. When I change from Team 1 to Team 3 and reload the dataset, Team 1''s totals remain in the cells with the comments. I believe the issue is somewhere in the saveCellInfo sub, but I''m not sure where. When the dataset is reloaded I want it to get the new values for those cells with the comments. Below is the SaveCellInfo sub. The question is: how can I have comments on cells and have the cells reload their values when the dataset is reloaded? ------------------------------------------------ Private Sub hoursched_SaveCellInfo(ByVal sender As Object, ByVal e As Syncfusion.Windows.Forms.Grid.GridSaveCellInfoEventArgs) If e.RowIndex > 0 AndAlso e.ColIndex > 0 Then Dim excelStyle As New ExcelTip.GridExcelTipStyleProperties(e.Style) If excelStyle.ExcelTipText.Length > 0 Then ''MsgBox(e.ColIndex & Me.DsSchedHour1.Tables(0).Rows(e.RowIndex - 1)(e.ColIndex - 1)) Dim key As Object = myGetHashCode(e.RowIndex, e.ColIndex) If Me.excelTipsCache.ContainsKey(key) Then Me.excelTipsCache(key) = e.Style Else Me.excelTipsCache.Add(key, e.Style) End If End If End If End Sub

Administrator [Syncfusion]
Replied On April 14, 2004 06:51 PM UTC

I am not sure if you are saying the cellvalue does not reflect the newly loaded datatable, or if the comment does not reflect the newly loaded datatable. If it is the comment you are concerns about, those are contained in your myGetHashCode hasttable. If youwant to clear these saved comments, then you should call myGetHashCode.Clear(). If you want to save them, and reload then later, then you would have to serialize this myGetHashCode hashtable somehow. If it is the cell value that is not behaving properly, then clearing the hashtable should help also since you are loading the style from teh hashtable in your QueryCellInfo (which you do not show here).

CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

;