views:

147

answers:

1

I have set the Datasource of my gridview in code behind and created no columns (All columns in gridview are created automatically). Then I added a template column in gridview. Now I want to change the order of my Templated column in gridview at runtime. I want to show the templatedcolumn at column 20 but it is shown as first column. My Grdiview looks like this:

<asp:GridView ID="grdForecast" runat="server">
                <Columns>
                    <asp:TemplateField></asp:TemplateField>
                </Columns>

Please tell me how can I set the template column at specified place(in my case it is column no. 20) and I've set Datasource and Databind the gridview in code behind at page load.