﻿<?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 - Changing header width staggers columns</title><link>http://www.intersoftsolutions.com/Community/WebGrid/Changing-header-width-staggers-columns/</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>Changing header width staggers columns</title><link>http://www.intersoftsolutions.com/Community/WebGrid/Changing-header-width-staggers-columns/</link><pubDate>Wed, 12 Sep 2012 22:51:02 GMT</pubDate><dc:creator>handy@intersoftpt.com</dc:creator><description>&lt;p&gt;Hello Udayan,&lt;/p&gt;&lt;p&gt;That should be not happened if you use the correct way to implement your structure. I attached my sample. As you can see even though I moved the columns, they would be still persisted after accept changes. If you have a different result, please let us know or send us your simple runable sample that replicates this issue.&lt;/p&gt;
&lt;p&gt;Regards,&lt;br /&gt;Handy&lt;/p&gt;</description></item><item><title>Changing header width staggers columns</title><link>http://www.intersoftsolutions.com/Community/WebGrid/Changing-header-width-staggers-columns/</link><pubDate>Wed, 12 Sep 2012 16:50:48 GMT</pubDate><dc:creator>UPratap@dow.com</dc:creator><description>&lt;p&gt;I am still not able to solve the second part of the problem. Follow the following steps -&lt;/p&gt;
&lt;p&gt;a) Databind to the Webgrid.&lt;/p&gt;
&lt;p&gt;b) Change the position of the columns. (&lt;span style="font-family: consolas; color: #ff0000; font-size: 13px"&gt;&lt;span style="font-family: consolas; color: #ff0000; font-size: 13px"&gt;&lt;span style="font-family: consolas; color: #ff0000; font-size: 13px"&gt;AllowColumnMove&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: consolas; color: #0000ff; font-size: 13px"&gt;&lt;span style="font-family: consolas; color: #0000ff; font-size: 13px"&gt;&lt;span style="font-family: consolas; color: #0000ff; font-size: 13px"&gt;="Yes")&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;c) change the value of one of the cells of one of the columns.&lt;/p&gt;
&lt;p&gt;d) Click Accept All Changes for Batch Update.&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;You ll see that the column headers remain as-is but the column values come in the wrong position, as if the data and the column Name are disassociated. &lt;/p&gt;
&lt;p&gt;Please let me know how to solve it.&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;Thanks&lt;/p&gt;
&lt;p&gt;Udayan&lt;/p&gt;</description></item><item><title>Changing header width staggers columns</title><link>http://www.intersoftsolutions.com/Community/WebGrid/Changing-header-width-staggers-columns/</link><pubDate>Wed, 12 Sep 2012 16:34:36 GMT</pubDate><dc:creator>UPratap@dow.com</dc:creator><description>&lt;p&gt;Hi Bernard,&lt;/p&gt;
&lt;p&gt;Great solution. I have done some changes to the client-side functions and they work absolutely fine. If you see the code, you ll find that I have done minor changes in the AfterResponseProcess. I found that actionName should be 'Refresh' and not 'BatchUpdate' because the function is fired twice once after the BatchUpdate and once when the grid retrieves the data during the refresh.&lt;/p&gt;
&lt;p&gt; &lt;span style="font-family: consolas; font-size: 13px"&gt;&lt;span style="font-family: consolas; font-size: 13px"&gt;&lt;span style="font-family: consolas; color: #0000ff; font-size: 13px"&gt;&lt;span style="font-family: consolas; color: #0000ff; font-size: 13px"&gt;&lt;span style="font-family: consolas; color: #0000ff; font-size: 13px"&gt;
var&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: consolas; font-size: 13px"&gt;&lt;span style="font-family: consolas; font-size: 13px"&gt; widthCol = &lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: consolas; color: #0000ff; font-size: 13px"&gt;&lt;span style="font-family: consolas; color: #0000ff; font-size: 13px"&gt;&lt;span style="font-family: consolas; color: #0000ff; font-size: 13px"&gt;new&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: consolas; font-size: 13px"&gt;&lt;span style="font-family: consolas; font-size: 13px"&gt; Array();&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: consolas; color: #0000ff; font-size: 13px"&gt;&lt;span style="font-family: consolas; color: #0000ff; font-size: 13px"&gt;&lt;span style="font-family: consolas; color: #0000ff; font-size: 13px"&gt;function&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: consolas; font-size: 13px"&gt;&lt;span style="font-family: consolas; font-size: 13px"&gt; BatchUpdateSuccess(controlId, hasPartialErrors, partialErrorsXml) {&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: consolas; color: #0000ff; font-size: 13px"&gt;&lt;span style="font-family: consolas; color: #0000ff; font-size: 13px"&gt;&lt;span style="font-family: consolas; color: #0000ff; font-size: 13px"&gt;var&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: consolas; font-size: 13px"&gt;&lt;span style="font-family: consolas; font-size: 13px"&gt; WebGrid1 = ISGetObject(&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: consolas; color: #800000; font-size: 13px"&gt;&lt;span style="font-family: consolas; color: #800000; font-size: 13px"&gt;&lt;span style="font-family: consolas; color: #800000; font-size: 13px"&gt;"WebGrid1"&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: consolas; font-size: 13px"&gt;&lt;span style="font-family: consolas; font-size: 13px"&gt;);&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: consolas; color: #006400; font-size: 13px"&gt;&lt;span style="font-family: consolas; color: #006400; font-size: 13px"&gt;&lt;span style="font-family: consolas; color: #006400; font-size: 13px"&gt;//get header width and push it into array
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: consolas; font-size: 13px"&gt;&lt;span style="font-family: consolas; font-size: 13px"&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: consolas; color: #0000ff; font-size: 13px"&gt;&lt;span style="font-family: consolas; color: #0000ff; font-size: 13px"&gt;&lt;span style="font-family: consolas; color: #0000ff; font-size: 13px"&gt;var&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: consolas; font-size: 13px"&gt;&lt;span style="font-family: consolas; font-size: 13px"&gt; headerElement = WebGrid1.GetFrameElement().children[1].children[0].children[0].children[0];&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: consolas; color: #0000ff; font-size: 13px"&gt;&lt;span style="font-family: consolas; color: #0000ff; font-size: 13px"&gt;&lt;span style="font-family: consolas; color: #0000ff; font-size: 13px"&gt;for&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: consolas; font-size: 13px"&gt;&lt;span style="font-family: consolas; font-size: 13px"&gt; (&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: consolas; color: #0000ff; font-size: 13px"&gt;&lt;span style="font-family: consolas; color: #0000ff; font-size: 13px"&gt;&lt;span style="font-family: consolas; color: #0000ff; font-size: 13px"&gt;var&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: consolas; font-size: 13px"&gt;&lt;span style="font-family: consolas; font-size: 13px"&gt; i = 0; i &amp;lt; headerElement.children.length - 2; i&amp;#43;&amp;#43;)&lt;p&gt;widthCol.push(headerElement.children[i].offsetWidth);&lt;/p&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: consolas; color: #0000ff; font-size: 13px"&gt;&lt;span style="font-family: consolas; color: #0000ff; font-size: 13px"&gt;&lt;span style="font-family: consolas; color: #0000ff; font-size: 13px"&gt;return&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: consolas; font-size: 13px"&gt;&lt;span style="font-family: consolas; font-size: 13px"&gt; &lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: consolas; color: #0000ff; font-size: 13px"&gt;&lt;span style="font-family: consolas; color: #0000ff; font-size: 13px"&gt;&lt;span style="font-family: consolas; color: #0000ff; font-size: 13px"&gt;true&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: consolas; font-size: 13px"&gt;&lt;span style="font-family: consolas; font-size: 13px"&gt;;&lt;p&gt;}&lt;/p&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: consolas; color: #0000ff; font-size: 13px"&gt;&lt;span style="font-family: consolas; color: #0000ff; font-size: 13px"&gt;&lt;span style="font-family: consolas; color: #0000ff; font-size: 13px"&gt;function&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: consolas; font-size: 13px"&gt;&lt;span style="font-family: consolas; font-size: 13px"&gt; AfterReponseProcess(controlId, actionName, lastRequestObject, xmlResponseObject) {&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: consolas; color: #0000ff; font-size: 13px"&gt;&lt;span style="font-family: consolas; color: #0000ff; font-size: 13px"&gt;&lt;span style="font-family: consolas; color: #0000ff; font-size: 13px"&gt;var&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: consolas; font-size: 13px"&gt;&lt;span style="font-family: consolas; font-size: 13px"&gt; WebGrid1 = ISGetObject(&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: consolas; color: #800000; font-size: 13px"&gt;&lt;span style="font-family: consolas; color: #800000; font-size: 13px"&gt;&lt;span style="font-family: consolas; color: #800000; font-size: 13px"&gt;"WebGrid1"&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: consolas; font-size: 13px"&gt;&lt;span style="font-family: consolas; font-size: 13px"&gt;);&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: consolas; color: #006400; font-size: 13px"&gt;&lt;span style="font-family: consolas; color: #006400; font-size: 13px"&gt;&lt;span style="font-family: consolas; color: #006400; font-size: 13px"&gt;//after Refresh set all the colgroup with array
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: consolas; font-size: 13px"&gt;&lt;span style="font-family: consolas; font-size: 13px"&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: consolas; color: #0000ff; font-size: 13px"&gt;&lt;span style="font-family: consolas; color: #0000ff; font-size: 13px"&gt;&lt;span style="font-family: consolas; color: #0000ff; font-size: 13px"&gt;if&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: consolas; font-size: 13px"&gt;&lt;span style="font-family: consolas; font-size: 13px"&gt; (actionName == &lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: consolas; color: #800000; font-size: 13px"&gt;&lt;span style="font-family: consolas; color: #800000; font-size: 13px"&gt;&lt;span style="font-family: consolas; color: #800000; font-size: 13px"&gt;"Refresh"&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: consolas; font-size: 13px"&gt;&lt;span style="font-family: consolas; font-size: 13px"&gt;) {&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: consolas; color: #0000ff; font-size: 13px"&gt;&lt;span style="font-family: consolas; color: #0000ff; font-size: 13px"&gt;&lt;span style="font-family: consolas; color: #0000ff; font-size: 13px"&gt;var&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: consolas; font-size: 13px"&gt;&lt;span style="font-family: consolas; font-size: 13px"&gt; colGroup = WebGrid1.GetFrameElement().children[2].children[0].children[0];&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: consolas; color: #0000ff; font-size: 13px"&gt;&lt;span style="font-family: consolas; color: #0000ff; font-size: 13px"&gt;&lt;span style="font-family: consolas; color: #0000ff; font-size: 13px"&gt;if&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: consolas; font-size: 13px"&gt;&lt;span style="font-family: consolas; font-size: 13px"&gt; (widthCol != &lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: consolas; color: #0000ff; font-size: 13px"&gt;&lt;span style="font-family: consolas; color: #0000ff; font-size: 13px"&gt;&lt;span style="font-family: consolas; color: #0000ff; font-size: 13px"&gt;null&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: consolas; font-size: 13px"&gt;&lt;span style="font-family: consolas; font-size: 13px"&gt; &amp;&amp; widthCol.length !=0) {&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: consolas; color: #0000ff; font-size: 13px"&gt;&lt;span style="font-family: consolas; color: #0000ff; font-size: 13px"&gt;&lt;span style="font-family: consolas; color: #0000ff; font-size: 13px"&gt;for&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: consolas; font-size: 13px"&gt;&lt;span style="font-family: consolas; font-size: 13px"&gt; (&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: consolas; color: #0000ff; font-size: 13px"&gt;&lt;span style="font-family: consolas; color: #0000ff; font-size: 13px"&gt;&lt;span style="font-family: consolas; color: #0000ff; font-size: 13px"&gt;var&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: consolas; font-size: 13px"&gt;&lt;span style="font-family: consolas; font-size: 13px"&gt; i = 0; i &amp;lt; colGroup.children.length - 2; i&amp;#43;&amp;#43;)&lt;p&gt;colGroup.children[i].width = widthCol[i];&lt;/p&gt;&lt;p&gt;widthCol.length = 0;&lt;/p&gt;&lt;p&gt;}&lt;/p&gt;&lt;p&gt;}&lt;/p&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: consolas; color: #0000ff; font-size: 13px"&gt;&lt;span style="font-family: consolas; color: #0000ff; font-size: 13px"&gt;&lt;span style="font-family: consolas; color: #0000ff; font-size: 13px"&gt;return&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: consolas; font-size: 13px"&gt;&lt;span style="font-family: consolas; font-size: 13px"&gt; &lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: consolas; color: #0000ff; font-size: 13px"&gt;&lt;span style="font-family: consolas; color: #0000ff; font-size: 13px"&gt;&lt;span style="font-family: consolas; color: #0000ff; font-size: 13px"&gt;true&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: consolas; font-size: 13px"&gt;&lt;span style="font-family: consolas; font-size: 13px"&gt;;&lt;p&gt;}&lt;/p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;This brings us to the question - what ll happen when the user clicks refresh. Hence, I have put a check for widthCol !=null and widthCol.lenght !=0.
</description></item><item><title>Changing header width staggers columns</title><link>http://www.intersoftsolutions.com/Community/WebGrid/Changing-header-width-staggers-columns/</link><pubDate>Wed, 12 Sep 2012 02:38:18 GMT</pubDate><dc:creator>bernard</dc:creator><description>&lt;p&gt;Hi Udayan,&lt;/p&gt;&lt;p&gt;I can replicate your issue here. But for this issue, I've made my workaround to set the colgroup width after you do BatchUpdate. I also attach the sample here. Could you look for my code and tell me if there's some misconfiguration on my code? &lt;/p&gt;
&lt;p&gt;Or you use if(!IsPostBack), when you set the structure of WebGrid (if you don't want to get the WebGrid structure continously). Look forward to hear any feedback from you so I can help you further.&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;Regards,&lt;/p&gt;
&lt;p&gt;Bernard&lt;/p&gt;</description></item><item><title>Changing header width staggers columns</title><link>http://www.intersoftsolutions.com/Community/WebGrid/Changing-header-width-staggers-columns/</link><pubDate>Tue, 11 Sep 2012 23:39:12 GMT</pubDate><dc:creator>UPratap@dow.com</dc:creator><description>&lt;p&gt;Hi Bernard,&lt;/p&gt;
&lt;p&gt;I am using IE8 and am doing the following -&lt;/p&gt;
&lt;p&gt;a) Databind to the Webgrid.&lt;/p&gt;
&lt;p&gt;b) Increase the width of one of the columns by dragging the column.&lt;/p&gt;
&lt;p&gt;c) changing the value of one of the cells of that column.&lt;/p&gt;
&lt;p&gt;d) Clicking Accept All Changes for Batch Update.&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;Even if you change the position of the column (say from position 1 to 2) and do the changes in one of the cells, after batch update, the column doesnt show up under the column heading. i.e. The column list shows Column A in position 1 and Column B in position 2 but the data for column A shows below column B and so forth.&lt;/p&gt;
&lt;p&gt;btw I am generating the view dynamically i.e. I dont have the columns listed in the design time. Also, please give me some code snippet of how to use OnBatchUpdateSuccess event.&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;Thanks&lt;/p&gt;
&lt;p&gt;Udayan&lt;/p&gt;</description></item><item><title>Changing header width staggers columns</title><link>http://www.intersoftsolutions.com/Community/WebGrid/Changing-header-width-staggers-columns/</link><pubDate>Tue, 11 Sep 2012 01:49:23 GMT</pubDate><dc:creator>bernard</dc:creator><description>&lt;p&gt;Hi Udayan,&lt;/p&gt;&lt;p&gt;I couldn't replicate you issue in our local end. Could you let me know the steps and browser that you used to replicate this issue in our local end? Maybe to resolve this problem, you can set the width of the row OnBatchUpdateSuccess event from filterRow. But it will be more certain if I can replicate this issue in our local end so I can give you solution that might work in your project.&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;Regards,&lt;/p&gt;
&lt;p&gt;Bernard&lt;/p&gt;</description></item><item><title>Changing header width staggers columns</title><link>http://www.intersoftsolutions.com/Community/WebGrid/Changing-header-width-staggers-columns/</link><pubDate>Mon, 10 Sep 2012 11:06:57 GMT</pubDate><dc:creator>UPratap@dow.com</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;I am struggling to fix a very weird scenario during the batch update -&lt;/p&gt;
&lt;p&gt;When changing the width of the column header the header portion of the column becomes offset from the data portion of the column.​  &lt;/p&gt;
&lt;p&gt;Please have a look at the screen-shots and let me know a way to solve it.&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;-Udayan&lt;/p&gt;</description></item></channel></rss>