Community & Support
Skip Navigation LinksHome / Community & Support / Developer Productivity Tools Forums / ASP.NET AJAX > PanelBar > How to skip rows

Not answered How to skip rows

Feed from this thread
  • David Blok avatar

    Posted on Feb 24, 2010 (permalink)

    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 ?

    Reply

  • Dimitar Milushev Dimitar Milushev admin's avatar

    Posted on Feb 26, 2010 (permalink)

    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.

    Reply

  • David Blok avatar

    Posted on Feb 26, 2010 (permalink)

    have you got a sample code to check a database field and then set that item visiable to false or true?

    Reply

  • Peter Peter admin's avatar

    Posted on Mar 3, 2010 (permalink)


    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.

    Reply

  • Q1 Webinar Week

Back to Top

Skip Navigation LinksHome / Community & Support / Developer Productivity Tools Forums / ASP.NET AJAX > PanelBar > How to skip rows
Related resources for "How to skip rows"

[  ASP.NET PanelBar Features  |  Documentation  |  Demos  |  Telerik TV  |  Self-Paced Trainer  |  Step-by-step Tutorial  ]