Results 1 to 5 of 5

Thread: DataGrid

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Mar 2005
    Posts
    130

    Question DataGrid

    I have a quistion in datagrid :

    When i bind the data to DataGrid how i can make the item in every cell at datagrid go to diffrent aspx page when user click on the item in the cell.. i need the exactly code for that...


    Regard

  2. #2

    Thread Starter
    Addicted Member
    Join Date
    Mar 2005
    Posts
    130

    Re: DataGrid

    Hello ,

    No body can help me?!!!!!!!!!!!!!!!

  3. #3
    Fanatic Member
    Join Date
    Sep 1999
    Location
    Santo Domingo,D.N., Dom. Rep.
    Posts
    707

    Re: DataGrid

    Quote Originally Posted by alqous
    Hello ,

    No body can help me?!!!!!!!!!!!!!!!
    try to use hiperlink.
    See Datagrid properties

  4. #4
    I'm about to be a PowerPoster! mendhak's Avatar
    Join Date
    Feb 2002
    Location
    Ulaan Baator GooGoo: Frog
    Posts
    38,170

    Re: DataGrid

    I don't have code for you, but I'll give you instructions.

    Set up a templatecolumn in your datagrid with a hyperlink in it.

    In the itemdatabound event of the datagrid, loop through each row, do a findcontrol for the hyperlink, and according to the corresponding row in your dataset, set it's navigateurl property.

  5. #5
    Junior Member
    Join Date
    Aug 2004
    Location
    Orlando
    Posts
    30

    Re: DataGrid

    all your columns will have to be Hyperlinks. You have to go to your HTML view and in the datagrid section add this code per column

    <asp:HyperLinkColumn Text="A" Target="_blank" DataNavigateUrlField="ID"
    DataNavigateUrlFormatString="yourpage.aspx?MID={0}" HeaderText="View">
    <HeaderStyle HorizontalAlign="Center"></HeaderStyle> <ItemStyle
    HorizontalAlign="Center"></ItemStyle>
    </asp:HyperLinkColumn>


    hope this helps

    Jose

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width