I do need some help. here is my scenario. Only one cell ourtof the 3 in a row is clickable. And when i click on each of those cells, it open into a new open wirth some futher details. I dont think i can use the TemplateDataField and I need to be able to do this in code . Can you show me an example . I am guessing this should be done in rowinitialize.
Hi,
I am just checking if the latest reply helped you out or if you require any further assistance on the matter.
Hello,
You can achieve this using TemplatedDataField:
<ig:TemplateDataField Key="Name">
<ItemTemplate>
<a onclick="link()" href="#"><%# DataBinder.Eval(((Infragistics.Web.UI.TemplateContainer)Container).DataItem, "Name") %></a>
</ItemTemplate>
<Header Text="Name" />
</ig:TemplateDataField>
On click of the link you could open new window from BLOCKED SCRIPT
function link() {
window.open("Default2.aspx", "_blank");
}
Please let me know if this helps.
I dont think I made myself very clear. I have 3 columns in my grid. Id, name and address. I want the name to be a clickable link which opens up a new window with some details. So how can i handle this . As in the example you provided I can click the entire row and it does not allow for a specific name to be the only one that can be clicked to open in a new window
Hello dev_here,
You can get the value of column with key "ID" like this:
int id = Int32.Parse(e.CurrentSelectedRows[0].Items.FindItemByKey("ID").Text);
Feel free to contact me if you have any further questions.