Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   ASP .Net Datagrid Control (http://www.velocityreviews.com/forums/f60-asp-net-datagrid-control.html)
-   -   Datagrids Item Templetes not found by compiler (http://www.velocityreviews.com/forums/t760022-datagrids-item-templetes-not-found-by-compiler.html)

Michael Evanchik 12-22-2003 04:10 PM

Datagrids Item Templetes not found by compiler
 


Basically im using a mutltiline textbox in a datagrid since i cant get
text to wrap in a grid. If i refer to the textbox by id in any vb code
the compiler says the object does not exist. If instead i refer to the
value by the datagrid cell im getting a invalid class error from the
same code i have always used to get values from a cell. Here is the
code i am talking about....


This is my datagrid code
---------------------------------
<Columns>
<asp:EditCommandColumn EditText="" UpdateText=""/>
<asp:BoundColumn DataField="id" HeaderText="id" readonly="true" />
etc etc etc
<asp:TemplateColumn>
<ItemTemplate>
<asp:TextBox id="txt_desc_g" Text='<%# DataBinder.Eval(Container,
"dataitem.job_description") %>' Columns="85" TextMode="MultiLine"
rows="18" Runat="server" visible="True" ></asp:TextBox>
</ItemTemplate>
</asp:TemplateColumn>
</Columns>


If this is an a subroutine
--------------------------------
sub test
txt_desc_g.text = ""
end sub

The compiler tells me txt_desc_g.text doest not exist


In turn i use the code that works fine for non template columns...
-----------------------------

txtstr = e.item.cells(2).controls(0)
tempstr = txtstr.text


Im gettin an error invalid cast?


*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!


All times are GMT. The time now is 10:03 AM.

Powered by vBulletin®. Copyright ©2000 - 2013, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.


1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57