How to find a dataset had values

Ask a Question related to ASP.NET Data Grid Control, Design and Development.

  1. #1

    Default How to find a dataset had values

    hi all,

    In ASP.Net , i'm binding a dataset to a datagrid. Its showing error when the
    dataset has no values. So I have to find whether dataset has any values or
    not. How to do that?

    Thanks in advance.

    Regards,
    Gomathi


    Gomathi Guest

  2. Similar Questions and Discussions

    1. extracting values from a dataset
      I have a dataset set-up in my application which has one column which will only ever have one row of data in it (i.e. the previous valid voucher...
    2. DataSet/DataGrid/Null values
      Strange thing - when I bind a dataset to a datagrid and the dataset column has null values, I cannot edit it. If I try to edit the value, it just...
    3. Null values in typed dataset
      Hi! I have a typed dataset which I fill from a select statement, but some columns in my result my be null. When I read this null columns in my...
    4. How to find grid's row that matches row in dataset
      how to set SelectedIndex of the grid to the row that matches a datarow found in the underlying dataset (besides looping thru all rows and comparing...
    5. web services htc getting array or dataset values
      I'm new to this web services arena... I was able to use the MSDN example of Web Services with the HTC file. Pretty neat as I didn't want my page...
  3. #2

    Default Re: How to find a dataset had values

    Check myGrid.Items.Count on 0.

    Eliyahu

    "Gomathi" <gomathi@celtycs-consulting.com> wrote in message
    news:OC6FFdc6FHA.3136@TK2MSFTNGP09.phx.gbl...
    > hi all,
    >
    > In ASP.Net , i'm binding a dataset to a datagrid. Its showing error when
    > the dataset has no values. So I have to find whether dataset has any
    > values or not. How to do that?
    >
    > Thanks in advance.
    >
    > Regards,
    > Gomathi
    >

    Eliyahu Goldin Guest

  4. #3

    Default RE: How to find a dataset had values

    Hi,

    if(ds.Table[0].Rows.Count>0)
    {
    dbGrid.DataSource=ds
    dbGrid.DataBind()
    }
    --
    Pathik H Rawal
    (DotNet Guy)


    "Gomathi" wrote:
    > hi all,
    >
    > In ASP.Net , i'm binding a dataset to a datagrid. Its showing error when the
    > dataset has no values. So I have to find whether dataset has any values or
    > not. How to do that?
    >
    > Thanks in advance.
    >
    > Regards,
    > Gomathi
    >
    >
    >
    Pathik H Rawal Guest

Posting Permissions

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

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139