﻿<?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 - need to toggle AutoFitColumns from clientside event using Column menu</title><link>http://www.intersoftsolutions.com/Community/WebGrid/need-to-toggle-AutoFitColumns-from-clientside-event-using-Column-menu/</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>need to toggle AutoFitColumns from clientside event using Column menu</title><link>http://www.intersoftsolutions.com/Community/WebGrid/need-to-toggle-AutoFitColumns-from-clientside-event-using-Column-menu/</link><pubDate>Tue, 25 Jul 2017 12:45:13 GMT</pubDate><dc:creator>sjain</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;&lt;p&gt;Please reply as I required to do best fit columns at client side(javascript).&lt;/p&gt;&lt;p&gt;Request had made one year ago, Please do reply ASAP.&lt;/p&gt;&lt;p&gt;when i set to&amp;nbsp;&lt;span style="background-color: rgb(255, 255, 255); color: rgb(51, 51, 51); font-family: myriad_set_protext, &amp;quot;Lucida Grande&amp;quot;, Helvetica, sans-serif; font-size: 16px;"&gt;LayoutSettings.AutoFitColumns = true/false does not work.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="background-color: rgb(255, 255, 255); color: rgb(51, 51, 51); font-family: myriad_set_protext, &amp;quot;Lucida Grande&amp;quot;, Helvetica, sans-serif; font-size: 16px;"&gt;Regards&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="background-color: rgb(255, 255, 255); color: rgb(51, 51, 51); font-family: myriad_set_protext, &amp;quot;Lucida Grande&amp;quot;, Helvetica, sans-serif; font-size: 16px;"&gt;Sachin Jain&lt;/span&gt;&lt;/p&gt;</description></item><item><title>need to toggle AutoFitColumns from clientside event using Column menu</title><link>http://www.intersoftsolutions.com/Community/WebGrid/need-to-toggle-AutoFitColumns-from-clientside-event-using-Column-menu/</link><pubDate>Fri, 20 May 2016 12:42:21 GMT</pubDate><dc:creator>sjain</dc:creator><description>&lt;p&gt;Hi, &lt;br&gt;&lt;/p&gt;&lt;p&gt;I was trying to use BestFit option to toggle AutofitColumns property. Please check my code for what need to do to modify the existing Bestfit option. I can use hiddenfield variable to store last selected option of user. My code is &lt;br&gt;&lt;/p&gt;&lt;p&gt;&lt;br&gt;function WebGrid1_OnColumnContextMenu(controlId, column, menu, isGroup, location) {&lt;br&gt; for (i = 0; i &amp;lt; menu.Items.length; i++) {&lt;br&gt; if (menu.Items[i].Name =="mnuBestFit") {&lt;br&gt; var grid = ISGetObject(controlId);&lt;br&gt;   if( document.getElementById('hdnCurrentBestFit').value == "1")&lt;br&gt;   {&lt;br&gt;    document.getElementById('hdnCurrentBestFit').value = "0";&lt;br&gt;   grid.LayoutSettings.AutoFitColumns = false;&lt;br&gt;   }&lt;br&gt;   else&lt;br&gt;   {&lt;br&gt;    document.getElementById('hdnCurrentBestFit').value = "1";&lt;br&gt;    grid.LayoutSettings.AutoFitColumns = true;&lt;br&gt;   }&lt;br&gt; }&lt;br&gt; }&lt;br&gt; } &lt;br&gt;&lt;/p&gt;&lt;p&gt;regards&lt;/p&gt;&lt;p&gt;Sachin &lt;br&gt;&lt;/p&gt;</description></item></channel></rss>