Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
905
How to highlight a column in a different color
posted

I have a grid where i need to highlight one particular column in different color. How can we do that. I have the below code where i need to display the country column alone in a different color.

	@( Html.Infragistics().Grid<GridDoubleClick.Models.UserInfo>()
.ID("igGrid1")
.AutoGenerateColumns(true)
.Columns(column =>
{
column.For(x => x.UserId).DataType("int").HeaderText("UserId").Width("100");
column.For(x => x.FirstName).DataType("string").HeaderText("First Name").Width("100");
column.For(x => x.LastName).DataType("string").HeaderText("Last Name").Width("100") ;
column.For(x => x.Address1).DataType("string").HeaderText("Address1").Width("100");
column.For(x => x.Address2).DataType("string").HeaderText("Address2").Width("100");
column.For(x => x.City).DataType("string").HeaderText("City").Width("100");
column.For(x => x.State).DataType("string").HeaderText("State").Width("100");
column.For(x => x.Country).DataType("string").HeaderText("Country").Width("100");
})
.Features(features =>
{
features.Resizing().AllowDoubleClickToResize(true);
features.Resizing().DeferredResizing(true);
features.Sorting().Mode(SortingMode.Multiple);
features.Sorting().ApplyColumnCss(false);
features.Selection().MouseDragSelect(true).MultipleSelection(false).Mode(SelectionMode.Row);        
})
.ClientDataSourceType(ClientDataSourceType.JSON)
.DataSourceUrl(Url.Action("GetUserInfo"))
.Width("1000")
.Height("360")
.LocalSchemaTransform(true)
.DataBind()
.Render()     
)  

 

Will we be able to do without using row template? If so let me know.

 

Regards,

Suresh A