GrapeCity Forums

The GrapeCity Message Boards
Welcome to GrapeCity Forums Sign in | Join | Help
in Search

How to Add drop down combo to a newly added row dynamicaly

Last post 11-08-2009, 11:50 PM by DeepakSharma. 1 replies.
Sort Posts: Previous Next
  •  11-06-2009, 11:19 PM 84544

    How to Add drop down combo to a newly added row dynamicaly

    I have a spread of three columns. Second column has a drop down for 3 rows. When i click a button add in the form a new row is getting added to the spread.I want a dropdown combo to be loaded in the second column of the newly added row. Plz help

  •  11-08-2009, 11:50 PM 84552 in reply to 84544

    Re: How to Add drop down combo to a newly added row dynamicaly

    Hello,

    In order to have newly added Row the same cellType as the Existing upper Row you can apply the Cell Type on Column Level instead of applying the CellType to individual Cells.

    You may have a look at the below code snippet,

    Private Sub Command1_Click()
      fpSpread1.MaxRows = fpSpread1.MaxRows + 1
    End Sub
    Private Sub Form_Load()
      fpSpread1.MaxRows = 3
      fpSpread1.Col = 2
      fpSpread1.CellType = CellTypeComboBox
    End Sub

    I hope it will help you.

    Thanks,

     

     


    Deepak Sharma
    GrapeCity FarPoint
View as RSS news feed in XML
     FarPoint Forums Home