Re: ByVal and ByRef with MSFlexgrid acts the same (IN VB6)

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



"Rick Rothstein [MVP - Visual Basic]" <rickNOSPAMnews@xxxxxxxxxxxxxxxxx>
schreef in bericht news:em7ENvW2FHA.1576@xxxxxxxxxxxxxxxxxxxxxxx
....
> You could highlight the entire original grid of data, copy that
> selection to a String variable via the Clip method and pass this
> String variable into your Sub. The rows of data are delimited by
> carriage return characters (vbCr) and the columns within rows are
> delimited by tab characters (vbTab). If you carry a second,
> separate grid on any one of your forms, you could simply assign
> this passed data from the original grid to this second grid by
> assigning the passed String variable via the Clip method of this
> second grid.
>
> Sub <<some event on your form>>
> With MSFlexGrid1
> .Row = 0
> .Col = 0
> .RowSel = .Rows - 1
> .ColSel = .Cols - 1
> DataFromGrid = .Clip
> Call YourSub(DataFromGrid)
> ....
> ....
> End With
> End Sub
>
> Sub YourSub(DataIn As String)
> MSFlexGrid2.Clip = DataIn
> ' At this point, MSFlexGrid2 will be an exact
> ' copy of MSFlexGrid1
> ....
> ....
> End Sub
>
> Note that I set the Row and Col properties to 0 in the calling
> event; this will copy the headers as well as the data. I did this
> so that the Row and Col for the data elements will "line up"
> between the two grids. If you only need the data (and not the
> headers), change these two statements to this...
>
> .Row = .FixedRows
> .Col = .FixedCols
>
> Rick
>
Great code !
--
http://users.skynet.be/101airborne
Official Site of the 463rd PFA



.



Relevant Pages

  • Re: A VERY strange problem when Updating a Dataset
    ... it's the ParentID column in the ... row that is selected in the grid... ... Foreign key value back before it's saved.. ... >> End Sub ...
    (microsoft.public.dotnet.languages.vb)
  • Re: print large triangular outline using multiple sheets, possible?
    ... A leaf is basically a triangle with two curved sides. ... corner of the grid cells, ... Private Sub Form_Load ...
    (microsoft.public.vb.general.discussion)
  • Re: print large triangular outline using multiple sheets, possible?
    ... A leaf is basically a triangle with two curved sides. ... You already know how to draw the shape you want, ... corner of the grid cells, ... Private Sub Form_Load ...
    (microsoft.public.vb.general.discussion)
  • GridView
    ... Partial Class Grid ... 12 Protected Sub Page_Init(ByVal sender As Object, ... 22 Dim cagstCollaborators As ComponentArt.Web.UI.GridServerTemplate ... 76 ' Define collaborators grid datasource ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: Help with drawing?
    ... content of the panel to a bitmap (for double buffering so it doesn't ... > I have the following code which is supposed to draw a grid in a panel ... > and activate the autoscroll feature, however I cant get it to scroll ... > Public Sub New ...
    (microsoft.public.dotnet.languages.vb)