开发者

Subclassing Slick.Grid

I'm new to SlickGrid, and very happy with it so far. But today I came across one situation I'm not sure how to solve.

I'd like to add some extra HTML markup to every row, a part from the , but I didn't find any way of decorating that HTML, so I was thinking of extendin开发者_Go百科g Slick.Grid to override "appendRowHtml" method.

What inheritance technique would you suggest to do so? Or would you suggest another approach...

thanks in advance,


You could simply redefine the function instead of trying to "subclass" a javascript object. For instance:

Slick.Grid.appendRowHtml = function(...){
    ...
}

To be safe, you should copy over the old function and then work on that, to make sure your function accepts the same parameters and returns similar things. This way you can easily prevent SlickGrid from crashing.

Good luck :)

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜