Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New Coder
    Join Date
    Dec 2005
    Posts
    14
    Thanks
    0
    Thanked 0 Times in 0 Posts

    DataGrid & Color

    I want to have a datagrid, and select the color of the fields background color by what is in the database column. For example, in the database table I have a column that is called Color, and I want the color of the row to show up as the background. Is this possible?


  • #2
    New Coder
    Join Date
    Oct 2005
    Posts
    84
    Thanks
    0
    Thanked 0 Times in 0 Posts
    You don't specify type of application u r creating is it web application or window application

    for window application there is tablestyle property in datagrid u can use it like this
    DataGridTableStyle ts=new DataGridTAbleStyle();
    ts.MapplinName="table name by which grid is filled";
    //set the properties of ts
    //after that add it to grid like this
    dataGrid1.TableStyle.Clear();
    dataGrid1.TableStyle.Add(ts);

    hope this will help


  •  

    Posting Permissions

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