OT: ComponentOne TrueDB Grid.Net Issue

  • Thread starter Thread starter Simon Verona
  • Start date Start date
S

Simon Verona

I don't know if anybody has any experience with using the TrueDBGrid from Component One (I believe that it's included in some of the Microsoft CD's as an additional component, but I've got the full registered component).

I use the truedbgrid in an inherited control with some additional functionality (mainly some custom data-binding code). I have added some code in the Double-Click event handler to raise another event that is picked up on my main form.

The double-click handler code is as follows:

Private Sub DmsReport_DoubleClick(ByVal sender As Object, ByVal e As System.EventArgs) Handles MyBase.DoubleClick

' Raise Event for RowSelected

RaiseEvent RowSelected(sender.row)

End Sub



I expect sender.row to return the row number within the data that has been clicked so I can pick up the data using code such as dmsreport1.item(row,1) where row is the parameter from the raiseevent code above.

This works perfectly when I don't use the "grouping" feature of TrueDBGrid.

However, when I use grouping, and the user manually groups a column which causes rows to be hidden below expandable groups, I find that the row no returned is actually the row no that you clicked, but counting the Visible rows only, and adding one for each "group"... eg if there are 5 collapsed groups, and the sixth is "expanded" and I then click on the 2nd row of the expanded group, the row number returned is actually 7!!! However, using this row no to pick up the data using the item method (as above) counts the hidden rows as well so I don't return the data I expect!!!

Have I got my logic wrong? Is this a bug? Does anybody know a workaround??

I have posted this question both to ComponentOne and to their newsgroup without success, and hope somebody here has some thoughts on this component.

Apologies also if I've posted this to groups that aren't appropriate!

Many thanks in advance

Simon
 
Hi,

You should try one of the component one newsgroups.
http://www.componentone.com/pages.aspx?PagesID=52&Panelindex=5

Ken
--------------------
I don't know if anybody has any experience with using the TrueDBGrid from
Component One (I believe that it's included in some of the Microsoft CD's as
an additional component, but I've got the full registered component).

I use the truedbgrid in an inherited control with some additional
functionality (mainly some custom data-binding code). I have added some
code in the Double-Click event handler to raise another event that is picked
up on my main form.

The double-click handler code is as follows:

Private Sub DmsReport_DoubleClick(ByVal sender As Object, ByVal e As
System.EventArgs) Handles MyBase.DoubleClick
' Raise Event for RowSelected
RaiseEvent RowSelected(sender.row)
End Sub

I expect sender.row to return the row number within the data that has been
clicked so I can pick up the data using code such as
dmsreport1.item(row,1) where row is the parameter from the raiseevent
code above.
This works perfectly when I don't use the "grouping" feature of TrueDBGrid.
However, when I use grouping, and the user manually groups a column which
causes rows to be hidden below expandable groups, I find that the row no
returned is actually the row no that you clicked, but counting the Visible
rows only, and adding one for each "group"... eg if there are 5 collapsed
groups, and the sixth is "expanded" and I then click on the 2nd row of the
expanded group, the row number returned is actually 7!!! However, using
this row no to pick up the data using the item method (as above) counts the
hidden rows as well so I don't return the data I expect!!!
Have I got my logic wrong? Is this a bug? Does anybody know a
workaround??
I have posted this question both to ComponentOne and to their newsgroup
without success, and hope somebody here has some thoughts on this component.
Apologies also if I've posted this to groups that aren't appropriate!
Many thanks in advance
Simon
 
been there.. done that.. got no reply :(

I've sent an email to their helpdesk, either this is a bug, or there is some
other method of doing this that I've not located in the docs... the
TrueDBGrid is a great component, but does have a few rough edges and isn't
always intuitive in it's object model!

Regards
Simon
 
What version of TrueDBGrid are you using? I have version 7 and was wondering if it will work with .NET

Thanks
I don't know if anybody has any experience with using the TrueDBGrid from Component One (I believe that it's included in some of the Microsoft CD's as an additional component, but I've got the full registered component).

I use the truedbgrid in an inherited control with some additional functionality (mainly some custom data-binding code). I have added some code in the Double-Click event handler to raise another event that is picked up on my main form.

The double-click handler code is as follows:

Private Sub DmsReport_DoubleClick(ByVal sender As Object, ByVal e As System.EventArgs) Handles MyBase.DoubleClick

' Raise Event for RowSelected

RaiseEvent RowSelected(sender.row)

End Sub



I expect sender.row to return the row number within the data that has been clicked so I can pick up the data using code such as dmsreport1.item(row,1) where row is the parameter from the raiseevent code above.

This works perfectly when I don't use the "grouping" feature of TrueDBGrid.

However, when I use grouping, and the user manually groups a column which causes rows to be hidden below expandable groups, I find that the row no returned is actually the row no that you clicked, but counting the Visible rows only, and adding one for each "group"... eg if there are 5 collapsed groups, and the sixth is "expanded" and I then click on the 2nd row of the expanded group, the row number returned is actually 7!!! However, using this row no to pick up the data using the item method (as above) counts the hidden rows as well so I don't return the data I expect!!!

Have I got my logic wrong? Is this a bug? Does anybody know a workaround??

I have posted this question both to ComponentOne and to their newsgroup without success, and hope somebody here has some thoughts on this component.

Apologies also if I've posted this to groups that aren't appropriate!

Many thanks in advance

Simon
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top