How to skip rows

4 posts, 0 answers
  1. David Blok
    David Blok avatar
    42 posts
    Member since:
    Nov 2009

    Posted 24 Feb 2010 Link to this post

    I wonder how to skip certain database rows.

     Dim adapter As New SqlDataAdapter(strSQL, dbs)  
                            adapter.SelectCommand.Parameters.Add("@MenuIDvalue", SqlDbType.Int, 4)  
                            adapter.SelectCommand.Parameters("@MenuIDvalue").Value = MenuIDvalue  
                            adapter.SelectCommand.Parameters.Add("@LangID", SqlDbType.Int, 4)  
                            adapter.SelectCommand.Parameters("@LangID").Value = LangID  
     
                            Dim Menu As New DataSet()  
     
                            rst.Close()  
     
     
                            adapter.Fill(Menu)  
                            panelmenu1.DataTextField = "Pagename" 
                            panelmenu1.MaxDataBindDepth = Dropdownlevels  
     
                            panelmenu1.DataFieldID = "ID" 
                            panelmenu1.DataFieldParentID = "PageID" 
     
                            panelmenu1.DataSource = Menu  
                            panelmenu1.DataBind() 

    So this works perfectly, But i want to skip a row if the column "hiddenpage = 1" in de SQL.
    I cannot do it directly in the SQL code because of there are childnodes it gives an error that it cannot find the parent node.

    Anyone have an idea ?
  2. Dimitar Milushev
    Admin
    Dimitar Milushev avatar
    555 posts

    Posted 26 Feb 2010 Link to this post

    Hello David Blok,

    An easy approach to achieve this is to handler the PanelBar's ItemDataBound event and set Visible="false" to those items you don't want displayed.

    Kind regards,
    Dimitar Milushev
    the Telerik team

    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. David Blok
    David Blok avatar
    42 posts
    Member since:
    Nov 2009

    Posted 26 Feb 2010 Link to this post

    have you got a sample code to check a database field and then set that item visiable to false or true?
  5. Peter
    Admin
    Peter avatar
    6637 posts

    Posted 03 Mar 2010 Link to this post


    Yes, please check point 3 from this help topic:

    http://www.telerik.com/help/aspnet-ajax/panel_datadatatableview.html


    Regards,
    Peter
    the Telerik team

    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
Back to Top