First of all 'what is the grainline?' The grainline is the term given to the direction of the threads that run the length of your fabric. They are the parallel lines that run from selvedge to selvedge and give your cloth stability.
In the weaving process these threads are called the warp. They are threaded onto the loom first and drawn tight onto a roller mechanism. The threads that are woven through the warp and run from side to side are called the weft. As the fabric is woven, the rollers turn, rolling the woven cloth onto one roller and releasing more warp for weaving from the other roller. This is a continuous process but the warp is always held taught. This tension is what keeps the threads parallel.
Sewing patterns will show the grain line on each pattern piece. Usually you should position this grain line parallel to the selvedge edge. For trousers it is very important that the grainline is followed, if not the finished garment leg can twist around your leg making your trousers uncomfortable to wear as they will not 'hang' correctly. However with some fabrics and styles the grain line can be placed in the opposite direction on the fabric, following the weft threads or 'cross grain' With one of the Maker's Atelier patterns I have placed the grain line to run across the body and down the length of the grown-on sleeves. This is contrary to best sewing practice. But with The Sports-Luxe Bomber Jacket it suited the garment cut and proposed fabrics.
With this version of the Seam Detail Dress I have placed the grainline along both the warp and the weft, making a feature of the direction of the corduroy. The corduroy is reasonably stable although some care is needed when stitching together as there is slightly more give in the warp than the weft.