By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
434,660 Members | 1,953 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 434,660 IT Pros & Developers. It's quick & easy.

ASP.NET 2.0 Gridview with column containing bot hyperlinked and non hyperlikned cells

P: 1
Hi,

My gridview should have columns containing both hyperlinked and non hyperlinked cells in the same column.

Example - Say there are 4 rows and 4 columns in my grid, and the 3rd column should have both hyperlinked and non hyperlinked cells.

Can anyone help me how to do this.?
Jun 28 '07 #1
Share this Question
Share on Google+
1 Reply


P: 63
Hi,

My gridview should have columns containing both hyperlinked and non hyperlinked cells in the same column.

Example - Say there are 4 rows and 4 columns in my grid, and the 3rd column should have both hyperlinked and non hyperlinked cells.

Can anyone help me how to do this.?
HI
Would like to ask you something. The non Hyperlinked part does not have anything else to do than to display on screen right?
Look if you want the third column with hyperlinked and non hyperlinked data try whether this method helps

In the gridView the rquired column must be giiven like this


<asp:TemplateField HeaderText="Log Quote Status" Expression="Code">
<ItemTemplate>
<asp:Label runat="server" Text='<%# DataBinder.EvalContainer.DataItem, "Description") %>'></asp:Label>
&nbsp; &nbsp; &nbsp;
<asp:LinkButton ID="lnkViewButton" runat="server"
CommandArgument='<%# DataBinder.Eval(Container.DataItem, "LogQuoteStatusId") %>'
CommandName="View" OnClick="linkButton_Clicked"><%# DataBinder.Eval(Container.DataItem, "Code")%>
</asp:LinkButton>
</ItemTemplate>
<ItemStyle Width="45%" />
</asp:TemplateField>

Please reply after trying this, good luck

bye Paulson.
Jun 28 '07 #2

Post your reply

Sign in to post your reply or Sign up for a free account.