﻿<?xml version="1.0" encoding="utf-8"?><rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:sy="http://purl.org/rss/1.0/modules/syndication/" xmlns:media="http://search.yahoo.com/mrss/" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0"><channel><title>Intersoft Community - WebGrid Enterprise - How to adjust column width to best fit its contents automatically ?</title><link>http://www.intersoftsolutions.com/Community/WebGrid/How-to-adjust-column-width-to-best-fit-its-contents-automatically-/</link><description /><generator>http://www.intersoftsolutions.com</generator><language>en</language><copyright>Copyright 2002 - 2015 Intersoft Solutions Corp. All rights reserved.</copyright><ttl>60</ttl><item><title>How to adjust column width to best fit its contents automatically ?</title><link>http://www.intersoftsolutions.com/Community/WebGrid/How-to-adjust-column-width-to-best-fit-its-contents-automatically-/</link><pubDate>Sun, 14 Nov 2010 22:19:03 GMT</pubDate><dc:creator>andi@intersoftpt.com</dc:creator><description>&lt;p&gt;&lt;span style="font-size: 9pt; "&gt;Dear Gaurav Desai,&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-size: 9pt; "&gt;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.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size: 9pt; "&gt;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.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size: 9pt; "&gt;For further information on how to apply these hotfix, you can simply visit&amp;nbsp;&lt;a href="http://www.intersoftpt.com/Build/ApplyHotfix"&gt;http://www.intersoftpt.com/Build/ApplyHotfix&lt;/a&gt;.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size: 9pt; "&gt;I hope it helps. Thank you and have a nice day.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size: 9pt; "&gt;Best Regards,&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size: 9pt; "&gt;Andi Santoso&lt;/span&gt;&lt;/p&gt;</description></item><item><title>How to adjust column width to best fit its contents automatically ?</title><link>http://www.intersoftsolutions.com/Community/WebGrid/How-to-adjust-column-width-to-best-fit-its-contents-automatically-/</link><pubDate>Fri, 09 Apr 2010 00:16:19 GMT</pubDate><dc:creator>andi@intersoftpt.com</dc:creator><description>&lt;p&gt;&lt;span style="font-size: 9pt; "&gt;Hi Gaurav Desai,&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-size: 9pt; "&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; 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?&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size: 9pt; "&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; Thank you and have a nice day.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size: 9pt; "&gt;Best Regards,&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size: 9pt; "&gt;Andi Santoso&lt;/span&gt;&lt;/p&gt;</description></item><item><title>How to adjust column width to best fit its contents automatically ?</title><link>http://www.intersoftsolutions.com/Community/WebGrid/How-to-adjust-column-width-to-best-fit-its-contents-automatically-/</link><pubDate>Thu, 08 Apr 2010 12:33:25 GMT</pubDate><dc:creator>desaigs81</dc:creator><description>&lt;p&gt;hello Andi,&lt;/p&gt;&lt;p&gt; 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 &lt;strong&gt;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&lt;/strong&gt; &lt;strong&gt;data&lt;/strong&gt;. &lt;strong&gt; &lt;/strong&gt;we have also enabled &lt;strong&gt;the column freezing feature&lt;/strong&gt; of the grid. Furthere more, the column which i want to make best fit width&lt;span style="font-size: 9pt;"&gt;, &lt;/span&gt;is a part of the freezing columns. &lt;br /&gt;&lt;/p&gt;
&lt;p&gt;Does it make any diffrence?&lt;/p&gt;
&lt;p&gt;I would like you to implement the above scenario and resolve this issue ASAP for me. &lt;br /&gt;&lt;/p&gt;
&lt;p&gt;Waiting for your kind reply....&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;Thanks,&lt;/p&gt;
&lt;p&gt;G.S&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;&lt;/p&gt;</description></item><item><title>How to adjust column width to best fit its contents automatically ?</title><link>http://www.intersoftsolutions.com/Community/WebGrid/How-to-adjust-column-width-to-best-fit-its-contents-automatically-/</link><pubDate>Tue, 30 Mar 2010 03:03:35 GMT</pubDate><dc:creator>andi@intersoftpt.com</dc:creator><description>&lt;p&gt;&lt;span style="font-size: 9pt; "&gt;Hi Gaurav Desai,&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-size: 9pt; "&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp;Yes, we do have a method to set the column to be a best fit width. We can use ResizeBestFit() in client side event.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size: 9pt; "&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp;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:&lt;/span&gt;&lt;/p&gt;
&lt;p /&gt;&lt;pre&gt;&lt;span style="font-size: 9pt; "&gt;        function window::onload(){
              
              var WebGrid = ISGetObject("WebGrid1");
                                 
              for(var i = 0 ; i&amp;lt; WebGrid.GetRootTable().Columns.length;i&amp;#43;&amp;#43;){
                    
                    WebGrid.GetRootTable().Columns[i].ResizeBestFit();
              
              }
              
        }&lt;/span&gt;&lt;/pre&gt;
&lt;p&gt;&lt;span style="font-size: 9pt; "&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp;I hope it helps. Thank you and have a nice day.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size: 9pt; "&gt;Best Regards,&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size: 9pt; "&gt;Andi Santoso&lt;/span&gt;&lt;/p&gt;
&lt;p /&gt;</description></item><item><title>How to adjust column width to best fit its contents automatically ?</title><link>http://www.intersoftsolutions.com/Community/WebGrid/How-to-adjust-column-width-to-best-fit-its-contents-automatically-/</link><pubDate>Mon, 29 Mar 2010 06:08:08 GMT</pubDate><dc:creator>desaigs81</dc:creator><description>&lt;p&gt;We are using WebGrid 7 in a SharePoint web part where we are programatically generating web grid object.&lt;/p&gt;
&lt;p&gt;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 ?&lt;/p&gt;
&lt;p&gt;Thank you.&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;&lt;/p&gt;</description></item></channel></rss>