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

RadGrid Columns with "NULL" values causing RadGrid Borders to Disappear

2 Answers 171 Views
Grid
This is a migrated thread and some comments may be shown as answers.
John
Top achievements
Rank 1
John asked on 06 Mar 2009, 04:53 PM
I have a radgrid where for some reason the columns that have NULL values are causing the radgrid column borders to disappear.  Here is an image of what is happening:

http://www.flyupload.com/get?fid=289027062

How can I prevent this from happening?

Thanks in advance for the help.

John.

2 Answers, 1 is accepted

Sort by
0
Accepted
Shinu
Top achievements
Rank 2
answered on 09 Mar 2009, 06:06 AM
Hi John,

Try the following code snippet in the PreRender event and see if it helps.

CS:
protected void RadGrid1_PreRender(object sender, EventArgs e) 
    { 
        foreach (GridDataItem item in RadGrid1.MasterTableView.Items) 
        { 
            foreach (GridColumn col in RadGrid1.MasterTableView.RenderColumns) 
            { 
                if (item[col.UniqueName].Text == string.Empty) 
                    item[col.UniqueName].Text = " "
            } 
        } 
        
    } 

Thanks
Shinu
0
John
Top achievements
Rank 1
answered on 09 Mar 2009, 04:55 PM
Shinu,

Thanks for you help on getting this resolved.

Thanks,
John.
Tags
Grid
Asked by
John
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
John
Top achievements
Rank 1
Share this question
or