J
jcriv
Hi,
I have a datagrid on a webform and I also have an OK Button. I designed the
datagrid in Visual Studio. The dg has 3 'databound' coulmns and 3 template
columns. I used the drop down tool 'Edit Template' to 'Item Template' to a
TextBox with an initial text value.
When I run the program I bind the grid to a dataset which has 3 columns.
The grid displays just fine. My first three columns have the data from my
dataset and the last three columns have my initial text value in the text
boxes.
What I want to do is to let a user tab thru the template textboxes and make
entries and when done press the OK button on the form. I then want to
retieve the values the user entered in the template textboxes.
In my 'code behind' I have code the looks like
For i = 0 to dsMyDataSet.Tables(0).Rows.Count - 1
strText = dgMyGrid.Items(i).Cells(3).Text
Next
But, the text values I get in all cases is "" (blank). I don't get whet
the user types in nor do I get my initial default value. Note: For Cells
(0,1,2) I do get back the databound values. Cells(3) would be the first
'Template' cell.
Any idea what I might be doing wrong here?
Thanks
I have a datagrid on a webform and I also have an OK Button. I designed the
datagrid in Visual Studio. The dg has 3 'databound' coulmns and 3 template
columns. I used the drop down tool 'Edit Template' to 'Item Template' to a
TextBox with an initial text value.
When I run the program I bind the grid to a dataset which has 3 columns.
The grid displays just fine. My first three columns have the data from my
dataset and the last three columns have my initial text value in the text
boxes.
What I want to do is to let a user tab thru the template textboxes and make
entries and when done press the OK button on the form. I then want to
retieve the values the user entered in the template textboxes.
In my 'code behind' I have code the looks like
For i = 0 to dsMyDataSet.Tables(0).Rows.Count - 1
strText = dgMyGrid.Items(i).Cells(3).Text
Next
But, the text values I get in all cases is "" (blank). I don't get whet
the user types in nor do I get my initial default value. Note: For Cells
(0,1,2) I do get back the databound values. Cells(3) would be the first
'Template' cell.
Any idea what I might be doing wrong here?
Thanks