SteveoAtilla
Regular
Hello!
I know there is a thread with information similar to this, but I want to be specific about the issue I am working on....
I have a datagrid with one Button Column, three Data Columns, and One Template Column containing a TextBox.
The Button Column has a button called UpdateQty, which, when clicked, will take the value the user types in the TextBox and update the SQL database that is bound to the datagrid with that value. I know I could use an editable datagrid, but I have the Stored Procedure which will, when the user enters "0" for the new value, actually delete the record.
I also have validation on the Button Click which verifies that first, there is something in the textbox, and further that it is numeric. What I need to do is, when the text in the box is not numeric, clear the TextBox. I can throw an error, but the box does not empty.
What command can be used to set the value of a Template TextBox? I know how to get the value:
How can you put a value (blank, in my case) in that box?
Thanks,
Kahuna
I know there is a thread with information similar to this, but I want to be specific about the issue I am working on....
I have a datagrid with one Button Column, three Data Columns, and One Template Column containing a TextBox.
The Button Column has a button called UpdateQty, which, when clicked, will take the value the user types in the TextBox and update the SQL database that is bound to the datagrid with that value. I know I could use an editable datagrid, but I have the Stored Procedure which will, when the user enters "0" for the new value, actually delete the record.
I also have validation on the Button Click which verifies that first, there is something in the textbox, and further that it is numeric. What I need to do is, when the text in the box is not numeric, clear the TextBox. I can throw an error, but the box does not empty.
What command can be used to set the value of a Template TextBox? I know how to get the value:
Visual Basic:
[size=2][color=#0000ff]CType[/color][/size][size=2](e.Item.Cells(5).FindControl("txtQty"), TextBox)
[/size]
How can you put a value (blank, in my case) in that box?
Thanks,
Kahuna