473,387 Members | 1,516 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

GridView Row Styling

I have a GridView that I use for bulk editing. I override the CreateRow
method and logically OR each row's state with DataControlRowState.Edit.
Doing this, however, means that each row is rendered using the
EditRowStyle, which is undesirable in my situation. I would like to
preserve the RowStyle and AlternatingRowStyle rendering.

I have tried to override the InitializeRow method and assign the rows
style to the GridViews RowStyle or AlternatingRowStyle, depending on
the row's DataItemIndex, however, the row doesn't have an accesser to
set the TableRowStyle, only it's css class or style collection. Further
the style collection can't be set which makes things difficult. Any
advice on how to cleanly set a rows style

Jun 15 '06 #1
0 932

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: Peter Collinson | last post by:
Hi... Is there any way to style a List Item a different color and size than the <LI> in an Ordered List? I'd like a red super-script number and a dark blue text in a page's footnotes. And...
1
by: | last post by:
I'm wondering if it's possible, outside of the declaration of an ASP.NET 2.0 GridView, to programmatically style individual columns. For example, I might want to make the text in a particular...
6
by: Tim Cartwright | last post by:
I am trying to figure out how to change the gridview caption style, but I can not figure out how. I added table caption { background-color: #5D7B9D; color: White; font-size: 16pt; } to my...
6
by: Nalaka | last post by:
Hi, I have a gridView (grid1), which as a templateColumn. In the template column, I have put in a gridView (grid2) and a ObjectDataSource (objectDataSource2). Question is... How to I pass the...
0
by: peter.moss | last post by:
Right, I thought the idiots at MS had sorted this one out in 2.0 but alas - no such bloomin' luck. If I reset the style on my GridView control and just give it a CssClass (trying to be all nice,...
3
by: Momomo | last post by:
Hi, I am having a problem with a control which is caused by a style on the page which I am not able to trace. If I use the control in a page without any styling it looks ok. Is there a way to...
2
by: Jason | last post by:
Hi all, I hope this doesn't sound like a lame question, but I want to override Gridview.Render so I can strip out ALL styling elements and use CSS for my styling. I am pretty sure I can figure it...
40
by: Jukka K. Korpela | last post by:
My basic style sheet has a distinctive background and border for forms, to make the structure clearer and to make it visually evident what belongs to a form. However, as people complained that...
3
by: Peter | last post by:
I have a GridView which is populated by List<ofObjects> Does anyone have example of how to sort the columns of this GridView? I have found examples without DataSourceControl but these use...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.