This is a migrated thread and some comments may be shown as answers.

[Solved] Grid Appearance...

2 Answers 136 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Mark
Top achievements
Rank 1
Mark asked on 25 Apr 2008, 10:27 AM
Hi,
Few questions here!... (VB)
I have a grid that is used to display tasks. These tasks have a date/time that may or may not be 'overdue' (past current time)..
What i would like to do is..
1) Show rows with red background colour for overdue rows
2) Not have a 'description' column, but show the description as tooltip when hover over row
3) auto-size the columns to column content

Are these possible ? (i'm sure they are, just need help !)

Also, i have used (below), but how do i change the column header etc.. I seem to have 0 columns in collection

Many Thanks In Advance
Mark

Protected Sub grdTasks_NeedDataSource(ByVal source As Object, ByVal e As GridNeedDataSourceEventArgs) Handles grdTasks.NeedDataSource

grdTasks.DataSource = GetDataTable(query)

End Sub

2 Answers, 1 is accepted

Sort by
0
Princy
Top achievements
Rank 2
answered on 25 Apr 2008, 10:43 AM
Hi Mark,

Try setting the HeaderText for a GridColumn using the ColumnUniqueName property as shown below.

CS:
 protected void RadGrid1_ItemDataBound(object sender, GridItemEventArgs e)  
    {  
        if (e.Item is GridHeaderItem)  
        {  
            GridHeaderItem header = (GridHeaderItem)e.Item;  
            header["Name"].Text = "CustomHeader";  
        }  
   } 


ASPX:
<rad:GridBoundColumn DataField="Name"   UniqueName="Name" HeaderText="Name" ></rad:GridBoundColumn> 


Go through the following help document links.

Customizing row appearance
Adding tooltips for grid items

Thanks
Princy.
0
Mark
Top achievements
Rank 1
answered on 25 Apr 2008, 11:04 AM
Hi,
Superb... Thanks
Mark
Tags
Grid
Asked by
Mark
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 2
Mark
Top achievements
Rank 1
Share this question
or