﻿<?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 - set position of CustomEditor Slidebar</title><link>http://www.intersoftsolutions.com/Community/WebGrid/set-position-of-CustomEditor-Slidebar/</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>set position of CustomEditor Slidebar</title><link>http://www.intersoftsolutions.com/Community/WebGrid/set-position-of-CustomEditor-Slidebar/</link><pubDate>Thu, 03 Sep 2009 22:54:19 GMT</pubDate><dc:creator>Glayaar</dc:creator><category>WebGrid</category><description>&lt;p&gt;Without modifying the code you could add a mousedown event during enter edit mode to the dropdown icon image to reposition the image. However, it is highly suggested to achieve this feature to modify the unophuscated code.&lt;/p&gt;&lt;p&gt;Here is the snippet, again in the sample I always position the sliderbar in top left corner:&lt;/p&gt;&lt;pre&gt;function WebGrid1_OnEnterEditMode(controlId, tblName, editObject) {&lt;br /&gt;    var grid = ISGetObject(controlId);&lt;br /&gt;&lt;br /&gt;    var dropDownID = editObject.gridId &amp;#43; "_DDSlidebar";&lt;br /&gt;    Listener.Add(document.getElementById(dropDownID), "onmousedown", function() { repositionSlidebar() });&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;function repositionSlidebar() {&lt;br /&gt;    &lt;br /&gt;    t = null;&lt;br /&gt;    &lt;br /&gt;    t = setTimeout(function() {&lt;br /&gt;        document.getElementById("placeholderSlidebar").style.top = "10px";&lt;br /&gt;        document.getElementById("placeholderSlidebar").style.left = "10px";&lt;br /&gt;    }, 100);&lt;br /&gt;}&lt;/pre&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;</description></item><item><title>set position of CustomEditor Slidebar</title><link>http://www.intersoftsolutions.com/Community/WebGrid/set-position-of-CustomEditor-Slidebar/</link><pubDate>Wed, 02 Sep 2009 12:09:12 GMT</pubDate><dc:creator>vangeloni</dc:creator><category>WebGrid</category><description>&lt;p&gt;Hi,&lt;br /&gt;&lt;/p&gt;&lt;p&gt; &lt;/p&gt;
&lt;p&gt;the code is ok, no problem, we are implementing our custom slidebar based on that code. &lt;br /&gt;&lt;/p&gt;
&lt;p&gt;Anyway on current version we are using the standard Slidebar customEditor and we have to change its position for our demo. &lt;br /&gt;&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;Thanks, &lt;br /&gt;&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;Vince &lt;br /&gt;&lt;/p&gt;</description></item><item><title>set position of CustomEditor Slidebar</title><link>http://www.intersoftsolutions.com/Community/WebGrid/set-position-of-CustomEditor-Slidebar/</link><pubDate>Wed, 02 Sep 2009 11:35:58 GMT</pubDate><dc:creator>james</dc:creator><category>WebGrid</category><description>&lt;p&gt;Vince, the code that Glenn provided above should do it. Doesn't that work for you?&lt;/p&gt;&lt;p&gt;- James&lt;/p&gt;</description></item><item><title>set position of CustomEditor Slidebar</title><link>http://www.intersoftsolutions.com/Community/WebGrid/set-position-of-CustomEditor-Slidebar/</link><pubDate>Wed, 02 Sep 2009 04:00:19 GMT</pubDate><dc:creator>vangeloni</dc:creator><category>WebGrid</category><description>&lt;p&gt;ok, thanks.&lt;br /&gt;&lt;/p&gt;&lt;p&gt; &lt;/p&gt;
&lt;p&gt;Anyway using the standard Slidebar, without rewrite it; how to change position? &lt;br /&gt;&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;Thanks, &lt;br /&gt;&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;Vince &lt;br /&gt;&lt;/p&gt;</description></item><item><title>set position of CustomEditor Slidebar</title><link>http://www.intersoftsolutions.com/Community/WebGrid/set-position-of-CustomEditor-Slidebar/</link><pubDate>Wed, 02 Sep 2009 03:37:26 GMT</pubDate><dc:creator>Glayaar</dc:creator><category>WebGrid</category><description>&lt;p&gt;Based on the unophuscated code I attached on &lt;a href="../CustomEditor/" target="_blank"&gt;CustomEditor&lt;/a&gt; thread, the &lt;em&gt;this.OnDropdown&lt;/em&gt; function, line #128, will be responsible to show the slidebar and position it on the screen. These are the original lines to position the slidebar:&lt;br /&gt;&lt;/p&gt;&lt;pre&gt;if (left&amp;#43;width &amp;gt; document.body.offsetWidth)&lt;br /&gt;  ddObj.style.left = left - ((left&amp;#43;width) - document.body.offsetWidth) - 50;&lt;br /&gt;&lt;br /&gt;if (top&amp;#43;height &amp;gt; document.body.offsetHeight) {&lt;br /&gt;  var pTop = top - ((top&amp;#43;height) - document.body.offsetHeight) - 20;&lt;br /&gt;  if (pTop &amp;lt; 0) pTop = 25;&lt;br /&gt;  ddObj.style.top = pTop;&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;p&gt;For example if you wanted to always position the slidebar 10px from the left and top of the page, please modify the line above to these lines:&lt;/p&gt;&lt;pre&gt;ddObj.style.left = "10px";&lt;br /&gt;ddObj.style.top = "10px";&lt;br /&gt;&lt;/pre&gt;</description></item><item><title>set position of CustomEditor Slidebar</title><link>http://www.intersoftsolutions.com/Community/WebGrid/set-position-of-CustomEditor-Slidebar/</link><pubDate>Wed, 02 Sep 2009 02:54:34 GMT</pubDate><dc:creator>vangeloni</dc:creator><category>WebGrid</category><description>&lt;p&gt;Hi,&lt;br /&gt;&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;how to set the top and left offset for the customEditor Slidebar, in order to change the position where the slidebar appear. &lt;br /&gt;&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;Thanks, &lt;br /&gt;&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;Vince &lt;br /&gt;&lt;/p&gt;</description></item></channel></rss>