开发者

Re-arrange the template column in Gridview

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 col开发者_如何学编程umn 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.


http://geekswithblogs.net/dotNETvinz/archive/2009/06/03/move--autogenerate-columns-at-leftmost-part-of-the-gridview.aspx

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜