Hi all,

I'm rather new to ASP.NET (did PHP/MySQL before). 
I want to create an questionary. So far everything went ok. Because 
there are to many questions for just one page, I want to split, not 
by page but by Category.
I wonder how to use RowFilter for this.
Is it possible to use RowFilter with a DataList?

Hopefully I'm on the right track. Till now I do know how to filter, 
but I want to change the filter when my ViewState changes.

My code so far:

Sub BindData()
        Dim ConnectionString As String 
= "Provider=Microsoft.Jet.OLEDB.4.0;data source=" & server.mappath
("test.mdb") &""
    Dim myConnection as New OleDbConnection(ConnectionString)
Dim dvwVragen as DataView

     Dim strSQL as String = "SELECT categorie_table.categorie, 
vragen_table.id, vragen_table.vraag_nummer, vragen_table.vraag, 
categorie_table.tekst " & _
                "FROM vragen_table LEFT JOIN categorie_table ON 
vragen_table.categorieID = categorie_table.id " & _
                " ORDER BY categorie_table.id, 
vragen_table.vraag_nummer;"
    Dim myCommand as New OleDbCommand(strSQL, myConnection)
    Dim myDA as New OleDbDataAdapter(myCommand)


    Dim myDS as New DataSet()
    myConnection.Open()
    myDA.Fill(myDS,"Vragen")
    myConnection.Close()


dvwVragen=myDS.Tables("Vragen").DefaultView
dvwVragen.RowFilter= "categorie=2"
Datalist1.DataSource = dvwVragen
    Datalist1.DataBind()
End Sub

(where the set is filtered for categorie=2, I want to filter for 
categorie=1 at page 1, categorie=2 on page 2 and so on)



For the printing on the page, I call for Datalist1.

I'm getting from page to page with something like this:
http://www.superexpert.com/default.aspx?id=107

I'm kind of lost in code, anyone here with just a suggestion to get 
me back on track?

Thanx in advance,

Evelien




------------------------ Yahoo! Groups Sponsor --------------------~--> 
Make a clean sweep of pop-up ads. Yahoo! Companion Toolbar.
Now with Pop-Up Blocker. Get it for free!
http://us.click.yahoo.com/L5YrjA/eSIIAA/yQLSAA/saFolB/TM
--------------------------------------------------------------------~-> 

 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/AspNetAnyQuestionIsOk/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 

Reply via email to