Forum
Topic RSS
18:21
13/11/2009
OfflineHi guys
I am having a tiny problem but first thanks Tony for the beautiful plugin.
I have setup a grid in which a cell background colour is set to a specific colour. In Firefox and other browsers everything is find, but in Internet Explorer the colour of the cell background I have set is not being rendered. Here is my code
jQuery("#tblScheduleDetail").jqGrid({
url:'nothing',
datatype: "json",
height: 150, width: 850,
colNames:['Appt time','Dur','Freq','SST','<img src="images/note.bmp">','<img src="images/paperclip.bmp">','Client','Address','Ess.','Associated Org Provider'],
colModel:[{name:'col0',index:'col0'},
{name:'col1',index:'col1'},
{name:'col2',index:'col2'},
{name:'col3',index:'col3'},
{name:'col4',index:'col4'},
{name:'col5',index:'col5'},
{name:'col6',index:'col6'},
{name:'col7',index:'col7'},
{name:'col8',index:'col8'},
{name:'col9',index:'col9'}],
rowNum:200,
mtype: "POST",
rownumbers: false,
gridview: true,
pager: '#pager',
sortname: '',
viewrecords: true,
sortorder: "asc",
caption: "Schedule Detail"
});
var data = [ {col1:"col1,row1", col2:"col2,row1",col3:"col3,row1",col4:"col4,row1"},
{col1:"col1,row2", col2:"col2,row2",col3:"col3,row2",col4:"col4,row2"},
{col1:"col1,row3", col2:"col2,row3",col3:"col3,row3",col4:"col4,row3"},
{col1:"col1,row4", col2:"col2,row4",col3:"col3,row4",col4:"col4,row4"}];
for(var i = 0; i <= data.length; i ++){
jQuery("#tblScheduleDetail").addRowData(i+1,data[i]);
}
jQuery("#tblScheduleDetail").setCell(1,'col4','',{'background-color':'yellow'});
I may have missed something, can someone help please
01:15
Moderators
08/10/2009
OfflineHow about the approach shown here:
http://trirand.net/demo.aspx ( Appearance -> Custom Cell Color)
You can check out how we do it for background color - basically create html span for the content.
Trirand ASP.NET WebForms & MVC components based on jQuery & ThemeRoller
18:46
13/11/2009
OfflineThanks Rumen for repying to my post. Based on the link you've given, I can set the background while while adding data to the cell but only set the colour to the back ground of the text, not the whole cell.
Is cellbinding event available for javascript? Or is there any similar method for javascript?
Regards
Most Users Ever Online: 994
Currently Online:
119 Guest(s)
Currently Browsing this Page:
1 Guest(s)
Top Posters:
OlegK: 1255
markw65: 179
kobruleht: 144
phicarre: 132
YamilBracho: 124
Renso: 118
Member Stats:
Guest Posters: 447
Members: 11373
Moderators: 2
Admins: 1
Forum Stats:
Groups: 1
Forums: 8
Topics: 10592
Posts: 31289
Newest Members:
, razia, Prankie, psky, praveen neelam, greg.valainis@pa-tech.comModerators: tony: 7721, Rumen[Trirand]: 81
Administrators: admin: 66
Log In
Home