Home > Software engineering >  DATAGRID right print can't correct positioning, could you tell me how to solve
DATAGRID right print can't correct positioning, could you tell me how to solve

Time:10-04

The code is as follows:
Private Sub sdrbb_MouseUp (Button As an Integer, Shift the As an Integer, As Single X, Y As Single)
Dim RowValue, ColValue
RowValue (Y)=https://bbs.csdn.net/topics/sdrbb.RowContaining
ColValue (X)=https://bbs.csdn.net/topics/sdrbb.ColContaining

If RowValue & gt;=0 And RowValue & lt; .=SDRBB VisibleRows And _
ColValue & gt;=0 And ColValue & lt; .=SDRBB VisibleCols Then
SDRBB. Row=RowValue
End the If

Adodc1. You. MoveFirst
If RowValue & lt; 0 Then the Exit Sub
Adodc1. You. Move RowValue

If the Button=2 Then 'If it is the right mouse Button when press the
Me. PopupMenu mnuDayinPJ2, 0, + X SDRBB. Left, Y + SDRBB. Top 'popup menu
End the If
End Sub

Problems existing in the code above is that when I right click records such as article 200 rows, and the records in the current display of the third row, after right-clicking a right-click menu of the record into the entire sets of 3 records,

Is there a better way, and how to solve, thank you,

CodePudding user response:

And display the first line of the actual value, such as split screen display, what is the screen and how much per screen to compute the current records, also need to compute the position of the scroll bar, etc...

In brief, the need to calculate,

CodePudding user response:

DataGrid control attributes of the Row, unlike MSHFlexGrid, is currently possible,

Generally use the DataGrid is based on the record set operation, rather than a DataGrid row,

CodePudding user response:

Is the line number of the current visible,

CodePudding user response:

For a long time without the datagrid.

Had just started to contact database is used, the figure is that it links database is convenient, also can directly edit.

Later discovered, in the "convenient" and "freedom" it is not difficult to make a choice.

When you learn to manual code can realize database operations and content after editing, the grid is just a display tools, embedded function instead of tying up your hands.
  • Related