hey can ne1 tell me how to color the corner of a cell in the datagridview
13 1699
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: ryjfgjl |
last post by:
ExcelToDatabase: batch import excel into database automatically...
|
by: Vimpel783 |
last post by:
Hello!
Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
|
by: ArrayDB |
last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
|
by: PapaRatzi |
last post by:
Hello,
I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
|
by: CloudSolutions |
last post by:
Introduction:
For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
|
by: Defcon1945 |
last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
|
by: af34tf |
last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
|
by: Faith0G |
last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome former...
| |