ASP.NET: my GridView control only partially fills itself .... (??)

Markup

<asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False">
   <Columns>
      <asp:BoundField DataField="insured_first_name" HeaderText="First Name" />
      <asp:BoundField DataField="insured_first_name" HeaderText="Middle Name" />
      <asp:BoundField DataField="insured_last_name" HeaderText="Last Name" />
   </Columns>
</asp:GridView>

the code

GridView1.DataSource = _dataSet
DataBind()

Whenever my GridView fills, if there is no value to return from mine _dataSetfor the field, my GridView will stop filling after that. Should not skip this and continue filling the rest of the grid? GridView does not seem to accept a null / null value. Any work for this?

+3
source share
2 answers

A null value raises a dataerror-related event that fires from your gridview.

You must sterilize null values ​​before adding them as a data source for your gridview.

: http://msdn.microsoft.com/en-us/library/ms366709.aspx .

+3

NULL. , SQL- ; . SQL Server Management Studio, , .

GridView NULL. . NULL SQL. NULL , . , 1 0, NULL , , .

,

+2

Source: https://habr.com/ru/post/1766841/


All Articles