Click here to Skip to main content
13,453,939 members (42,747 online)
Rate this:
Please Sign up or sign in to vote.
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.....
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 29-Jan-13 21:30pm
Updated 30-Jan-13 16:09pm
AshishChaudha 30-Jan-13 4:14am
didnt understand your question, please elaborate..
Sheikh Muhammad Haris 30-Jan-13 22:09pm
Question isn't clear ...
Sheikh Muhammad Haris 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"?

1 solution

Rate this: bad
Please Sign up or sign in to vote.

Solution 1


Example retrieving from OnRowDataBound event...

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.


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

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy |
Web03 | 2.8.180321.1 | Last Updated 31 Jan 2013
Copyright © CodeProject, 1999-2018
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100