DataGrid With NULL Data

Results 1 to 2 of 2

Thread: DataGrid With NULL Data

  1. #1
    Join Date
    Dec 1969

    Default DataGrid With NULL Data

    Hello All:<BR><BR>I am using Data Grid in my VB ASP.NET Application for some of the conditions<BR>passed to the Data Grid,<BR>there is no data in the results. So when this condition occurs I am calling<BR>a seprate Grid Is there a<BR>more efficent way so that I can use just one grid for more compact code.<BR><BR>A Example or Link much apreciated<BR><BR>Thanks<BR>Stuart<BR><BR> If oDataTab.Rows.Count = 0 Then<BR> NoDataTabCategory.Visible = True<BR> odatarow = oDataTab.NewRow()<BR><BR> odatarow(1) = "No Categories Configured"<BR> oDataTab.Rows.Add(odatarow)<BR> NoDataGridCategory.DataSource = oDataTab.DefaultView<BR> NoDataGridCategory.DataBind()<BR> NoDataGridCategory.GridLines = GridLines.None<BR> NoDataGridCategory.BorderStyle = BorderStyle.Groove<BR> DataGridCategory.Visible = False<BR> Else<BR> NoDataTabCategory.Visible = False<BR> DataGridCategory.Visible = True<BR> DataGridCategory.DataSource = oDataSet<BR> DataGridCategory.DataBind()<BR> End If<BR><BR><BR>Stuart Shay<BR>

  2. #2
    Join Date
    Dec 1969

    Default RE: DataGrid With NULL Data

    First of all... u can use the same datagrid instead of using a separate datagrid. Secondly you can even use a label to display the message that no records have been found and make that datagrid invisible.<BR><BR>HTH

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts