Click here to Skip to main content
Rate this: bad
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
Edited 30-Jan-13 16:09pm
AshishChaudha at 30-Jan-13 4:14am
didnt understand your question, please elaborate..
Sheikh Muhammad Haris at 30-Jan-13 22:09pm
Question isn't clear ...
Sheikh Muhammad Haris at 30-Jan-13 22:09pm
You can Edit your question by using Improve Question option
Sergey Alexandrovich Kryukov at 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)

Advertise | Privacy | Mobile
Web02 | 2.8.140709.1 | Last Updated 31 Jan 2013
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid