This is a migrated thread and some comments may be shown as answers.

buy basket with grid

1 Answer 40 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Farshad heidary
Top achievements
Rank 1
Farshad heidary asked on 11 May 2010, 09:28 AM
hi guys

i have grid view.
pic : http://www.freeuploadimages.org/images/30brjuf9vbd7larfzalc.jpg

i need udpate buy basket(count textbox) when user click in Refresh button.

how i can implement that?

tnx

1 Answer, 1 is accepted

Sort by
0
Princy
Top achievements
Rank 2
answered on 11 May 2010, 12:02 PM
Hello Farshad

You can try the following code snippet in order to reset the textbox value on clicking a button.

C#:
 
    protected void Button1_Click(object sender, EventArgs e) 
    { 
        foreach (GridDataItem item in RadGrid1.MasterTableView.Items) 
        { 
            TextBox tetxtBox1 = (TextBox)item.FindControl("TextBox1"); 
            tetxtBox1.Text = "0"
        } 
    } 

The aspx is shown below:
 
<telerik:GridTemplateColumn> 
    <ItemTemplate> 
        <asp:TextBox ID="TextBox1" runat="server"></asp:TextBox> 
    </ItemTemplate> 
</telerik:GridTemplateColumn> 


Thanks,
Princy.
Tags
Grid
Asked by
Farshad heidary
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 2
Share this question
or