Hi,
I would like to have a column in the grid which contains a hyperlink, but I could not find documentation for mvc3. My grid is defined like this:
<%: Html.Infragistics().Grid<CourtRecordsModule.ViewModels.CourtRecord>()
.ID("gridMainDocument")
.DataSourceUrl(Url.Action("GetMainDocument", "EditRecord", new { id = Model.DomainModelCourtRecord.MainRecordID }))
.AutoCommit(true)
.Columns(c =>
{
c.For(x => x.DomainModelCourtRecord.Title).DataType("string").HeaderText("Title").Width("400px");
c.For(x => x.DomainModelCourtRecord.LanguageName).DataType("string").HeaderText("Language *").Width("150px");
c.For(x => x.DomainModelCourtRecord.ConfidentialityDesc).DataType("string").HeaderText("Confidentiality *").Width("150px");
c.For(x => x.DomainModelCourtRecord.ExParteWho).DataType("string").HeaderText("Ex Parte to who").Width("200px");
})
.DataBind().Render() %>
Any help is appreciated..
Hi Martin,
Thank you for your fast reply, indeed I'm using Netadvantage 12.1 release. I have created the template column this way:
.Columns(c => {
c.For(x => x.Link).Template("<a href='http://google.com'>View</a>").HeaderText(" ").Width("100px");
and I expected that "View" is the hyperlink, however the "View" text is not present in the new column.
Did I forgot to include any library or javascript file from service release 12.1? (I recently migrated from 11.2 to 12.1 and I have just replaced the dll's).
Hi IccAppSupport,
In 12.1 release we introduced new igGrid feature called "Column template". Here is topic on the subject: http://help.infragistics.com/NetAdvantage/jQuery/2012.1/CLR4.0?page=Creating a Basic Column Template in the igGrid.html
Here is example code:
Notice the Template method in which you set the column template.
Here you can see sample for column template(in the code view you can find the MVC code):
http://samples.infragistics.com/jquery/grid/basic-column-template
If you're using 11.2 you have to define row template. Here is sample(in the code view you can find the MVC code):
http://samples.infragistics.com/jquery/grid/row-template
Hope this helps.
Martin Pavlov,
Infragistics, Inc.