Category GRIDVIEW

Export Data From GridView To Excel in Asp.net

Category: ASP.NETGRIDVIEW Comments: One comment

A good way to display data is to show it in a GridView. However, it becomes difficult to manipulate and filter large amounts of data in this way. Exporting data to an Excel file is a great solution for handling large amounts of data because Excel has many features -- such as sorting, searching and filtering.
Read More

Get Multiple DataKeyname Values from Gridview RowCommand in Asp.net

Category: ASP.NETGRIDVIEW Comments: No comments

Get multiple datakeyname values from gridview rowcommand in asp.net DataKeyNames="yourColumnName" If we want to get this DataKeyNames value from gridview in rowcommand event we will get it like this protected void gvUserInfo_RowDataCommand(object sender, GridViewCommandEventArgs e) { GridViewRow gvrow; string str = gvUserInfo.DataKeys[gvrow.RowIndex].Value.ToString(); } If we want to declare multiple DataKeyNames values we will declare it as DataKeyNames="Column1,Column2,Column3" Now if we want get these DataKeyNames values we will declare it like thisRead More

Display data on Click of Row in GridView using Jquery and Web Service in Asp.net

Category: ASP.NETGRIDVIEWJQUERYWEB SERVICE Comments: No comments

Display data on Click of Row in GridView using Jquery and Web Service in Asp.net //Table Script————————————————–------------------------------------------------------- CREATE TABLE [tblgrid]( [UserId] [int] IDENTITY(1,1) NOT NULL, [userName] [varchar](50) NULL, [City] [varchar](50) NULL, [Designation] [varchar](50) NULL, [sal] [bigint] NULL ) Design Page or Aspx Page--------------------------------------------------------------- Read More

Display data on Click of Row in GridView using Jquery in Asp.net

Category: ASP.NETGRIDVIEWJQUERY Comments: No comments

Display data on Click of Row in GridView using Jquery in Asp.net //Table Script-------------------------------------------------- CREATE TABLE [tblgrid]( [UserId] [int] IDENTITY(1,1) NOT NULL, [userName] [varchar](50) NULL, [City] [varchar](50) NULL, [Designation] [varchar](50) NULL, [sal] [bigint] NULL ) Aspx Page or Design Page------------------------------------------- Read More

Custom Pagination in GridView with Formatted using Asp.net

Category: ASP.NETGRIDVIEW Comments: No comments

Follow the Below Code to achieve result Default.aspx------------------------------------------------------------------------------------------------
Read More

Select All CheckBox inside GridView Using JavaScript in Asp.net

Category: ASP.NETGRIDVIEWJAVA SCRIPT Comments: No comments

To select all the checkbox at a time inside the gridview using JavaScript go through the below code. You can get the values of each checkbox wheather it is checked or not in step 4. Step 1: Read More

Use of CheckBox in GridView with paging in Asp.net

Category: ASP.NETGRIDVIEW Comments: No comments

Step 1: Read More

Paging Using SQL and DIV without using any Control (ie:Grid/Repeater)

Category: ASP.NETGRIDVIEW Comments: No comments

Follow these 3 steps: Create a page named as paging.aspx Create Table named as ProductDetails Create a storedprocedure named as SQLPaging paging.aspx :
< < Prev Next >>
paging.aspx.cs :Read More

Export Data From Gridview to Excel in Asp.net

Category: ASP.NETGRIDVIEW Comments: No comments

Step 1: Create a page GridToExcel.aspx and write the below code.
Step 2: In the GridToExcel.aspx.cs page write the below 4 functions in your code. protected void Page_Load(object sender, EventArgs e) { FillData(); } protected void FillData()Read More

Multiple row deletion in GridView in Asp.net

Category: ASP.NETGRIDVIEW Comments: No comments

Multiple row deletion in GridView in Asp.net on Button Click

CheckBox chk = new CheckBox();
foreach (GridViewRow dg1 in GridView1.Rows)
{
chk = (CheckBox)dg1.FindControl(“CheckBox1″);
Label lbldel = (Label)dg1.FindControl(“Label2″);

if (chk.Checked == true)
{
int ID = Convert.ToInt32(lbldel.Text);

// Pass this ID to Delete Command

Label1.Text = “data deleted”;

}
}

Read More