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 [url]http://www.developersdex.com[/url] ***
Don't just participate in USENET...get rewarded for it!