M
Miguel Dias Moura
Hello,
I have an Asp.Net 2.0 Grid View on a page.
I created the GridView from my ASPX.VB file, i.e., my VB code.
The GridView has 2 TemplateFields. The first TemplateField has a Label
and the second one has an Image.
After the GridView is created I need, when an action on the page is
taken, to change the GridView:
1. Change Header and Footer (I was able to to this)
2. Rebind the GridView to a dataset with changed data.
To do this I create a new DataTable and a new DataSet and bind it to
the GridView:
...
' Create new DataSet
Dim dsInfo As New DataSet
dsInfo.Tables.Add(dtInfo)
' Bind gvInfo
gvInfo.DataSource = dsInfo
gvInfo.DataBind()
I can see that the GridView gets the rows but they are empty.
In my opinion I need to access the already created label and image in
my TemplateFields and bind them to my DataSet fields.
What do you think?
The problem is I don't know how to access them and bind them to the
DataSet fields.
Can someone help me out with this?
Thank You,
Miguel
I have an Asp.Net 2.0 Grid View on a page.
I created the GridView from my ASPX.VB file, i.e., my VB code.
The GridView has 2 TemplateFields. The first TemplateField has a Label
and the second one has an Image.
After the GridView is created I need, when an action on the page is
taken, to change the GridView:
1. Change Header and Footer (I was able to to this)
2. Rebind the GridView to a dataset with changed data.
To do this I create a new DataTable and a new DataSet and bind it to
the GridView:
...
' Create new DataSet
Dim dsInfo As New DataSet
dsInfo.Tables.Add(dtInfo)
' Bind gvInfo
gvInfo.DataSource = dsInfo
gvInfo.DataBind()
I can see that the GridView gets the rows but they are empty.
In my opinion I need to access the already created label and image in
my TemplateFields and bind them to my DataSet fields.
What do you think?
The problem is I don't know how to access them and bind them to the
DataSet fields.
Can someone help me out with this?
Thank You,
Miguel