Click here to Skip to main content
15,886,199 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Hello sir,
I am making gridview with using templatefield and Boundfield. Before loading all data I am getting boundfield proper way but not get data from templatefield how to do this.....
VB
Dim columnmove As DataControlField
columnmove = dgPackets.Columns(1)

this one give all properdata for boundfield but templatefield doesn't work proper way.


code blocks added by Haris
Posted
Updated 30-Jan-13 16:09pm
v2
Comments
AshishChaudha 30-Jan-13 4:14am    
didnt understand your question, please elaborate..
[no name] 30-Jan-13 22:09pm    
Question isn't clear ...
[no name] 30-Jan-13 22:09pm    
You can Edit your question by using Improve Question option
Sergey Alexandrovich Kryukov 30-Jan-13 22:38pm    
What is "as dynamic"? Do you think anything is "static"?
—SA

1 solution

Hi,

Example retrieving from OnRowDataBound event...

VB
Dim data As DataRowView = DirectCast(e.Row.DataItem, DataRowView)
Dim imgStatus As Image = DirectCast(e.Row.FindControl("gvStatusItem"), Image)
If e.Row.RowType = DataControlRowType.DataRow Then
   ' Your code here
   Dim columnmove As String
   columnmove = dgPackets.Columns("Your column field name")

   
End If

Do not forget to vote if could help, the highest vote is 5.

Regards,
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900