Hi,
does anybody know how to implement a tooltip for a mouseover?
In one of our columns the text is to long to show, so we show only the first letters. The user should see the whole text when hovering over the cell or row...
Thanks for every idea!
Torsten
Hi Torsten,
If you would like to show a default browser tooltip, that is fairly simple. You just need to set the 'title' attribute of the cells. This can be done in the initialize client side event.
Here is an example handler.
function initGrid(grid, args) { var rows = grid.get_rows(); var rowCount = rows.get_length(); var cellCount = rowCount > 0 ? rows.get_row(0).get_cellCount() : 0; for (var r = 0; r < rowCount; ++r) { var row = rows.get_row(r); for (var c = 0; c < cellCount; ++c) { var cell = row.get_cell(c); var cellEl = row.get_cell(c).get_element(); cellEl.title = cell.get_text(); } } }
Hopefully this accomplishes what you need.
regards,
David Young
Can you elaborate some more on this code? I tried to work it out, but not worked? How to make this event fired? Can you provide a sample?
Thanks in advance,
Assyst
Hi Dave,
Actually my question is that how we can fetch more data in one scroll itself?
Thanks,
Hi Assyst,
Virtual scrolling is not controlled by a set number of rows. It uses a concept of a viewport that slides up and down. The properties that control how many and when rows are loaded are AverageRowHeight, RowCacheFactor, and Threshold factor. The AverageRowHeight is calculated on the client by dividing visible area by visible number of rows. The RowCacheFactor determines how many rows to load (its default is 3). So for the default, you'll see the visible rows and then also an equal number above and below this. The threshold factor determines how close to get to the edge of the visible rows before loading the next batch. If you want more rows loaded, try increasing RowCacheFactor and see if you get what you want.
Dave
Now i got stuck up with another issue. I need to hide the selected columns in the grid. I had done it when AutogenerateColumns property is false. But i need to do it when Autogeneratecolumns property is true. I know its not easy to access and modify the autogenerated ones, but the requirement is like that. Can you help me in this issue?
When you autogenerate columns, you can not access them on the server, so it is not possible to hide them there. You can however hide them on the client. You could do that on the init event for the grid.
var grid = $find("WebDataGrid1");
grid.get_columns().get_column(0).set_hidden(true);
Try that and let us know.
-Dave
I am expecting a reply in soon for this issue.
With the hope of sudden reply,
Thanks in regards,
Sorry for the trouble caused. From next time onwards i will open up new posts.
Thanks & Regards,
I'll answer this, but in the future, could you kindly open a new forum post for questions not pertaining to the original question of the post. That way if other users have the same question, they can more easily find an answer. You could also try checking our documentation as this can easily be found in the client documentation.
On the client, it is very simple to set the visibility of the filter row.
grid.get_behaviors().get_filtering().set_visibility(val). val should be either $IG.FilteringVisibility.Visible or $IG.FilteringVisibility.Hidden.
Is there any way to achieve the filter disable and enable on button click?
My question is that i want to show the filter row on a button click only and i want to remove the same on other button clicks. By default it have to display:none.
I tried to use document.getElementsByClassName(). But it didn't worked out. So i used document.getElementsById(). But when comes to mozilla and other browsers the width of the cells got shrinked. So it don't make sense. And i used the browser generated id to obtain the class which also is not the proper way. So how could i achieve this?
And that grabs the thing in the basket. Now it's working fine. Thanks.
I have one more question to you. Will clarify it after i worked on it.