Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
645
Update tile size at client side
posted

Hi,

I am working on TileManager with the inspiration from your blog post. I have a specific requirement in which the tiles need to be re-sized depending on user action. I was able to show tiles and their content, but when I tried to update tile's size, it didn't work as expected. This is my code:

function ResizeTiles(_percentage)
        {
            var dataSource = @Html.Raw(Json.Encode(Model));

            var percentage = "'" + _percentage + "%'";

            $('#dashboard').igTileManager({
                layoutConfiguration: {
                    gridLayout: {
                        columnWidth: percentage,
                        columnHeight: percentage,
                        marginLeft: 10,
                        marginTop: 10,
                        cols: 1
                    }
                },
                dataSource: dataSource,
                contentTemplate: '<img src="${Link}" />'
            });

            $('#dashboard').igTileManager('reflow');
        }

After ResizeTiles() was called, all tiles disappeared. Please let me know if I did something wrong. Thanks in advance.