The styles listed in the post you linked are already defined in TikZ, you do not need to create a new style to use them.
You can create a style if you need a pattern that doesn't exist.
For example, mygridstyle in my MWE creates a style with a sequence of dashes with a length of 8pt, 6pt, 4pt, and 2pt separated by a space of 4pt.
\documentclass{article}
\usepackage{tikz}
\tikzset{mygridstyle/.style={dash pattern=on 8pt off 4pt on 6pt off 4pt on 4pt off 4pt on 2pt off 4pt}}
\begin{document}
Standard dashdotted:
\begin{tikzpicture}
\draw[gray, dashdotted, xstep=1.3cm, ystep=1.6cm] (0,0) grid (4,4);
\end{tikzpicture}
Standard dotted, thick line:
\begin{tikzpicture}
\draw[gray, dotted, xstep=1.3cm, ystep=1.6cm, thick] (0,0) grid (4,4);
\end{tikzpicture}
Standard dash, with 4pt line width:
\begin{tikzpicture}
\draw[gray, dotted, xstep=1.3cm, ystep=1.6cm, line width=4pt] (0,0) grid (4,4);
\end{tikzpicture}
Customized sytle, very thick line:
\begin{tikzpicture}
\draw[gray, mygridstyle, xstep=1.3cm, ystep=1.6cm, very thick] (0,0) grid (4,4);
\end{tikzpicture}
\end{document}

help linesand putgrayin the style you had created. – Sigur Feb 23 '19 at 01:02line width=2ptto change the line thickness also. You can define everything in the style. – Sigur Feb 23 '19 at 01:08showframepackage with[grid=true]option, for example. – Sigur Feb 23 '19 at 01:09\tikzstyleis somewhat deprecated.) – Feb 23 '19 at 01:44\tikzstyleis deprecated and will eventually be removed. – Henri Menke Feb 23 '19 at 04:59