I'm facing problem in infragistics Grid, i've html string which i'm showing in grid it is showing properly in column BUT i'm facing below two problems
Hi Kumar,
Which elipses is not showing ?
Please try the following, howevrr have in mind that the font-family style will be overwritten by grid's defaults:
template:"<p><span style='font-family:Segoe UI, helvetica, arial, sans-serif, font-size: 16px !important; line-height: 21px; background-color: rgb(255,255,255);'>some text.......</span></p>"},
The difference is thatSegoe UIis not wrapped in ' '.
Hi Hristo,
Thanks so much for your quick reply!
Actually, i have some HTML text/string which i want to display in column as you can see in attachment. HTML string is render properly in column BUT i need to show ellipses(...) at the end of column width AND in tooltip i want to show plan text rather than html text as you can see in attachment.
If possible then please provide me any sample code.
Best Regards,
Sanjay
Hi,
Thank you for clarifying, now I got your issue correctly. Since the tooltip takes the cell value and it contains html markup, this behavior is expected. You go around by attaching to the tooltipShowing event, where to take the cell text and assign its value to the tooltip value:
features: [ { name: "Tooltips", visibility: "always", tooltipShowing : function(evt, args) { args.tooltip = args.owner.grid.getCellText(args.index, args.columnKey); } } ]
The getCellText method takes row index or rowId (if porimary key is defined) as first parameter. Args.index return the row index, so this will work when primary key is not defined. IF it is defined, then you should use args.index to get rowId on the given row. Please let me know if you need assistance achieving this.
Thanks Hristo,
I will make tooltipShowing event and will let you know the results.
Thanks for your help.
Can we show line break tag <br /> in tooltip. Means there is one more requirement that tooltip will show line break between names/sentences.
Actually basic requirement was that column should show html string in single line with ellipses(...) and tooltip will show actual/render html string without showing html tags/the render string which we normally see in our browser.
below is the event through which i'm changing tooltip contents,
//Bind after initialization $(document).delegate("#ClientNotesGrid1", "iggridtooltipstooltipshowing", function (evt, args) {args.tooltip = args.owner.grid.getCellText(args.index, args.columnKey).replace(",","<br/>");
The grid will render the <br/> as html markup and will place a line break in the grid cell. However you will not able to place a line break this way in the tooltip - as we mentioned the tooltip render the value as pure string, and will not recognize html markup.
Please let me know if I may be of any further assistance to you.
Thanks for your quick attention about my requirement.
Its' okay if this is not feasible. I will recommend my client to put hover popup instead of tooltip.
Thanks once again.