create dynamic grid with drop down
<p>I want to create a dynamic gridview with first row as drop down on clicking edit button. I dont have any idea on how to start. Can you please help. I have gone through some articals and found using the InstantiateIn method we can achieve. </p>

<pre><code>public class CreateItemTemplate : ITemplate
    {
        //Field to store the ListItemType value
        private ListItemType myListItemType;

        public CreateItemTemplate(ListItemType item)
        {
            myListItemType = item;
        }

        public void InstantiateIn(System.Web.UI.Control container)
        {
            //Code to create the ItemTemplate and its field.
            if (myListItemType == ListItemType.Item)
            {
                TextBox txtCashCheque = new TextBox();
                container.Controls.Add(txtCashCheque);
            }
        }
    }
</code></pre>
