That's a fantastic solution, and I'd like to try it; however I don't have access to the datagrid code. I was wondering if there was any way to hyperlink field comments to open a pop up window containing the same comments.Thanks again,Kate.
Hi there,We have a widget in our web app that returns results in a datagrid. We do not have access to the source code, and the "Comments" field populates the grid in a single line (which can be quite long). As a work around, I am wondering if there is a way to click the attribute info in the "Comments" field (I can make the field a hyperlink field) and run a script from the hyperlink script dialog to pop open a window displaying the "Comments" attribute info (same info that was clicked).The hyperlink script dialog accepts JScript and VBScript, however I'm unsure how to approach this.Any suggestions would be appreciated,Kate.
... <div style="width: 650px; height: 400px"> <table id="billsGrid" dojoType="dojox.grid.DataGrid" sortInfo="2"> <thead> <tr> <th field="ConflictID" formatter="makeviewButton" width="20px">View feature</th> <th field="Oid" width="150px">OID</th> <th field="InVersion" width="150px">Version</th> <th field="ChangeType" width="150px">Change Type</th> </tr> </thead> </table> </div> ... <script type="text/javascript"> dojo.ready(function() { var conflictCollection ={"items":[{"InVersion":"GDP_OWN.DataEditing_1","ChangeType":"Delete","Oid":4614,"ConflictID":"1-4614-GDP_OWN.DataEditing_1"},{"InVersion":"GDP_OWN.DataEditing_2","ChangeType":"Update","Oid":4614,"ConflictID":"2-4614-GDP_OWN.DataEditing_2"}]}; var dataStore = new dojo.data.ItemFileReadStore({ data:conflictCollection }); var grid = dijit.byId("billsGrid"); grid.setStore(dataStore); }); function makeviewButton(id){ var strArray =id.split("-"); var oid =strArray[1]; var version =strArray[2]; var vBtn = "<div dojoType='dijit.form.Button'><img src='view.png'"; vBtn = vBtn + " width='18' height='18'"; vBtn = vBtn + " onClick=\"viewRow("+oid+", '"+version +"')\"></div>"; //alert(vBtn); return vBtn; } function viewRow(oid, version) { alert("oid=" +oid +"; version="+version); } </script>
Aangemelde leden kunnen berichten plaatsen, updates volgen en meer. Nieuw hier? Registreer een gratis account.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.