Is there a way to highlight the cells based on the events? For example, an event for July 5th to July 9th, I would like the cell to be highlighted.
Yes, you can use the property "className" for these specific events
Related
Can't seem to find an answer to this - so thought I'd give this a shot.
I have read several answers on how to detect a click of a background event. Such as this: Detect click on background event
What I've found, however, is that when two ore more background events are on the same row, only the last day rendered as a background event will contain the proper CSS target to allow detection. All the previous days on that row (month view is what I'm working in) will act as regular "dayClick" events, even though they are actually rendered as background events.
For example, in this image, clicking on the 25th is detected, while clicking on that 22nd is not:
Looking at the source of the page, the first three days (the 22nd through the 24th) all appear in this image on the line marked "1". It's a TD with a colspan of 3. The line marked "2" is the line that has the TD containing the 25th:
Effectively anything before the 25th is cut off from being targeted using fc-bgevent.
It should be noted that a single background event that spans days works as expected. So if I was to simply extend the end date of the event that starts on the 22nd to the 25th, it will all work - except of course the "start" date that you receive in the click event will be the 22nd, no matter which day you click on.
Has anyone found a way around this?
What I want to do is render background events and also detect the date when they are clicked.
Thanks, in advance, for the help.
Use selectOverlap to detect click on background events
selectOverlap: function(event) {
// Here you will get all background events which are on same time.
console.log(event);
return event.rendering === 'background';
}
I m getting some dates from the database which are of interest to the user
(they are then dates where the user is going to take days off in the future or has taken days off in the past from his or hers job).
I have the dates in the database and i need to retrive them for each cell and color the calendarjs cells in red.
Im currently using ASP.NET MVC but i can handle any examples in any languages on how to pre-render fullcalendarjs cells.
Im more interested in how to handle the frontend.I dont need "events" i need to make the entire day cell red, the top part aka the th and the bottom part of the cell aka the td.
Very easy, use firebug and you'll see that there is an fc-bg class used to mark the calendar squares area and each cell is marked with data-date="YYYY-MM-DD".
So you can use jQuery to find each cell and change its style.
$('*[data-date="'+ dateVar + '"]').addClass('some-class');
you can even check what other classes are set to see if its in the past, what day of the week it is, etc.
get Firebug :)
I'm having a QTableWidget with 9000 data. I can search data from the table, like, if I search for '10', whole data starting with '10' will be displayed.
Now I need to highlight the first row, since it shows the accurate search result.
I'm using:
ui->tableWidget->setSelectionBehavior(QAbstractItemView::SelectRows);
for highlighting the selected row.
How can I highlight the first row of table?
I am not sure I am clear of why you need to set selection behavior unless you are planning for the user to be able to do the selection by clicking on the cells. And if you want that to be the default behavior then just set this as a property of the tableWidget when you use the QT designer.
But you can certainly do:
ui->tableWidget->selectRow(0);
That will highlight the row.
Is there an event that fires after leaving a cell in a grid controls row filter?
The first row of my grid is a filter row, when I type something in the cell of and column in the filter row then select a row I want an event to fire.
What is happening is I have a lot of code in the gridView1s FocusedRow changed event, but when I use the filter then select the first row the Focusedrow event does not fire. If I select anything but the first first row returned the Focusedrow event fires and everything is fine, but I need to capture an event after you type something in a filter cell and select the first row in the grid.
I've tried to reproduce this issue using XtraGrid 9.3.4. but to no avail. Everything works as expected in my tests. So, I would suggest that you create a new ticket in the support center and upload a sample project. We will find the cause of the issue and let you know how to resolve it.
I have a question I came up with 3 days ago about how to do the blue underlining of a datagrid row programmatically. I thought to have found the solution, with just adding the column and row Indexes to the datagrids editedItemPosition Property.
It turned out, that this is just practical if you want to be able to edit the grids row right away. But what if I just want to underline it with the blue color?
Additionally how to detect that a list based Item got this kind of selection? es there a event to detect that? whats the name of this kind of selection?
Thanks for any Hints,
Markus
You can set datagrid.selectedIndex or datagrid.selectedItem to select a specific entry in the datagrid. The row will get highlighted (blue by default).
The dataGrid dispatches a change event in that case afair. And of course you can retrieve the selected item with datagrid.selectedItem.