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

GridLine disappear when a cell is empty

3 Answers 48 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Rakesh
Top achievements
Rank 1
Rakesh asked on 14 Nov 2008, 02:09 PM
<telerik:RadGrid ID="RadGrid1" runat="server" AllowFilteringByColumn="True" 
                        AllowSorting="True"   
                        AllowPaging="true"   
                        ShowFooter="true"   
                        DataSourceID="SqlDataSource1"   
                        PageSize="100"   
                        Skin="Web20"   
                        Width="50%"   
                        OnItemCommand="RadGrid1_ItemCommand"   
                        AllowMultiRowSelection="True"   
                        AutoGenerateColumns="False"   
                        VirtualItemCount="10000"   
                        OnSelectedIndexChanged="RadGrid1_SelectedIndexChanged">  
                        <ClientSettings> 
                            <Scrolling AllowScroll="True" EnableVirtualScrollPaging="True" UseStaticHeaders="True">  
                             </Scrolling> 
                             <ClientEvents OnScroll="HandleScrolling" /> 
                             <Selecting AllowRowSelect="true" /> 
                        </ClientSettings> 
                        <SortingSettings SortedBackColor="BurlyWood" /> 
                        <MasterTableView AllowNaturalSort="False" AllowSorting="False" DataKeyNames="Patient_id" DataSourceID="SqlDataSource1" > 
                            <RowIndicatorColumn> 
                                <HeaderStyle Width="20px" /> 
                            </RowIndicatorColumn> 
                            <ExpandCollapseColumn> 
                                <HeaderStyle Width="20px" /> 
                            </ExpandCollapseColumn> 
                            <Columns>                                  
                                <telerik:GridBoundColumn DataField="ID" DataType="System.Int32" EmptyDataText="&amp;nbsp;" 
                                    HeaderText="ID" ReadOnly="True" SortExpression="ID" UniqueName="ID">  
                                </telerik:GridBoundColumn> 
                                <telerik:GridBoundColumn DataField="Name" EmptyDataText="&amp;nbsp;" HeaderText="Name" 
                                    SortExpression="Name" UniqueName="Name">  
                                </telerik:GridBoundColumn>                                  
                            </Columns> 
                        </MasterTableView> 
                        <HeaderStyle Width="200px" /> 
                        <PagerStyle Mode="Slider" /> 
                        <SelectedItemStyle BackColor="#FFC0C0" /> 
                        <FilterMenu EnableTheming="True" Skin="Vista">  
                            <CollapseAnimation Duration="200" Type="OutQuint" /> 
                        </FilterMenu> 
                    </telerik:RadGrid> 
Hi,
    My cells are coming blank when there is no value defined in the database or when they are null.

3 Answers, 1 is accepted

Sort by
0
Daniel
Telerik team
answered on 18 Nov 2008, 09:18 AM
Hello Rakesh,

I tried to reproduce the mentioned behavior but unfortunately without avail. Please test the attached sample project (with DB) and let me know whether you experience the same issues. The example is based on the code you shared.

Regards,
Daniel
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
RAkesh
Top achievements
Rank 1
answered on 18 Nov 2008, 09:37 AM
Hi,
    There's no problem with the Grid since during export from legacy systems some columns were padded with spaces due to char field. This can be considered closed. But, please try to resolve other two places where I need your help, since without that it will be difficult for me to concinve my company to buy telerik.


Regards,

Rakesh S
0
Daniel
Telerik team
answered on 18 Nov 2008, 01:47 PM
Hello RAkesh,

Quick update on the subject:

In order to prevent a missing borders in GridTemplateColumn you can try the following approach:
<telerik:GridTemplateColumn UniqueName="myTemplateColumn"
    <ItemTemplate> 
       &nbsp; 
       <asp:Label ID="Label1" runat="server"... 

Regarding the other questions: Please notice that I answered in one of the mentioned threads.

Regards,
Daniel
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Tags
Grid
Asked by
Rakesh
Top achievements
Rank 1
Answers by
Daniel
Telerik team
RAkesh
Top achievements
Rank 1
Share this question
or