Hi,
In my UltraWinGrid I have made the addNewBox visible by setting ......Layout.AddNewBox.Hidden =false.
However the button below the grid is not possible to click and appears disabled.
What could be the likely reasons for the add-new-button to be disabled?
Which buttons are disabled? Is it the addnew button for the root band or for a child band? Do you even have any child bands?
If the button is disabled for the root band, then either you have disabled adding rows (AllowAddNew) or else your data source does not support adding rows.
If it's for a child band, then you also need to select a parent row in order to add a row, because the grid needs the parent row as context when adding the child row.
Thanks,
It is the button for the root band. I have no child bands
I have now found out that the problem is that my bound datasource does not support adding records.
I found out by adding a button with code:
Private Sub ButtonAdd_Click(sender As Object, e As EventArgs) Handles ButtonAdd.Click Me.SelInvoiceLineSingleJournalUltraGrid.DisplayLayout.Bands(0).AddNew() End Sub
Which gives: "An unhandled exception of type 'System.NotSupportedException' occurred in Infragistics4.Win.UltraWinGrid.v13.2.dll
Additional information: Row insertion not supported by this data source."
It is strange because the datasource is a simple "select.... where" statement stored procedure based on only one table
I deleted the grid and inserted a new additional one based on the same datasource, and now all is OK.
I tried to set datasource to nothing, save, and then select the datasource again, but that was not enough.
Thanks
Kai-Inge