Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>I faced similar problem and created my own raw html.</p> <pre><code> private void LoadCategory() { String s = ""; </code></pre> <p>// Prepare your dataset DataSet ds // Note That I have Category Table having C_NAME AND PC_NAME coloums, change it as per your column anme ds.Relations.Add("rsParentChild", ds.Tables[0].Columns["C_NAME"], ds.Tables[0].Columns["PC_NAME"]);</p> <pre><code> s = s + "\n &lt;table&gt;"; s = s + "\n &lt;tr&gt;"; s = s + "\n &lt;td class='br4'&gt; "; s = s + "\n &lt;table&gt;"; s = s + "\n &lt;tr&gt;"; s = s + "\n &lt;td&gt;"; s = s + "\n &lt;ul id='qm0' class='qmmc'&gt;"; foreach (DataRow dr in ds.Tables[0].Rows) { if (dr["PC_NAME"] == DBNull.Value) { s = s + "\n &lt;li&gt;&lt;a class='qmparent' href='#'&gt;" + dr["C_NAME"].ToString() + "&lt;/a&gt;"; s = s + "\n &lt;ul&gt;" + PopulateTree(dr) + "&lt;/ul&gt;"; } } s = s + "\n &lt;li class='qmclear'&gt;&amp;nbsp;&lt;/li&gt;&lt;/ul&gt;"; s = s + "\n &lt;script type='text/javascript'&gt;qm_create(0,true,0,500,'all',false,false,false,false);&lt;/script&gt;"; s = s + "\n &lt;/td&gt;"; s = s + "\n &lt;/tr&gt;"; s = s + "\n &lt;/table&gt;"; s = s + "\n &lt;/td&gt;"; s = s + "\n &lt;/tr&gt;"; s = s + "\n &lt;/table&gt;"; Literal1.Text = s; } private String PopulateTree(DataRow dr) { String s = ""; String ss; foreach (DataRow row in dr.GetChildRows("rsParentChild")) { s = s + " &lt;li&gt;&lt;a href=\"javascript:FetchProducts(1,'" + row["C_NAME"].ToString() + "')\"&gt;" + row["C_NAME"].ToString() + "&lt;/a&gt;\n"; ss = PopulateTree(row); if (ss != "") s = s + " &lt;ul&gt;" + ss + "&lt;/ul&gt;&lt;/li&gt;\n\n"; } return s; } </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload