Well, I found a VERY SIMPLE solution to this (As is usually the case in .Net) and I thought I would post this in case someone else
was looking for this solution.
There is a WidthChanged Event on the TextBoxDatagridColumn object that I just capture and then sync the datagrids.
IE
Private Sub TopToBottom_WidthChange(ByVal sender As Object, ByVal e As System.EventArgs) Handles NameColumn.WidthChanged,
SourceColumn.WidthChanged, PayerDescColumn.WidthChanged, Reached90Column.WidthChanged
PreviousNameColumn.Width = NameColumn.Width
PreviousSourceColumn.Width = SourceColumn.Width
PreviousPayerDescColumn.Width = PayerDescColumn.Width
PreviousReached90Column.Width = Reached90Column.Width
End Sub
Private Sub BottomToTop_WidthChange(ByVal sender As Object, ByVal e As EventArgs) Handles PreviousNameColumn.WidthChanged,
PreviousSourceColumn.WidthChanged, PreviousPayerDescColumn.WidthChanged, PreviousReached90Column.WidthChanged
NameColumn.Width = PreviousNameColumn.Width
SourceColumn.Width = PreviousSourceColumn.Width
PayerDescColumn.Width = PreviousPayerDescColumn.Width
Reached90Column.Width = PreviousReached90Column.Width
End Sub
"Scott Meddows" <sc******************@tsged-removeme.com> wrote in message news:%2****************@TK2MSFTNGP10.phx.gbl...
I have a custom Datagrid that I want to do somthing with. When I resize a column I want a tooltip like box to come up and tell me
the width of the column. Is that hard to do? Posted is the code for what I currently have.
Thanks
Scott
Public Class MyDataGrid
Inherits DataGrid
Public Event MyVScroll As ScrollEventHandler
Public Event MyHScroll As ScrollEventHandler
Protected Overrides Sub GridVScrolled(ByVal sender As Object, ByVal e As ScrollEventArgs)
MyBase.GridVScrolled(Me, e)
OnMyVScroll(e)
End Sub
Protected Overrides Sub GridHScrolled(ByVal sender As Object, ByVal e As ScrollEventArgs)
MyBase.GridHScrolled(sender, e)
OnMyHScroll(e)
End Sub
Protected Sub OnMyVScroll(ByVal e As ScrollEventArgs)
RaiseEvent MyVScroll(Me, e)
End Sub
Protected Sub OnMyHScroll(ByVal e As ScrollEventArgs)
RaiseEvent MyHScroll(Me, e)
End Sub
Public Sub SynVScroll(ByVal e As ScrollEventArgs)
MyBase.GridVScrolled(Me, e)
End Sub
Public Sub SynHScroll(ByVal e As ScrollEventArgs)
MyBase.GridHScrolled(Me, e)
End Sub
End Class