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

RadGrid not showing headers and "no records" text

1 Answer 237 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Mark
Top achievements
Rank 1
Mark asked on 04 Aug 2014, 08:42 PM
I am using a RadGrid with a DataSourceID that of a stored procedure.  When the stored procedure returns no rows, the grid is not showing up with the no records text and no headers.  However, when I removed the configuration DataSourceID="SqlDataSource10", the headers and no records text shows up as expected. I can't seem to get this to work so any help would be appreciated.

<telerik:RadGrid ID="rgExternalSensors" HeaderStyle-BorderStyle="None" HeaderStyle-BackColor="WhiteSmoke"
    GridLines="None" DataSourceID="SqlDataSource10" AllowSorting="False" OnItemCreated="rgExternalSensors_ItemCreated"
    OnItemDataBound="rgExternalSensors_ItemDataBound" PageSize="5" AllowPaging="True" AutoGenerateColumns="False" runat="server"
    OnDeleteCommand="rgExternalSensors_DeleteCommand" OnInsertCommand="rgExternalSensors_InsertCommand"
    OnUpdateCommand="rgExternalSensors_UpdateCommand">                           
    <PagerStyle Mode="NextPrevAndNumeric" PageSizeControlType="None"></PagerStyle>
    <MasterTableView Width="100%" EditMode="InPlace" CommandItemDisplay="Top" AutoGenerateColumns="false"
        InsertItemDisplay="Bottom" InsertItemPageIndexAction="ShowItemOnLastPage">
        <Columns>
            <telerik:GridEditCommandColumn>
            </telerik:GridEditCommandColumn>
           <%-- <telerik:GridBoundColumn DataField="sensor_type_desc" UniqueName="SensorType" HeaderText="Type">
            </telerik:GridBoundColumn>--%>
            <telerik:GridDropDownColumn DataField="sensor_type_desc" UniqueName="ddlSensorType"
                DataSourceID="SqlDataSource11" ListTextField="sensor_type_desc" ListValueField="sensor_type_serial_num" HeaderText="Type">                                   
            </telerik:GridDropDownColumn>
            <telerik:GridBoundColumn DataField="sensor_make_and_model" UniqueName="SensorMake" HeaderText="Make and Model"
                MaxLength="50">
            </telerik:GridBoundColumn>
            <telerik:GridBoundColumn DataField="sensor_serial_num" UniqueName="SensorSerial"
                HeaderText="Serial Number" MaxLength="50">
            </telerik:GridBoundColumn>
            <telerik:GridBoundColumn DataField="sensor_location" UniqueName="SensorLoc" HeaderText="Location"
                MaxLength="50">
            </telerik:GridBoundColumn>
            <telerik:GridBoundColumn DataField="external_sensors_serial_num" UniqueName="SerialNum" HeaderText="SerialNum" Display="false">
            </telerik:GridBoundColumn>
            <telerik:GridBoundColumn DataField="sensor_type_serial_num" UniqueName="TypeSerialNum" HeaderText="TypeSerialNum" Display="false">
            </telerik:GridBoundColumn>
            <telerik:GridButtonColumn CommandName="Delete" Text="Delete" UniqueName="DeleteColumn">
            </telerik:GridButtonColumn>
        </Columns>
        <CommandItemSettings AddNewRecordText="Add New" RefreshText="Refresh"></CommandItemSettings>
    </MasterTableView>
    <ClientSettings>
        <ClientEvents OnRowDblClick="RowDblClick"></ClientEvents>
    </ClientSettings>
</telerik:RadGrid>

1 Answer, 1 is accepted

Sort by
0
Mark
Top achievements
Rank 1
answered on 04 Aug 2014, 10:33 PM
After an entire day of looking into this I finally found the issue. It was a bug in our store procedure. This is resolved.
Tags
Grid
Asked by
Mark
Top achievements
Rank 1
Answers by
Mark
Top achievements
Rank 1
Share this question
or