|
<ej:Grid ID="FlatGrid" runat="server" AllowPaging="True" AllowSelection="true">
<SelectionSettings SelectionMode="column" />
<ClientSideEvents Create="GridCreateEvent" />
</ej:Grid>
<script type="text/javascript">
function GridCreateEvent(args) {
var gridObj = $('#<%= FlatGrid.ClientID %>').ejGrid("instance");
args.model.columns[0]['visible'] = false;
args.model.columns[0]['isPrimaryKey'] = true;
gridObj.columns(args.model.columns)
}
</script>
|
|
<ej:Grid ID="FlatGrid" runat="server" AllowPaging="True" AllowSelection="true" EnableRowHover="false">
<SelectionSettings SelectionMode="column" />
</ej:Grid>
|
|
<ej:Grid ID="FlatGrid" runat="server" AllowPaging="True" AllowSelection="true">
<SelectionSettings SelectionMode="column" />
<ClientSideEvents Create="GridCreateEvent" QueryCellInfo="GridQueryCellInfoEvent" />
</ej:Grid>
<script type="text/javascript">
function GridQueryCellInfoEvent(args) {
if (args.column.field == "CustomerID")
$(args.cell).css('font-weight', 'bold');
}
</script>
|
|
<ej:Grid ID="FlatGrid" runat="server" AllowPaging="True" AllowSelection="true">
<SelectionSettings SelectionMode="column" />
<ClientSideEvents QueryCellInfo="GridQueryCellInfoEvent" />
</ej:Grid>
<script type="text/javascript">
function GridQueryCellInfoEvent(args) {
if (args.column.field == "CustomerID") {
$(args.cell).css('font-weight', 'bold');
$(args.cell).css("backgroundColor", "#6291cc").css("color", "#fff"); // we have applied the background color and color to particular column instead of setting to row
}
}
</script>
|