Home All Groups Group Topic Archive Search About

Changing text to a textbox control in row 5 of a datagrid

Author
7 Mar 2005 7:11 PM
William Pulling via .NET 247
I have a 13 x 13 datagrid that stores values.  The user will be allowed to edit only 1 row of the datagrid depending on the month of the year.  I want to be able to set the contents of each cell in row 5 to be a textbox and none of the cells in any other row to be a textbox to help direct the user in where to enter values.

I assumed that I can't do this on the aspx side because I don't want this to apply to an entier column.  I am able to control background color and other attributes in the .vb side using e.Item.Cells(1).Attributes.Add("style","background-color: #D3D3D3;").  Is there a way to solve this problem?

--------------------------------
From: William Pulling

-----------------------
Posted by a user from .NET 247 (http://www.dotnet247.com/)

<Id>7/j1m8mV2kKIwRZrYBfOrA==</Id>

Author
14 Mar 2005 4:14 PM
Yusuf
dim txt as textbox
txt=datagrid1.item(0).controls(2)
txt.text=xxxxxx
"William Pulling via .NET 247" <anonym***@dotnet247.com>, haber iletisinde
sunlari yazdi:encB4l0IFHA.2***@TK2MSFTNGP14.phx.gbl...
I have a 13 x 13 datagrid that stores values.  The user will be allowed to
edit only 1 row of the datagrid depending on the month of the year.  I want
to be able to set the contents of each cell in row 5 to be a textbox and
none of the cells in any other row to be a textbox to help direct the user
in where to enter values.

I assumed that I can't do this on the aspx side because I don't want this to
apply to an entier column.  I am able to control background color and other
attributes in the .vb side using
e.Item.Cells(1).Attributes.Add("style","background-color: #D3D3D3;").  Is
there a way to solve this problem?

--------------------------------
From: William Pulling

-----------------------
Posted by a user from .NET 247 (http://www.dotnet247.com/)

<Id>7/j1m8mV2kKIwRZrYBfOrA==</Id>