0

I am using MSHFlexgrid in VB 6.0 code and while adding data
to the grid i am getting the error "Invalid Row Value" run time
error no "30009". will anybody help me out !

5
Contributors
4
Replies
8
Views
8 Years
Discussion Span
Last Post by ankush.mukherje
0

Check the value assigned to mshflexgrid1.row at the time of error, it should not be greater than (one less than mshflexgrid1.rows) and should be valid integer/long.

0

Hi,

While adding, you need to check if the Grid has got that many rows... say if the grid has 3 rows and you are trying to fill data in fourth row, then you will get error..
Try this
Grd.Rows = Grd.Rows+1

Regards
Veena

0

Hi
if you are using sql statements to fill your datagrid
you may use the following

Set adorsRAM = cn.Execute(sSQL)
    If Not adorsRAM.EOF Then
    Set msh.DataSource = adorsRAM
    msh.FormatString = "DATA No."
    For i = 1 To (msh.Rows - 1)
        msh.TextMatrix(i, 0) = i
    Next i
    msh.Refresh
    Else
     msh.Clear
    msh.FixedCols = 1
    msh.FixedRows = 1
    msh.Rows = 2
    msh.Cols = 2
    msh.FormatString = "DATA No."
    MsgBox "No Records Found in DataGrid!"

here cn is the connection
ssql is the sql statement
adorsram is the adodb.recordset

you can try it
Happy Programming

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.