|
-
Sep 9th, 2005, 07:22 AM
#1
Thread Starter
Addicted Member
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
-
Sep 10th, 2005, 03:13 PM
#2
Thread Starter
Addicted Member
Re: DataGrid
Hello ,
No body can help me?!!!!!!!!!!!!!!!
-
Nov 9th, 2005, 11:25 AM
#3
Fanatic Member
Re: DataGrid
 Originally Posted by alqous
Hello ,
No body can help me?!!!!!!!!!!!!!!!
try to use hiperlink.
See Datagrid properties
-
Nov 10th, 2005, 07:11 PM
#4
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.
-
Nov 11th, 2005, 09:47 AM
#5
Junior Member
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|