0

this code never fills the grid view I know that somthing is wrong here the code

Imports System.Data
Imports ZidduDataSetTableAdapters
Partial Class _Default
    Inherits System.Web.UI.Page
    Dim filesAdp As New FilesTableAdapter
    Dim filestable As New ZidduDataSet.FilesDataTable
    Protected Sub btnfill_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnfill.Click
        Me.GridView1.DataSource = filesAdp.GetData
        Me.GridView1.DataBind()
    End Sub
End Class

and I already created the dataset with wizard called ZidduDataSet.xsd and the adapter name is FilesTableAdapter

can any one help?

2
  • This is completely unintelligible. Please rethink, rephrase, reformat, and open a new question (this one will undoubtedly get closed very quickly.) We will donate time and effort to help you, but you have to make a minimum amount of effort as well. Commented Apr 12, 2009 at 16:06
  • Please add the actual error message Commented Apr 12, 2009 at 16:07

2 Answers 2

1

i am not a VB coder, but i think you should call Databind() function on Page Load event too.

hope this helps.

Sign up to request clarification or add additional context in comments.

Comments

0

the only thing wrong with the code is that filestable is never used. If your gridview isn't showing up then you have a problem else where i think.

  1. btnfill_Click isn't getting called. Check the .aspx markup to make sure the event handler is referenced.
  2. filesAdp.GetData doesn't return any data.
  3. GridView1 isn't visible on the page.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.