Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > design-time datagrid template column with findcontrol capability

Reply
Thread Tools

design-time datagrid template column with findcontrol capability

 
 
=?Utf-8?B?Qkc=?=
Guest
Posts: n/a
 
      12-27-2004
i am thinking that creating datagrid at design time will save me a lot of
time when creating programs. however, i ran into a brick wall.

i created a template column at design time. i learned that i have to use
itemplate interface to bind my custom data. within the itemplate column, it
displays my custom data properly everything works. except that i cannot use
the datagridcommandeventargs.item.findcontrol("//asp:label within datagrid")
with a buttoncolumn which i use a lot with runtime datagrid. again, the data
from templatecolumn displays and the buttoncolumn works. the buttoncolumn
reacts but it just can't pickup the data from the datagridcommandeventargs.

i have used a literal control that basically writes the following code
within the iTemplate interface:

literalcontrol.text = "<asp:label id='lbl1'
text='....dataitem...'>...dataitem...</asp:label>";

any ideas on how to achieve findcontrol-like technique to reference the data
within the active row? it doesn't have to be findcontrol as long as i can
get the data within the selected row.

thanks in advance,
bg



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
setting Column width of Template Column in Datagrid.. Charleees ASP .Net 2 06-20-2006 12:52 PM
bind a dropdown in a column in a datagrid based on the dropdown value selected in another column of the datagrid. vishnu ASP .Net 1 03-25-2006 01:24 PM
DataGrid loses view state if first column is a template column. Ken Varn ASP .Net 1 08-19-2005 02:54 PM
how to know if a datagrid column is a template column? Dexter ASP .Net 1 01-18-2005 01:45 PM
Bound Column or Template Column (w dAdapater?) in DataGrid Ravichandran Mahalingam ASP .Net Datagrid Control 0 01-09-2004 03:30 PM



Advertisments