<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Data Grid - Changing Column Widths? in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/data-grid-changing-column-widths/m-p/571350#M53259</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you John! That did the trick. CSS is challenging for me sometimes....&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 14 Oct 2016 00:39:37 GMT</pubDate>
    <dc:creator>IanPeebles</dc:creator>
    <dc:date>2016-10-14T00:39:37Z</dc:date>
    <item>
      <title>Data Grid - Changing Column Widths?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/data-grid-changing-column-widths/m-p/571348#M53257</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am populating an array that contains fields and labels that will be used in a data grid. &amp;nbsp;I am working with the ESRI sample, and I am trying to change the width of the columns for each attribute, but have not had any luck.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is the block of code:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;var columns = [&lt;BR /&gt; {'field': 'PARCELID', 'label': "Parcel ID"},&lt;BR /&gt; {'field': 'OWNERNME1', 'label': 'Owner 1'},&lt;BR /&gt; {'field': 'OWNERNME2', 'label': 'Owner 2'},&lt;BR /&gt; {'field': 'RESYRBLT', 'label': 'Year Built'},&lt;BR /&gt; {'field': 'SITEADDRESS', 'label': 'Street Address', 'width': '50'} &lt;BR /&gt; ];&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The fields all remain the same width within the application. &amp;nbsp;I am testing with this sample:&lt;/P&gt;&lt;P&gt;Here is the sample I am looking at:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A class="link-titled" href="https://developers.arcgis.com/javascript/3/samples/find_map_datagrid/" title="https://developers.arcgis.com/javascript/3/samples/find_map_datagrid/"&gt;Display Find Task results in Dojo DataGrid&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I just cannot get the column widths to change. &amp;nbsp;Anyone have any ideas?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 13 Oct 2016 21:30:26 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/data-grid-changing-column-widths/m-p/571348#M53257</guid>
      <dc:creator>IanPeebles</dc:creator>
      <dc:date>2016-10-13T21:30:26Z</dc:date>
    </item>
    <item>
      <title>Re: Data Grid - Changing Column Widths?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/data-grid-changing-column-widths/m-p/571349#M53258</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try setting the width via css:&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;&lt;SPAN class="selector token"&gt;.field-PARCELID&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="property token"&gt;width&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt;300px &lt;SPAN class="important token"&gt;!important&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
 &lt;SPAN class="punctuation token"&gt;}&lt;/SPAN&gt;&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 00:34:45 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/data-grid-changing-column-widths/m-p/571349#M53258</guid>
      <dc:creator>JohnGrayson</dc:creator>
      <dc:date>2021-12-12T00:34:45Z</dc:date>
    </item>
    <item>
      <title>Re: Data Grid - Changing Column Widths?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/data-grid-changing-column-widths/m-p/571350#M53259</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you John! That did the trick. CSS is challenging for me sometimes....&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 14 Oct 2016 00:39:37 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/data-grid-changing-column-widths/m-p/571350#M53259</guid>
      <dc:creator>IanPeebles</dc:creator>
      <dc:date>2016-10-14T00:39:37Z</dc:date>
    </item>
    <item>
      <title>Re: Data Grid - Changing Column Widths?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/data-grid-changing-column-widths/m-p/571351#M53260</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can also change the width of a column programmatically.&amp;nbsp; Paste these lines in the &lt;A href="https://developers.arcgis.com/javascript/3/sandbox/sandbox.html?sample=find_map_datagrid" rel="nofollow noopener noreferrer" target="_blank"&gt;sandbox sample&lt;/A&gt; right after creating the grid.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;grid&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;addCssRule&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"#"&lt;/SPAN&gt; &lt;SPAN class="operator token"&gt;+&lt;/SPAN&gt; grid&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;id &lt;SPAN class="operator token"&gt;+&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;" .field-SITEADDRESS"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"width: 50px"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
grid&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;resize&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 00:34:47 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/data-grid-changing-column-widths/m-p/571351#M53260</guid>
      <dc:creator>KenBuja</dc:creator>
      <dc:date>2021-12-12T00:34:47Z</dc:date>
    </item>
    <item>
      <title>Re: Data Grid - Changing Column Widths?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/data-grid-changing-column-widths/m-p/571352#M53261</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you for this additional information.&amp;nbsp; This is helpful.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 14 Oct 2016 14:36:03 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/data-grid-changing-column-widths/m-p/571352#M53261</guid>
      <dc:creator>IanPeebles</dc:creator>
      <dc:date>2016-10-14T14:36:03Z</dc:date>
    </item>
    <item>
      <title>Re: Data Grid - Changing Column Widths?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/data-grid-changing-column-widths/m-p/571353#M53262</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello, I have one more question.&amp;nbsp; Given we can define the width of a field in .css, can we also set the width by default and make the field width adjustable as well, meaning if by default a field is 100px, but I can use the left mouse click to widen the field to 200, 300, or 400px?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is that possible?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 17 Oct 2016 14:58:36 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/data-grid-changing-column-widths/m-p/571353#M53262</guid>
      <dc:creator>IanPeebles</dc:creator>
      <dc:date>2016-10-17T14:58:36Z</dc:date>
    </item>
    <item>
      <title>Re: Data Grid - Changing Column Widths?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/data-grid-changing-column-widths/m-p/571354#M53263</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;In the Esri example the css is &lt;A href="https://js.arcgis.com/3.18/dgrid/css/dgrid.css"&gt;https://js.arcgis.com/3.18/dgrid/css/dgrid.css, &lt;/A&gt;&lt;/P&gt;&lt;P&gt;you can open this can copy/paste it to &lt;A href="http://jsbeautifier.org/"&gt;http://jsbeautifier.org/&lt;/A&gt; so you can read the current css. Change what you want, save it as a new css file, then use the new css in your project. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 17 Oct 2016 15:12:28 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/data-grid-changing-column-widths/m-p/571354#M53263</guid>
      <dc:creator>BillChappell</dc:creator>
      <dc:date>2016-10-17T15:12:28Z</dc:date>
    </item>
  </channel>
</rss>

