how do I total a datagrid column using a template column and html textox
Posted on 2004-09-04
Please help with a asp.net/vb.net answer. I have a datagrid that on page load the dataset is loaded. I have added a textbox(html) inside of the templateColumn/itemTemplate. It will load every amount due but I need to capture a total of it in a textbox else where on the page. I have never done this before and the only answers that I am find on the web are either c# or written for those that are dynamically filling data to the datagrid.
Is there a solution for this if your datagrid is load directly with the dataset, so I can call that column or the textbox and do a count?
Here is a snippet of the test code:
Me.dgTest.DataSource = MyDS.Tables(0)
Me.txtSum.Text = Me.dgTest.Columns(3).Count.ToString