bind dynamic columns template field in gridview from code behind C#
<p>I have stored proc using pivot(dynamic query) that will return dynamic columns. Like <br></p>

<pre><code>ItemId   A         B              c
------   --        --            --
1        A_Value1   B_Value1     C_Value1
16       A_Value2   B_Value2     C_Value2
</code></pre>

<p>Here A,B,C are dynamic columns . Sometime A only occur or A,B,C,D,E, etc because its pivot table.<br>
Then,
 I will bind that result in gridview. <br><br>
My requirement is, I want to bind that result gridview's template field with link button. Because I want to do rowcommand event for each column.<br>
My command argument should be like this for column C <br></p>

<pre><code>CommandArgument = ColumnName+","+ItemID_Value;
</code></pre>

<p>i.e <br> <code>CommandArgument = "A,16";
</code>
How to do this . pls help.</p>