Results 1 to 3 of 3

Thread: Modify the blush of the boxes in a datagrid

  1. #1
    WalkerCook is offline Senior Member
    Join Date
    Dec 2009
    Posts
    253
    Rep Power
    3

    Default Modify the blush of the boxes in a datagrid

    I am doing project in ASP.net. I want to Change the color of the boxes in a datagrid. I have tried various method none of then worked out, if you are having knowledge about it, and then please give me that.

  2. #2
    PerezMorris is offline Senior Member
    Join Date
    Dec 2009
    Posts
    250
    Rep Power
    3

    Default

    You should check the code below and then by making use of the similar event you will able to get the solution for your issue.

    Code:
    CheckBox CBox;
    CBox = (CheckBox)(e.Item.Cells[2].Controls[0]);
    if (CBox.Checked == true) e.Item.BackColor = Color.Red;

  3. #3
    HallMiller is offline Senior Member
    Join Date
    Dec 2009
    Posts
    251
    Rep Power
    3

    Default

    Try to understand following code given below which is solve your problem. In the following code I have use DataGridComboBoxColumn to perform this.

    Code:
    DataGridComboBoxColumn column =
    (DataGridComboBoxColumn) DataG.TableStyles[0].GridColumnStyles[4];
    column.combo.BackColor = Color.White;
    column.combo.ForeColor = Color.Green;

Similar Threads

  1. Replies: 0
    Last Post: 08-13-2010, 05:39 PM
  2. Update datagrid
    By BarnesHarris in forum Programming
    Replies: 2
    Last Post: 07-10-2010, 01:14 PM
  3. new column in datagrid
    By MartinWilson in forum Programming
    Replies: 1
    Last Post: 02-17-2010, 05:37 PM
  4. DataGrid with Fixed legend & scroll in ASP.NET
    By MyersGray in forum Programming
    Replies: 2
    Last Post: 02-10-2010, 05:44 PM
  5. VIBlend DataGrid for Silverlight
    By SmithJohnson in forum Operating System
    Replies: 1
    Last Post: 01-29-2010, 05:51 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
SEO by SubmitEdge

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48