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 423,560 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,715 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
Views: 538 | Replies: 3 | Solved
Reply
Join Date: Mar 2008
Location: Bangalore
Posts: 31
Reputation: rashmigs84 is an unknown quantity at this point 
Rep Power: 1
Solved Threads: 0
rashmigs84's Avatar
rashmigs84 rashmigs84 is offline Offline
Light Poster

Datagrid

  #1  
Mar 26th, 2008
Hi,
I have used datagrid to display details. I want to use to link button columns in a grid wherein both the link button column has a different navigation url . For one column i can write in the selected index changed but how can i write the url for second button.I am using c# and asp.net. Please help me with this problem
AddThis Social Bookmark Button
Reply With Quote  
Join Date: Mar 2008
Posts: 20
Reputation: ravichandra is an unknown quantity at this point 
Rep Power: 1
Solved Threads: 5
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  
Join Date: Mar 2008
Location: Bangalore
Posts: 31
Reputation: rashmigs84 is an unknown quantity at this point 
Rep Power: 1
Solved Threads: 0
rashmigs84's Avatar
rashmigs84 rashmigs84 is offline Offline
Light Poster

Re: Datagrid

  #3  
Mar 26th, 2008
Hi,
Thanks i ll try this..
Reply With Quote  
Join Date: Mar 2008
Location: Bangalore
Posts: 31
Reputation: rashmigs84 is an unknown quantity at this point 
Rep Power: 1
Solved Threads: 0
rashmigs84's Avatar
rashmigs84 rashmigs84 is offline Offline
Light Poster

Re: Datagrid

  #4  
Mar 28th, 2008
Hi,

I got the solution .

thanks.
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

DaniWeb ASP.NET Marketplace
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

Thread Tools Display Modes

Similar Threads
Other Threads in the ASP.NET Forum

All times are GMT -4. The time now is 6:27 pm.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC