tableview problem
Posted
#1
(In Topic #178)
Regular

Trouble is that the warning message appears twice
Code
' Gambas class file
Public Sub Form_Open()
tbvInvoices.Columns.Count = 3
tbvInvoices.Rows.Count = 5
End
Public Sub tbvInvoices_Click()
tbvInvoices.Edit
End
Public Sub tbvInvoices_Save(Row As Integer, Column As Integer, Value As String)
If IsNumber(Value) Then
Message.Error("only non-numeric")
Return
Endif
tbvInvoices[Row, Column].Text = Value
End
Any ideas would be appreciated
gambas 3.9.2
Posted
Guru

However I have created a possible work around. On your existing Form add a TextBox called TextBox1 and set the Visible property to False. Then run the following code. No error message will be displayed as no numbers will get on the Table.
Code (gambas)
- tbvInvoices.Columns.Count = 3
- tbvInvoices.Rows.Count = 5
- tbvInvoices.EditWith(TextBox1)
- tbvInvoices[Row, Column].Text = Value
I hope that helps.
Posted
Regular

Posted
Regular

Code
Public Sub gdvInvoices_Click()
bSet = True
gdvInvoices.Edit
End
Public Sub gdvInvoices_Save(Row As Integer, Column As Integer, Value As String)
If Value = "not acceptable" Then
If bSet Then Message("not acceptable")
bSet = False
Return
Endif
gdvInvoices[Row, Column].Text = Value
End
This clumsy, but it works!
Posted
Regular

1 guest and 0 members have just viewed this.



