iSeller Commerce
iSeller POS Retail
iSeller POS F&B
iSeller POS Express
Crosslight
WebUI
ClientUI
What's New
Download Trial
Web Solution
Mobile Solution
Enterprise Solution
Custom Development
Blog
Community
Latest Development Blogs
ForumPostTopic
Browse By Tag
We are using WebGrid 7 in a SharePoint web part where we are programatically generating web grid object.
we want one of our web grid columns to resize its width automatically based on it content to best fit the content. Is there any out of the box functionality which caters this requirement ?
Thank you.
Hi Gaurav Desai,
Yes, we do have a method to set the column to be a best fit width. We can use ResizeBestFit() in client side event.
However, it will only work for one column at a time. That is why we will need to create a looping for every column to use this method. Here is the snippet to do so:
function window::onload(){ var WebGrid = ISGetObject("WebGrid1"); for(var i = 0 ; i< WebGrid.GetRootTable().Columns.length;i++){ WebGrid.GetRootTable().Columns[i].ResizeBestFit(); } }
I hope it helps. Thank you and have a nice day.
Best Regards,
Andi Santoso
hello Andi,
Thanks for replying. I have tried to resize the column from client side as you suggested in previous reply, but it didnt work for me. i would like to remind you again that we are using the grid in SharePoint web part where we are programatically generating web grid object. The grid is made to hold self reference data. we have also enabled the column freezing feature of the grid. Furthere more, the column which i want to make best fit width, is a part of the freezing columns.
Does it make any diffrence?
I would like you to implement the above scenario and resolve this issue ASAP for me.
Waiting for your kind reply....
Thanks,
G.S
First of all, May I know your SharePoint Version? Does it using XHTML based? If does, there is still an issue with using Resize Bet Fit under XHTML. However, in HTML page, ResizeBestFit is doing just fine. Also, could you kindly give me screenshot of the result please?
Thank you and have a nice day.
Dear Gaurav Desai,
First of all, deeply apologize for the late respond. Regarding your scenario, having a best fit for all columns, it has be enhanced, and now it is working just nicely in XHTML page.
Please kindly apply this nightly build hotfix to your project. Noted that this is still a nightly build hotfix, any feedback of this regarding build is really appreciated. Thank you.
For further information on how to apply these hotfix, you can simply visit http://www.intersoftpt.com/Build/ApplyHotfix.
or
Choose this if you're already a member of Intersoft Community Forum. You can link your OpenID account to your existing Intersoft Social ID.
Choose this if you don't have an Intersoft account yet. Your authenticated OpenID will be automatically linked to your new Intersoft account.
Enter your Wordpress Blogname