Obout grid coming empty

1k Views Asked by At

I have a obout grid in which right now i have included only one column.When I set the datasource and data bind it the grid shows as empty at runtime.I was doing it with the normal gridview(asp) earlier and it was working fine.I replaced the normal gridview with the obout - now its coming as empty.

<obout:Grid ID="gvReport" runat="server" Serialize="false" ShowTotalNumberOfPages="false" AllowPaging="true"
        ShowLoadingMessage="false" FolderStyle="~/styles/premiere_blue" AllowPageSizeSelection="false" EnableRecordHover="true"
        AllowGrouping="false" AutoGenerateColumns="false" AllowFiltering="false" FilterType="ProgrammaticOnly"
        AllowAddingRecords="false" AllowColumnReordering="false" AllowRecordSelection="true" AllowMultiRecordSelection="true" ShowRecordsPerPage="false" AllowColumnResizing="true"  ShowColumnsFooter="false" ShowHeader="true" ShowFooter="true" AllowSorting="true" GenerateRecordIds="True" ViewStateMode="Inherit" KeepSelectedRecords="true" CallbackMode="false" 
        EmbedFilterInSortExpression="true" Width="100%" PageSize="10" OnRowDataBound="GridView_RowDataBound" OnDataBound="GridView_DataBound" OnDataSourceNeeded="GridDataSourceNeededEvent">
        <ScrollingSettings ScrollHeight="260" EnableVirtualScrolling="true" UsePagingForVirtualScrolling="true"   /><Columns>
            <obout:Column ID="colName" DataField="Name" Width="200px" Wrap="true" HeaderText="Content Name"  
                            ShowFilterCriterias="false">
                <TemplateSettings FilterTemplateId="tplNameFilter" />
                <FilterOptions>
                <obout:FilterOption IsDefault="true" Type="Contains" />
                </FilterOptions>
            </obout:Column>
        </Columns>
        <Templates>
            <obout:GridTemplate runat="server" ID="tplNameFilter" ControlID="NameFilter">
            <Template>
                <obout:OboutTextBox runat="server" ID="NameFilter" Width="100%">                                            
                </obout:OboutTextBox>
            </Template>
            </obout:GridTemplate>

        </Templates>
        <TemplateSettings HeadingTemplateId="tplHeading" />       
        <PagingSettings PageSizeSelectorPosition="Bottom" Position="Bottom" ShowRecordsCount="True"  />
        <FilteringSettings InitialState="Hidden" FilterPosition="Top" FilterLinksPosition="Top" />                        
    </obout:Grid>

Code:

gvReport.DataSource = reportData;
gvReport.DataBind();

While debugging the table has all the values but they are not getting assigned to the grid.Previously in place of obout I had normal gridview and it was working fine.

1

There are 1 best solutions below

0
On

You must remove OnDataSourceNeeded="GridDataSourceNeededEvent" you can't have an OnDataSourceNeeded event togheter with gvReport.DataSource