RT

解决方案 »

  1.   

    如果是的话,只需要用SQL语句改变表中数据记录。然后把msflexgrid内容刷新就行了。
      

  2.   

    读出MSFlexGrid的ROW与COL值,再进行相应的操作。
      

  3.   

    msflexgrid1.removeitem index
      

  4.   

    msflexgrid1.additem(item as string,index)
      

  5.   

    很简单那 .additem 内容,行值
    remove之前要判断rows ,小于两行不行,只能用rows = 行数
      

  6.   


    晕ing,楼主是问这个问题吗?
      

  7.   

    用GOTFOCUS获得这行的焦点,然后用了这个行的焦点,也就用了这行数据的值,数据的值是用坐标方式体现的,你把这个坐标里的值给到一个变量了,然后写一个删除语句不就可以删除了嘛,我就是这么做的。
      

  8.   

    additem,removeitem就可以了﹐前提是要得到row.
      

  9.   

    是否可以详细介绍FLEXGRID的详细用法。
      

  10.   

    我在VSflexgrid里面用RowPosition属性做过,做两个函数就可以了,MSflexgrid不知道有没有这个属性
      

  11.   

    后插入点行号: intRowID
    Private Sub InsertBlankRow(ByVal intRowID As Integer)
       Dim intRow As Integer
       Dim intCol As Integer
       
       intCol = 1
       intRow = FGrid1.Rows - 1
       FGrid1.Rows = FGrid1.Rows + 1
       
      'move
       While intRow > intRowID
         intCol = 1
         While intCol < FGrid1.Cols - 1
         FGrid1.TextMatrix(intRow, intCol) = FGrid1.TextMatrix(intRow - 1, intCol)
         intCol = intCol + 1
         Wend
           intRow = intRow - 1
       Wend
       
       'clear the row whose rowID=intRowID
        intCol = 1
         While intCol < FGrid1.Cols - 1
         FGrid1.TextMatrix(intRow, intCol) = ""
         intCol = intCol + 1
         Wend
         
       'Rewrite the RowID flags
       intRow = 1
       intCol = 0
       While intRow < FGrid1.Rows - 1
           FGrid1.TextMatrix(intRow, intCol) = CStr(intRow)
           intRow = intRow + 1
       Wend
        
    End Sub
      

  12.   

    你用的是什么数据库
    是access数据库吗
      

  13.   

    在该示例中,用 AddItem 方法将 100 项添加到 MSFlexGrid 中。要试用此例,可以将代码粘贴到窗体(该窗体带有命名为 MSFlexGrid1 的 MSFlexGrid 控件)的声明部分,然后按下 F5 键,并单击该窗体。
    Private Sub Form_Click ()
       Dim Entry, i, Msg               '声明变量。
       Msg = _
       "Choose OK to add 100 items to your MSFlexGrid."
       MsgBox Msg   '显示消息。
       MSFlexGrid1.Cols = 2         '每行有两个字符串。
       For i = 1 To 100   '从 1 计数到 100。
          Entry = "Entry " & Chr(9) & I   '创建项。
          MSFlexGrid1.AddItem Entry      '添加项。
       Next i
       Msg ="Choose OK to remove every other entry."
       MsgBox Msg                     '显示消息。
       For i =1 To 50               '决定怎样删除
          MSFlexGrid1.RemoveItem i   '其它每一项。
       Next I                        
       Msg ="Choose OK to clear all items."
       MsgBox Msg                     '显示消息。
       MSFlexGrid1.Clear               '清除列表框。
    End Sub