Comments (11)
@EToreo Please check out the dijit_layout tests in the test directory. Also, can you provide a test to illustrate this problem that will be able to run stand-alone?
Thanks!
from dgrid.
Chris,
Here is my code that gives the funny drawing. I don't have time at the moment to create a full test case.
This code takes place in an inherited from BorderContainer's postscript function:
var pBaseCp = new BaseCp({ // Content pane
region: "center",
style: "height:40%; width:100%",
splitter: "false",
});
this.mInstantiatedAttributesGrid = new Grid({ //dgrid
mLayout: this,
mInstantiatedClass: this.mInstantiatedClass
}, pBaseCp.domNode);
this.addChild(pBaseCp);
this.mStackContainer = new sddm.tabstrip.InstantiatedAttributes({
region: "bottom",
style: "height:60%; width:100%",
splitter: "false"
});
this.addChild(this.mStackContainer);
this.mInstantiatedAttributesGrid.startup();
this.mStackContainer.startup();
from dgrid.
This code takes place in an inherited from BorderContainer's postscript function
@EToreo do you really mean postscript
or do you mean postCreate
? you should be doing it in postCreate
from dgrid.
you also don't need to explicitly call startup
for widgets added via addChild
. their startup
will be called at an appropriate time based on when startup
is called for the parent. whenever you can get a chance to make a complete test case it would help - there are many nuances that might not be the same without a complete test case.
from dgrid.
Well, making these changes didn't help. I will try to make a test case tomorrow for you. Thanks for the advice.
from dgrid.
Neon and Chris,
I have not yet been able to reproduce this in a stand alone test case. I will keep trying. I can tell you though, that the normal enhanced grid was working in the exact same spot in the GUI and when replaced with the dgrid, it gives this visual output:
![Broken dgrid](http://tinypic.com/r/346nl90/5
As you can see, the dgrid header is offset down and the dgrid body is offset to the right (and maybe down).
from dgrid.
Well, I have a working test case, but its kinda involved... But if you nest the Dgrid in a bunch of cascading Boarder Containers and Tab Containers (and Content Panes), each time the Dgrid's body gets more and more offset from the header.
Is this enough, or would you like me to find a way to get you a full test case?
from dgrid.
can you make a jsfiddle that shows this or provide the code in a gist?
from dgrid.
@neonstalwart In the coarse of cleaning up my test case for a posting on gist, I managed to fix my problem. I think it was a combination of using the DijitRegistry plugin and setting the content of my wrapping content pane instead of using "appendNode". Seems like using "myConetentPane.domNode.appendNode(myDgrid.domNode)" should work just as well as setting the content of the wrapping content pane, but I will leave that up you you guys.
However, I did run into a different (maybe related bug) seen in this gist: https://gist.github.com/2029242
I will let you take a look (there is a comment marking where the error will occur) and decide if you would like to open a new defect or not - I think one could argue that the bug in the gist I just linked is not a bug because of the lackluster dijit support of dgrid.
Thanks everyone for your help on this issue. Its always nice to have patient people like yourselves to work with.
from dgrid.
I feel silly. "myConetentPane.domNode.appendNode(myDgrid.domNode)" does work. I meant to say that passing the dom node that I wish to attach to dgrid to as the 2nd argument to the dgrid constructor does not work. Seems like it should, as every other gadget seems to work as such.
from dgrid.
You're explicitly attempting to pass the domNode
of another widget as the node that the grid will replace with its own DOM. I wouldn't expect this to work with any dijit widget, either.
What you can do is either pre-render a child node within the ContentPane and have the grid replace that, or do what e.g. the dijit_layout_programmatic
test does and actually set the grid as the ContentPane's content
, taking advantage of the fact that ContentPane will accept content
that looks like a widget object.
Given that this thread has evolved a bit, I'm closing it, with the suggestion that any new questions deserve a new thread. If I've failed to answer your most recent question here though, let me know.
from dgrid.
Related Issues (20)
- ColumnSets with CompoundColumns and ColumnResizer does not always resize correctly.
- horizontal scrolling alignment issue dgrid
- horizontal HOT 1
- rowindex HOT 1
- Is this project still maintained? HOT 2
- DGrid 'select all' checkbox is not working as expected HOT 2
- OnDemandList does not refresh on store.setData HOT 2
- build issues with dojo 1.16 HOT 7
- Editor focusout handler is stopped when a row is removed
- CheckBox Editor does not work as expected in Safari HOT 3
- Removed row handing in Editor onblur HOT 2
- Editor: browser blur with active Select leads to bugged editor
- Update Intern from 3 to 4
- (ColumnSet +) CompoundColumns_findSortArrowParent(field) fails to find parent out of the 1st column set
- Website still points to v1.2.1
- Dgrid selector inconsistently working in touch screen devices like ipad dgrid/v1.1.0 HOT 10
- dgrid version 1.3.3 is breaking formatter function in dgrid HOT 2
- How to set dgrid editor checkbox readonly conditionally ?
- dgrid does not throw error on scroll (http-status-code) HOT 2
- dgrid.cell().element is undefined
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from dgrid.