hey can ne1 tell me how to color the corner of a cell in the datagridview
13 1701
Sounds like a job for CSS?
@kenobewan
Well, a DataGridView is a Forms control, not a web control, so I don't think CSS will work...
It sounds like something for OwnerDraw, which can get nasty with an object that complex I would think
PRR 750
Expert 512MB @Smish DataGrid.OnItemDataBound Method (System.Web.UI.WebControls)
Check this ... you could change the cell[index] color in this ...
Sample Gridview function -
protected void g1_RowDataBound(object sender, GridViewRowEventArgs e)
-
{
-
if (e.Row.RowType == DataControlRowType.DataRow)
-
{
-
-
if (e.Row.Cells[1].Text == "DDD")
-
{
-
e.Row.Cells[1].BackColor = System.Drawing.Color.Black;
-
e.Row.Cells[1].Enabled = false;
-
}
-
-
}
-
}
-
corner ? well i guess i got it wrong here.. Moderator please delete my post as its irrelevant..
Correct me if I am wrong, but the OP talked about coloring the corner of a cell and not the whole cell. One way to do this would be to apply a background image through CSS. Perhaps we need the amount/ shape of the coloring defined to be sure.
Did we forget we are talking about a windows form control, not a web control again?
At any rate we might until the OP actually gets back to us.
@Plater
Not sure how you ascertained that it was a windows form control from OP, although InsertAlias implied it was.
Smish - please reply to your post urgently, your experts need you!
@kenobewan
The DataGridView object is a windows forms only object.
The DataGrid was in .net1.x and was used in both windows form and web application (but was a very poor object)
The GridView object is for web applications
Hey guys ...
sorry for the delay in replying....and thanx for the response..
I want it for Windows object datagridview control.if i get to know how do we color the corner of a cell.Like suppose i want to show there are two or more indication to be given to the cell.so i was thinking ill start from lower right corner.for 1st indication ill color red,the next line ill color blue and so on..
hope its clear now..thanx
Thanks for clearing that up. Now all you need to do is follow the advice of those who correctly assumed you were using a windows datagridview :).
But i dont want an css to be aplied it would be cumbersome..is ther any way to paint the points in the cell by specifyign a region??
And those above who agreed that CSS was not the solution were correct...
Sign in to post your reply or Sign up for a free account.
Similar topics
by: rzed |
last post by:
I'm using PIL to generate some images which may be rotated at the
user's option. When they are rotated, the original image is cropped
in the new image (which is fine), and the corners are black...
|
by: Mad Scientist Jr |
last post by:
Can someone post a clear example of how to change the background color
of an individual datagrid cell for a Windows desktop app? (preferably
in vb.net)
I found some code on how to do this when...
|
by: Karl |
last post by:
Hi there,
I have a problem needs help.
In a winform, I have a datagrid.
In Mouse move event, I can get coodinates of Mouse. I want to decide which
datagridcell my mouse is on. Can anybody...
|
by: qwu2008 |
last post by:
All,
I wanted to create a browser helper object that has a clickable
icon at the right corner of the browser (similar to the Google notebook
icon at the right corner of the browser). When the user...
|
by: laredotornado |
last post by:
Hi,
I was recently exploring JQuery and the rounded corner plugin -http://
methvin.com/jquery/jq-corner-demo.html, unfortunately, this plug-in
seems to only apply to rounding corners in the...
|
by: igpig |
last post by:
Sorry if this has been asked before. I've searched the group and the
FAQ and didn't find the answer.
How can I retrieve x, y coordinates of the browser top left corner in
Internet Explorer?
...
|
by: =?Utf-8?B?UmljaA==?= |
last post by:
In a datagridview, the first column header cell is columnHeader(0), which is
immediately to the right of the Top Left Corner Select All cell. And the
first RowHeader cell is RowHeaderCell(0) which...
|
by: Andre Majorel |
last post by:
How do you align an <imgagainst the bottom-right corner of an
enclosing block so that the text in the block flows around it ?
<!-- Block begins here -->
<p>
En ce qui concerne la conjoncture...
|
by: Simon van Beek |
last post by:
Dear reader,
By opening an application I get always the main Access window with the
closing cross in the above right corner. Is there a possibility to make
this closing cross invisible?
...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
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...
|
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
|
by: BarryA |
last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
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...
|
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...
|
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,...
|
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...
| |