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: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback


Thread ID:





31260 Jul 4,2005 08:33 PM UTC Jul 5,2005 05:11 PM UTC WinForms 7
Tags: GridControl
Martin Cyr
Asked On July 4, 2005 08:33 PM UTC

I just rewrote the VitrualMergeCell sample to fit my needs, but I have one problem : works great for any cell except for the row header column. If I put duplicates consecutive rows anywhere but the first column, merge great, but if it''s in the first, it repeats without merging. Whats wrong?

Martin Cyr
Replied On July 4, 2005 08:47 PM UTC

I found something strange : when I set only Cols.HeaderCount = 0 the first columns won''t merge but if I add Cols.FrozenCount = 1 then it does merge, but I get a blue dotted line after the next column...

Administrator [Syncfusion]
Replied On July 4, 2005 08:47 PM UTC

The sample seems to work ok for row headers. What did you change? Did you change this code? GridStyleInfo rowHeaderStyle = BaseStylesMap["Row Header"].StyleInfo; //rowHeaderStyle.CellType = "Static"; rowHeaderStyle.MergeCell = GridMergeCellDirection.RowsInColumn; which is where the merge is enabled on the row headers. Does this code get hit in your sample?

Martin Cyr
Replied On July 4, 2005 09:06 PM UTC

Yes, I have this code and it gets hit. The problem is that I do NOT want 3 frozen and 2 headers cols. Try it in your sample. Just change Cols.HeaderCount = 1 Cols.FrozenCount = 2 to Cols.HeaderCount = 0 Cols.FrozenCount = 0 Since the default header is still there and is frozen, it''s all that I need (esthetically I mean), but with this code, the first column doesn''t get merged.

Martin Cyr
Replied On July 5, 2005 12:47 PM UTC

Until I get an answer, I did this to fix the problem, but it is only a workaround (I still need an answer ;). Sadly this messes all my arithmetics and logics. Cols.HeaderCount = 1 Cols.FrozenCount = 1 ColHiddenEntries.Add(New GridColHidden(0))

Martin Cyr
Replied On July 5, 2005 01:17 PM UTC

After further investigation, I can see that OnQueryCellModel never gets called for col 0 (but it gets called for row 0). Any hints on why that is?

Administrator [Syncfusion]
Replied On July 5, 2005 04:19 PM UTC

This is being looked into. It is not clear yet whether there was a necessary reason for not allowing this to work for the row header column though it is strange that setting FrozenCount = 1 does allow it to work. You can work around this issue using covered cells by adding an OnQueryCoveredRange override to CustonGridModel. Protected Overrides Sub OnQueryCoveredRange(ByVal e As Syncfusion.Windows.Forms.Grid.GridQueryCoveredRangeEventArgs) If e.ColIndex = 0 AndAlso e.RowIndex > Me.Rows.HeaderCount Then Dim top As Integer = e.RowIndex Dim val As Object = Me(e.RowIndex, e.ColIndex).CellValue While top > Me.Rows.HeaderCount AndAlso val.Equals(Me(top - 1, e.ColIndex).CellValue) top -= 1 End While Dim bot As Integer = e.RowIndex While bot < Me.RowCount AndAlso val.Equals(Me(bot + 1, e.ColIndex).CellValue) bot += 1 End While If bot <> top Then e.Range = GridRangeInfo.Cells(top, 0, bot, 0) e.Handled = True End If End If End Sub

Administrator [Syncfusion]
Replied On July 5, 2005 05:11 PM UTC

This is a defect that has been corrected here in our code base.


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.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

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