4 Replies - 3357 Views - Last Post: 23 June 2012 - 02:58 PM Rate Topic: -----

#1 unknownmaster80  Icon User is offline

  • D.I.C Head

Reputation: 0
  • View blog
  • Posts: 81
  • Joined: 06-August 11

Is it possible to update/refresh listview on button click?

Posted 23 June 2012 - 02:04 PM

I want a listview that works just like http://www.ikea.com/...ts/living_room/

Imagine you expand onto 'Sofas and armchairs' and click 'fabric sofas', it will redirect to next page on click and it will send data '10661' to the next page. Then the listview will updated with reference '10661'. After that click on another link, maybe leather sofas. The listview will re-update table with new reference '10662'

Is there any website for me to learn that as I could not find them in the website.

Thanks

Is This A Good Question/Topic? 0
  • +

Replies To: Is it possible to update/refresh listview on button click?

#2 modi123_1  Icon User is offline

  • Suitor #2
  • member icon



Reputation: 9587
  • View blog
  • Posts: 36,326
  • Joined: 12-June 08

Re: Is it possible to update/refresh listview on button click?

Posted 23 June 2012 - 02:08 PM

Yeah.. that's a treeview... plenty of those to go around. Here's one that yahoo made.
Was This Post Helpful? 0
  • +
  • -

#3 unknownmaster80  Icon User is offline

  • D.I.C Head

Reputation: 0
  • View blog
  • Posts: 81
  • Joined: 06-August 11

Re: Is it possible to update/refresh listview on button click?

Posted 23 June 2012 - 02:16 PM

Ohh. It is about the same kind as what I have done too. But when i clicked onto an item in tree view, the listview would not update the table.

this is my productscategorytype.aspx
'Listview
'sqlcommand is
SELECT DISTINCT[ProdName], p.[ProdID], [UnitPrice], [Category], [Type] , pd.pdpic
FROM [Product] p INNER JOIN ProductDetail pd ON p.ProdID = pd.ProdID 
WHERE (([Category] = 'Living Room') AND ([Type] = 'Sofa')) AND pd.pdpic = (SELECT Min(PDPic) FROM ProductDetail pd1 WHERE pd1.ProdID = p.ProdID)


productscategorytype.aspx code behind
    Private Sub ProductsCategoryType_PreRender(sender As Object, e As System.EventArgs) Handles Me.PreRender
        If Page.IsPostBack Then
            Dim Category As String = Nothing
            Dim Type As String = Nothing
            Category = CType(Request.QueryString("Category"), String)
            Type = CType(Request.QueryString("Type"), String)
        End If
    End Sub


treeview menu bar as you mentioned but it is stored in asax code behind

    Sub CategoryType_Command(source As Object, e As CommandEventArgs)
        Response.Redirect("ProductsCategoryType.aspx?Category=" & e.CommandArgument & "&Type=" & e.CommandName)
    End Sub



Is there anything wrong with it?

This post has been edited by unknownmaster80: 23 June 2012 - 02:19 PM

Was This Post Helpful? 0
  • +
  • -

#4 unknownmaster80  Icon User is offline

  • D.I.C Head

Reputation: 0
  • View blog
  • Posts: 81
  • Joined: 06-August 11

Re: Is it possible to update/refresh listview on button click?

Posted 23 June 2012 - 02:55 PM

Found my error already. I forgot to change my sql value to @value. Thanks anws :)
Was This Post Helpful? 0
  • +
  • -

#5 modi123_1  Icon User is offline

  • Suitor #2
  • member icon



Reputation: 9587
  • View blog
  • Posts: 36,326
  • Joined: 12-June 08

Re: Is it possible to update/refresh listview on button click?

Posted 23 June 2012 - 02:58 PM

Good job on the find.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1