Adding a new row in UltraWinGrid

This post has 2 Replies | 3 Followers

Points 45
Replied On: Wed, Jul 30 2008 2:13 AM

How can I add a new row to an UltraWinGrid?

We have a 3rd party VB.NET application that uses an UltraWinGrid. The apps allow the user to modify the data ~ user can edit existing records or add new rows depending on the distribution of quantity they want.The uwgrid gets bind to a datatable:

Dim dtpackets as DataTable = Package.GetPackets(PkgID)

uwGrid.DataSource = dtPackets

Whatever is returned get shown on the grid and allow user to edit it. But now we want also to be able to add new row so they can distribute quantity however they want. Before a package can have 2 packets with 100 each, now users can modify to make this 4 packets 50 each or 3 packets (100, 50, 50). We have an "Add Row" button that will allow user to add rows as many as they want.

Your time and effort is greatly appreciated. 


  • Post Points: 20
Points 180
Replied On: Wed, Jul 30 2008 6:55 AM

You can add a new row in 2 ways.  Your add new button could call:


Or you could add the following line when you populate the grid to give the user a fixed row to add new records:

uwGrid.DisplayLayout.Override.AllowAddNew = AllowAddNew.FixedAddRowOnTop


  • Post Points: 20
Points 45
Replied On: Wed, Jul 30 2008 5:20 PM

The first one is what I'm looking for, it works!

I was looking at the rows collection thinking there is an AddRow method!?

You are a godsend, may the angels sing praise for you!

Thank you very much.



  • Post Points: 5
Page 1 of 1 (3 items) | RSS