[RESOLVED] Datagrid showing just one record
I m working on asp.net i have 4 records in database
but grid is shwoing only one record here is my .aspx code
Code:
<asp:datagrid id="DGProducts" runat="server" DataKeyField="product_id" CellPadding="3" BorderStyle="None"
BorderColor="#E7E7FF" BackColor="White" AutoGenerateColumns="False">
...................................................
.....................
<asp:datagrid>
and here is code behind for page load
Code:
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
' If Not IsPostBack Then
bindgrid()
' End If
End Sub
here is code behind for bindgrid method
Code:
Private Sub bindgrid()
Try
' If Not IsPostBack Then
Dim dsProduct As New DataSet
dsProduct = cn.SelectQueryDS("Select * from admin", HttpContext.Current.Server.MapPath("../database/urban.mdb"))
Response.Write(dsProduct.Tables(0).Rows.Count)
If dsProduct.Tables(0).Rows.Count > 0 Then
DGProducts.DataSource = dsProduct
DGProducts.DataBind()
End If
' End If
Catch ex As Exception
End Try
End Sub
where this statemnet shows Response.Write(dsProduct.Tables(0).Rows.Count) shows 4 record
any urgent help would be higly appreciated
Re: Datagrid showing just one record
OK .my problem has been resolves .I edit hyperlink column and every thing works fine :)