Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Datagrid Attributes

Status
Not open for further replies.

kvang

Programmer
Oct 7, 2005
129
US
I have a dynamic datagrid where at ItemDataBound event I need to change align attributes asssigned before runtime. I'm using this code and it doesn't work:
Code:
e.Item.Cells(4).Attributes.Remove("align")
e.Item.Cells(4).Attributes.Add("align", "right")
 
Try setting a CssClass or an inline style as the align attributes have been depreciated. Also, have a look at the HTML that is sent to the browser and see what is being written out to the page.


-------------------------------------------------------

Mark,
[URL unfurl="true"]http://aspnetlibrary.com[/url]
[URL unfurl="true"]http://mdssolutions.co.uk[/url] - Delivering professional ASP.NET solutions
[URL unfurl="true"]http://weblogs.asp.net/marksmith[/url]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top