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

Edit Row odd render using Hay skin

3 Answers 37 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Jes
Top achievements
Rank 1
Jes asked on 14 Feb 2009, 04:49 AM
I'm using the Hay skin on a RadGrid.  When I click Edit on one of the rows, for each column that does not have a value, it appears that something is covering up the top and bottom borders for the row being edited.  This does not happen in firefox, just IE7.  I have played around with the CSS for .GridEditRow_Hay, adjusted the padding and such, but nothing fixes it.  Any suggestions?

3 Answers, 1 is accepted

Sort by
0
Princy
Top achievements
Rank 2
answered on 16 Feb 2009, 06:21 AM
Hello Jes,

Try adding the following code to the PreRender event of the grid, inorder to avoid border issues with empty cells:

cs:
protected void RadGrid1_PreRender(object sender, EventArgs e)  
    {  
        foreach (GridDataItem dataItem in RadGrid1.Items)  
        {  
            foreach (GridColumn col in RadGrid1.Columns)  
            {  
                if (dataItem[col.UniqueName].Text == string.Empty)  
                    dataItem[col.UniqueName].Text += "&nbsp";    
   
            }  
        }  
    }  

Thanks
Princy.
0
Jes
Top achievements
Rank 1
answered on 16 Feb 2009, 03:53 PM
Thanks for the response.  The solution works for GridBoundColumns, but we're using TemplateColumns, and using the code provided clears out the values of the TemplateColumns.  Is there a way to make this work with a TemplateColumn?
0
Shinu
Top achievements
Rank 2
answered on 17 Feb 2009, 04:54 AM
Hi Jes,

Try the following approach and see if it works.

CS:
 protected void RadGrid1_PreRender(object sender, EventArgs e) 
    { 
        foreach (GridDataItem dataItem in RadGrid1.Items) 
        { 
            foreach (GridColumn col in RadGrid1.Columns) 
            { 
                if (col.ColumnType!="GridTemplateColumn"
                { 
                    if (dataItem[col.UniqueName].Text == string.Empty) 
                        dataItem[col.UniqueName].Text += "&nbsp"
                } 
 
            } 
        }   
        
    } 


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