I have a gridview in one of my aspx pages in which I want one column to be dropdown and one other to be a check box and rest to be text boxes. So when the gridview loads all the columns are read only but when the user hits edit button first column needs to be a dropdown with the the values in it being populated from a table in the database. second column needs to be checkbox. rest as textboxes.
Here is how I have created my gridview in the aspx.
<asp:GridView ID="GridView1" AutoGenerateColumns="true" AllowPaging="true" AllowSorting="true"
runat="server" AutoGenerateDeleteButton="True" AutoGenerateEditButton="True"
<PagerSettings Position="Top" Mode="NumericFirstLast" />
<PagerStyle HorizontalAlign="Right" VerticalAlign="Middle" BackColor="#ECF0FC" />
<FooterStyle BackColor="#CCCCCC" />
<HeaderStyle BackColor="#284E98" ForeColor="White" Font-Bold="True" />
<EditRowStyle Wrap="False" />
<AlternatingRowStyle BackColor="#F6F1D4" BorderColor="Black" />
Code Behind to populate the gridview:
Dim cmdList As DbCommand = m_database.GetStoredProcCommand("storeproc_name")
Dim listDS As DataSet = m_database.ExecuteDataSet(cmdList)
Dim iNoOfRowsReturend As Integer = listDS.Tables(0).Rows.Count
While many today have fast Internet connection, there are many still who do not, or are connecting through devices with a slower connect, so light web pages and fast load times are still popular.
If your ASP.NET page …
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
Established in 1997, Technology Architects has become one of the most reputable technology solutions companies in the country. TA have been providing businesses with cost effective state-of-the-art solutions and unparalleled service that is designed…
The Email Laundry PDF encryption service allows companies to send confidential encrypted emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…