Monday 4 April 2011

Beginners Guide to QlikView Extension Objects : Part 4 - Headers

Here at Qonnections, I am meeting some interesting folks and having some good chats. Meeting people that read your blog is interesting in itself!

I met Andrew last night and he had been playing around with Extension Objects using my previous 3 steps as a starter. He pointed out one glaring omission - how do you add headers! Doh! I had done it before but just failed to add it to the table example.

Headers are actually pretty easy (like a lot of this stuff). We have already seen the this.Data.rows property. Well the Data class also exposes a HeaderRows property. This has a length value but I can't really see where there would be more than one row. Anyway, we just need to extract the text values from the property just as we have done before:

// Add the Header row
var headerRow = this.Data.HeaderRows[0];

html += "<tr><th>" + headerRow[0].text + "</th><th>" + headerRow[1].text + "</th></tr>";

Simple!


1 comment:

  1. Hi,

    Can you please tell me how can we read the shared bookmarks from repository using javascript? I have used the below code but it only fetches the normal bookmarks and not the shared bookmarks

    MyDoc = Qv.GetCurrentDocument();

    MyBookmarks = MyDoc.Bookmarks().BookMarks;

    I will appreciate if you could help

    ReplyDelete

Note: only a member of this blog may post a comment.