If you open it without double-clicking it, it will not be read. To put it bluntly, it is just like opening an email: there are read and unread messages. The first problem according to my thinking is to block IE F5 refresh while requesting Grid data! That’s OK! The second one is to write a return style in VeiwConfig! Just change the isread status in record and it will be OK!
First question: Code:
document.onkeydown = function(){
if (event.keyCode == 116) {
event.keyCode=0;
event.returnValue=false;
//Requesting Grid data seems to be win R It can also be refreshed
//You can set breakpoints to debug and take a look at the Even.KeyCode encoding and leave it for everyone to think about
}
}
Expand it: I wrote one before Prevent backspace from exiting the system. Some forms are set to be read-only and it will be very depressing to press backspace to exit the system!
Code:
document.onkeydown = function() {
if (event.keyCode == 8) {
if((event.srcElement.nodeName != "INPUT" && event.srcElement.nodeName != "TEXTAREA") || event.srcElement.readOnly = = true)
{
event.cancelBubble = true;
return false;
}
}
}
Hey, second question! I thought I had written a Grid before to change the color of the data! Depend on! It says to make it bold!
I will use the style from an article I wrote before! It just so happens that I don’t know that the home page has been processed with Delphi, nor does my F12 debugging tool! I'm depressed! There is no Vs series installed! It took a long time!
There is actually a problem!
The style has the previous ones:
.x-grid -record-red table{
color:#FF0000 ;
}
becomes
.x-grid-record-red tabel{
font-weight: bolder ;
}
i Fainting has no effect! I just googled and debugged like crazy
Then I didn’t know what was written in that article. I just changed the tabel to td and that was it. I fainted!
Rewrite the status to read in the double-click open event
'rowdblclick':function(grid,i){
grid.store.data.items[i]. set('isread','2'); //1 unread 2 read
}