Hi,
I am calculating discount at text changed event when user enters the discount%. To edit when i load the data from table using dataset i do not get the correct data as it is in the database. For ex if quantity is saved as 5000.00 in table and when i try to fetch it.. I am getting it as 500000. Instead of 5000.00. Is it because of text changed event? How do i resolve this?
I think you should query and check what values are stored in table.
Textchanged event cannot tamper values hence you are storing values incorrectly
I have checked it many times. It is getting saved as decimal. While fetching from table i use dataset ,i load data in the dataset and then assign it to textbox. The decimal value in the table i convert it to string and then assign to textbox
It is getting converted in dataset. Change the column type of dataset to decimal by default it is string
Sorry, i did not get what u r saying..This is the code
txtqty.Text = DS.Tables[0].Rows[0]["Quantity"].ToString();
yes using Quick watch check the value of the following line
DS.Tables[0].Rows[0]["Quantity"]
"Quantity"
]
© COPYRIGHT 2024 ASPSnippets.com ALL RIGHTS RESERVED.