Tags » GridView

GridView export to XLSX

This code resides in a buttonClick event. It could easily be a function with a GridView as a parameter.

It loops through the GridView to convert it to a data table, then sends the data table to a function ExportToExcel.CreateExcelFile.CreateExcelDocument found… 2,090 more words

GridView

ASP.Net SQL Server Express Connection

  1. In Web.Config or App.Config include a connection string:

    <connectionStrings>
    <add name="NAMEFORCONNECTION" connectionString="Data Source=SERVER\SQLEXPRESS;Initial Catalog=DATABASENAME;Integrated Security=True" providerName="System.Data.SQLClient"/>
    </connectionStrings>
  2. On your Page.aspx, you can refer to the Connection string and include your SQL statement:
  3. 53 more words
SQL Server

Gridview Add update delete

*******ASPX page Coding*********

<asp:GridView ID=”grdInspectionMap” runat=”server” BorderWidth=”1px” AutoGenerateColumns=”false”
AllowSorting=”true” BackColor=”White” CssClass=”summary” BorderStyle=”Solid”
BorderColor=”#009955″ CellPadding=”2″ CellSpacing=”2″ DataKeyNames=”DivisionId”
AllowPaging=”True” PageSize=”20″ OnPageIndexChanging=”grdInspectionMap_PageIndexChanging”
OnRowCreated=”grdInspectionMap_RowCreated” OnRowCancelingEdit=”grdInspectionMap_RowCancelingEdit”
OnRowDeleting=”grdInspectionMap_RowDeleting” OnRowEditing=”grdInspectionMap_RowEditing”
OnRowUpdating=”grdInspectionMap_RowUpdating”>
<PagerTemplate> 1,036 more words

Asp.net

How to hide columns based on values selected in checkbox

Introduction:

How to hide columns based on values selected in checkbox

Description:

In this article I am going to explain how to hide columns in grid view based on user selection in checkbox. 691 more words

Asp.Net

How To Bind GridView Using LINQ To SQL

Here are the steps:

Step 1:

Firstly, we need to create an empty project by opening Visual Studio by pressing command¬†devenv in the start menu search bar or using Windows Run-Command by pressing (Windows icon + R ) and enter… 725 more words

Bind

Bind GridView Using DataTable

In this article I will cover the basics of creating DataTable to get data and fill into the ASP GridView Control to fill, bind, and show the data. 451 more words

ASP.net

How to load data from database to Asp.Net Gridview using WebAPI

Introduction:

In this article we are discussing how to load data from database to Asp.Net Gridview using WebAPI.

Description:

We use WebAPI to get the data from database and then use the… 758 more words

Asp.Net