hi friends,
at present i am doing a project for fast food center. i want to display the billing items in MSHFlexgrid. to do the same i am using the following code.
Private Sub txtquantity_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
If Not IsNumeric(txtquantity.Text) Or txtquantity.Text = "" Then
MsgBox "You must enter a valid Item Quantity", vbInformation, "Indiana stores(Purchase)"
txtquantity.Text = ""
txtquantity.SetFocus
Exit Sub
End If
QUANTITY = Val(txtquantity.Text)
PRICE = CDbl(txtitemprice.Text)
TAX = CDbl(txttax.Text)
DISCOUNT = CDbl(txtdiscount.Text)
GTOTAL = QUANTITY * PRICE
GTOTAL = GTOTAL + (GTOTAL * TAX / 100)
GTOTAL = GTOTAL - (GTOTAL * DISCOUNT / 100)
itemgrid.AddItem TXTBILLNO.Text & vbTab & txtitemname.Text & vbTab & txtitemprice.Text & vbTab & txtquantity.Text & vbTab & txtdiscount.Text & vbTab & txttax.Text & vbTab & GTOTAL & vbTab & cmbpay.Text & vbTab & txtshift.Text & vbTab & txtcashiername.Text & vbTab & cmbitemcode.Text & vbTab & proportion & vbTab & ITEMCATEGORY, 1
CLEAR
cmbitemcode.SetFocus
End If
End Sub
when ever the keypress event is executed one new row is added to the MSHFlexgrid but some times the flexgrid is not showing the row, but i am getting the row in bill. why the MSHFlexgrid is not showing the row.help me. thanks in adance.
at present i am doing a project for fast food center. i want to display the billing items in MSHFlexgrid. to do the same i am using the following code.
Private Sub txtquantity_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
If Not IsNumeric(txtquantity.Text) Or txtquantity.Text = "" Then
MsgBox "You must enter a valid Item Quantity", vbInformation, "Indiana stores(Purchase)"
txtquantity.Text = ""
txtquantity.SetFocus
Exit Sub
End If
QUANTITY = Val(txtquantity.Text)
PRICE = CDbl(txtitemprice.Text)
TAX = CDbl(txttax.Text)
DISCOUNT = CDbl(txtdiscount.Text)
GTOTAL = QUANTITY * PRICE
GTOTAL = GTOTAL + (GTOTAL * TAX / 100)
GTOTAL = GTOTAL - (GTOTAL * DISCOUNT / 100)
itemgrid.AddItem TXTBILLNO.Text & vbTab & txtitemname.Text & vbTab & txtitemprice.Text & vbTab & txtquantity.Text & vbTab & txtdiscount.Text & vbTab & txttax.Text & vbTab & GTOTAL & vbTab & cmbpay.Text & vbTab & txtshift.Text & vbTab & txtcashiername.Text & vbTab & cmbitemcode.Text & vbTab & proportion & vbTab & ITEMCATEGORY, 1
CLEAR
cmbitemcode.SetFocus
End If
End Sub
when ever the keypress event is executed one new row is added to the MSHFlexgrid but some times the flexgrid is not showing the row, but i am getting the row in bill. why the MSHFlexgrid is not showing the row.help me. thanks in adance.