User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the ASP.NET section within the Web Development category of DaniWeb, a massive community of 373,103 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 3,703 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our ASP.NET advertiser: Lunarpages ASP Web Hosting

Datagrid

Join Date: Mar 2008
Posts: 20
Reputation: ravichandra is an unknown quantity at this point 
Rep Power: 1
Solved Threads: 4
ravichandra ravichandra is offline Offline
Newbie Poster

Re: Datagrid

  #2  
Mar 26th, 2008
Supplier:
<asp:LinkButton ID="lnkSupplier" Text='<%#Bind("column_Name") %>' runat="server" CommandName="SupplierLink" CommandArgument='<%#Bind("Column_Name") %>'></asp:LinkButton></br>

Category
<asp:LinkButton ID="lnkCategory" Text='<%#Bind("column_Name") %>' runat="server" CommandName="CategoryLink" CommandArgument='<%#Bind("Column_Name") %>'></asp:LinkButton>

Now check which link button is clicked by

 protected void DataList1_ItemCommand(object source, DataListCommandEventArgs e)
    {
       
        if (e.CommandName == "SupplierLink")// Supplier Link button clicked

	......   //can get the url/data  from e.CommandArgument
        else
         ......
    }

GOOD LUCK
ravichandra
Last edited by peter_budo : Mar 27th, 2008 at 3:56 am. Reason: Missing back slash in closing [/code] tag
Reply With Quote  
All times are GMT -4. The time now is 5:15 pm.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC