Reimers.dk

.NET, AJAX and Google APIs brought together
Welcome to Reimers.dk Sign in | Join | Help
in Search

Adding more columns to SideBar

Last post 01-27-2010, 8:51 by jjrdk. 5 replies.
Sort Posts: Previous Next
  •  04-07-2007, 23:42 563

    Adding more columns to SideBar

    Hi jjrdk,

    Thanks for such a wonderful SideBar control.

    Few question regarding SidrBar Control.

    1. When we drag SideBar control from the toolbox into the window in design mode, why it doest show up as a Web Control. Its just displays a very tiny icon.

    2. Could I able to customize ther sidebar control to add my own columns , like the way we do in GridView.

    Currenlty sidebar is showing the marker_id in the sidebar. I want to add other columns like first_name, last_name,phone no which i retrieve from the database.

    Thanks in advance,

    Haroon

     

  •  04-08-2007, 0:06 566 in reply to 563

    Re: Adding more columns to SideBar

    I'm glad you like the sidebar control.

    When you add it to your webpage it displays as a small "dot" because it has no content. If you set a text in the HeaderText property then that will display. However the overlays will not be shown until you render the page.

    As far as adding your own columns then that is not possible. The sidebar was created to show an overview of the markers on the map. If you want to use GridView functionality then I suggest adding a GridView to your page. 

  •  04-09-2007, 16:27 576 in reply to 566

    Re: Adding more columns to SideBar

    Hi jjrdk,

    Thanks for your replay.

    I tried using GridView to work as good as SideBar, but i think GridView has some limitations that i am facing.

    Now you mentioned in one of your post of attaching javascript to one of the web control events. Forexample .Attributes.Add("onclick",GMap.PanTo(GoogleLatLng));. I tried setting this for GridView in its RowCommand event. The problem is since Attributes.Add registers the script on the event and the script doesnt get executed immediately and it only gets activated if i execute click event second times. What i wanted was to execute javascript immediately.

    Suppose i have the following GridView

    <ID> <Lat>  <Lng>

    1       -37.888  144.6666

    2      -34.1223  145.4566

    3     -56.3333  145.56777

    The ID are as hyperlinks. Now when i click say link 2, it Should get its LatLng values and pan Map to that particulat point.

    Now in RowCommand event I have put the following line GridView.Attributes.Add("onclick",GMap.Panto(new GoogleLatLng(<Lat>,<Lng>)). Under this scenario, when i click link 2, nothing happens as the javascript is only being registered, and it didnt execute immediately. Now lets suppose i click link 1, now the map will move to first event (link 2) that i clicked and not to the link that i have clicked now (link 1). Same things happens when i click link 3 and map pans to Lat,Lng of event 2. So map moves to last event Points rather moving to current link's Lat,Lng.

    You also mentioned using Helper class HandleClientEvent method, but i coudnt able to figure out how and where to put that method.

    Could you help me finding a way of executing these javascript PanTo() straight away, the same way The SideBar_Click event takes javscripts as return value, and it executes it when that event gets trigged.

    Thanks in Advance.

     

     Haroon
  •  04-10-2007, 0:44 579 in reply to 576

    Re: Adding more columns to SideBar

    Hello Haroon,

    I hope you understand that I don't really want to get involved in developing specialized functionality for your website. I suggest you have a look at the MSDN documentation for the GridView control, especially the DataFormatString property of BoundField.

    Also make sure that you are not initiating postbacks when you click your gridview. 

  •  01-22-2010, 3:35 2964 in reply to 563

    Re: Adding more columns to SideBar

    The sidebar control is really great to use at. By the way can we also use this sidebar to our site/blog?

    Testonix erotiske artikler
  •  01-27-2010, 8:51 2972 in reply to 2964

    Re: Adding more columns to SideBar

    That depends if your blog/site supports ASP.NET controls? If it does, then go ahead.
View as RSS news feed in XML