Aspdotnet-Suresh

aspdotnet-suresh offers C#.net articles and tutorials,csharp dot net,asp.net articles and tutorials,VB.NET Articles,Gridview articles,code examples of asp.net 2.0 /3.5,AJAX,SQL Server Articles,examples of .net technologies

Showing posts with label Gridview. Show all posts
Showing posts with label Gridview. Show all posts

how to select/deselect checkboxes in gridview Or check/uncheck all the checkboxes in gridview using header checkbox or select header checkbox if all checkboxes selected in gridview using JavaScript.

Mar 1, 2011 30 comments
Introduction:
In this article I will explain how to select/deselect all the checkboxes in gridview using JavaScript.
Description:

I have a one gridview with checkboxes here my requirement is if I select header checkbox of gridview I need to select all the child checkboxes in gridview and if I deselect header checkbox I need to deselect all the child checkboxes in gridview and if I select all the child checkbox I need to select the header checkbox and if any child checkbox deselected I need to deselect header checkbox for this I have written JavaScript function to achieve this functionality.

Design your aspx page like this

how to show the up and down arrows during sorting of column in gridview using asp.net

Feb 23, 2011 21 comments
Introduction:

In this article I will explain how to show the up and down arrows during sorting of gridview columns using asp.net.


Description:

I have a one gridview with some data here my requirement is to show up and down arrows during sorting of columns in gridview because if I didn’t used arrows we are unable identify the sorted column in gridview and we don’t have chance to know that sorted column data is either in ascending or descending order if we use up and down arrows we can clearly show which column has sorted and whether that particular column data is in ascending or descending order.
 
Now design your aspx page like this

Display sum of columns total in gridview footer in asp.net

Feb 22, 2011 54 comments
Introduction:

In this article I will explain how to display the sum of total of columns in gridview footer   using asp.net.


Description:

I have a one gridview with multiple rows and columns and for that gridview paging also has enabled now my requirement I need to display sum of all the columns (Total) in gridview footer for that I have used gridview row databound condition this functionality will work for paging enabled gridview also. Before proceed to functionality first we need to design one table in database and give name EmployeeSalary

 

Delete multiple asp.net gridview rows with checkbox selection and with confirmation

Feb 15, 2011 46 comments
Introduction:

In this article I will explain how to delete multiple rows in gridview with checkbox selection and with confirmation message using asp.net.


Description:

I have one gridvew that contains multiple rows with checkboxes now my requirement is to delete rows in gridview based on checkbox selection.

how insert, Edit, Update and delete data in gridview with sqldatasource using asp.net

Feb 13, 2011 40 comments
Introduction:

In this article I will explain how to insert, edit, update and delete data in gridview with Sqldatasource using asp.net.


Description:

In my previous article I explain clearly how to insert, edit, update and delete data in gridview using asp.net. Now you may think that why he has written the same code with Sqldatasource main reason is if we Sqldatasource we have chance to reduce lot of code in code behind check two posts how much of code in reduced in this post. Now I will explain how to do the insert, edit, update and delete functionality with Sqldatasource here I used some of commands to achieve that functionality those are 

Asp.net insert, Edit, update, delete data in gridview

Feb 9, 2011 252 comments
Introduction:

In this article I will explain how to insert, edit, update and delete data in gridview using asp.net.


Description:

I have one gridview I need to write code to insert data into gridview after that I need to edit that gridview data and update it and if I want to delete the record in grdview we need to delete record simply by click on delete button of particular row to achieve these functionalities I have used some of gridview events those are 

1        1) Onrowcancelingedit
2        2) Onrowediting
3        3) Onrowupdating
4        4) Onrowcancelingedit
5        5) Onrowdeleting

By Using above griview events we can insert, edit, update and delete the data in gridview. My Question is how we can use these events in our coding before to see those details first design  table in database and give name Employee_Details

Asp.net Pass send gridview row value to other page with hyperlink to update row values

Feb 8, 2011 21 comments
Introduction:

In this article I will explain how to send gridview row values to other page and after update that record values return back to the gridview page using asp.net.

Description:

I have a gridview with hyperlink fields here my requirement is if I click on hyperlink of particular row I need to display that particular row values into other page in that page user will edit record values after that if he clicks on update button I need to update that record values and get back to previous home page i.e., gridview page. To achieve this first design the table in database like this

Highlight asp.net gridview rows on mouseover - out using JavaScript

Feb 7, 2011 12 comments
Introduction:

Here I will explain how to highlight gridview rows based on mouseover and mouseout using JavaScript in asp.net.

Description:

During work with one application I got requirement like change gridview rows color based on mouseover and mouseout using asp.net for that I used JavaScript functionality to handle onmouseover and onmouseout situations to implement this one first design aspx page like this 

how to insert images into database and how to retrieve and bind images to gridview using asp.net (or) save and retrieve images from database using asp.net

Jan 2, 2011 224 comments
Introduction

Here I will explain how insert and retrieve images from database and how to bind images to gridview using asp.net.

Description:

I have worked on one social networking site at that time we save all the images in to directory folder and we save image path into database at that time I got idea to implement concept like inserting images into database and retrieving the images from database and binding images to gridview using asp.net for that we need follow below steps

Asp.net Delete gridview records with confirmationbox example

Jan 1, 2011 14 comments
Introduction

Here I will explain how to delete records in gridview with confirmationbox message in asp.net.

Description:

I designed gridview with linkbutton that contains user information details. Here my requirement is whenever user clicks on link button at that time I need to display confirmation message and if user clicks on ok button in confirmation box I want to delete record from database otherwise no action should perform on particular record. For that we need to follow below steps 

Design your aspx page like this 

how to bind arraylist elements to gridview using asp.net

Dec 21, 2010 17 comments
Introduction:

Here I will explain how to bind arraylist elements to gridview using asp.net.

Description:

In my application we bind some of elements to arraylist items after that we need to bind that elements to gridview upto that I don’t have idea to bind arraylist to gridview. I searched many websites and I found good materials regarding how to bind arraylist items to our gridview.

In arrays we have different types

Asp.net show gridview header when there is no data or empty

Dec 20, 2010 19 comments
Introdcution

Here I will explain how to display or show gridview header even if gridview does not contain data or show gridview header with no records.

Description

 In one application I got requirement like show the gridview header even if grddview does not contain any data. In our applications we will send data to dataset and bind that dataset to gridview to display data on form. In gridview we have property called EmptyDataText by using this property we will display message like "No records Found" if gridview contains empty data. It will display the message but it won’t show header of gridview or anything simply it will display only that message (whatever the message we gave to EmptyDataText property). 

It will display message like this without gridview headers

Asp.net make single radio button selection in gridview using JQuery and change selected row style of gridview with radio button using jQuery

4 comments
Introduction

Here I will explain how to make single radio button selection in gridview using JQuery and how to change selected row style of gridview with radio button using jQuery.

Description

In my application I have designed gridview with radio button after completion of all the functionality if try to select radio button I am able to select all the radio buttons in gridview that is like this 

how to make single radio button selection in gridview using javascript

25 comments
Introduction

Here I will explain how to make single radio button selection in gridview using javascript.

Description

In my application I have designed gridview with radio button after completion of all the functionality if try to select radio button I am able to select all the radio buttons in gridview that is like this 

how to show limited characters in gridview columns using asp.net and how to show the tooltip for gridview rows and cells or how to show limit characters in gridview column using asp.net

Dec 10, 2010 17 comments
Introduction:

In this article I will explain how to show limited characters in gridview using asp.net.

Description:

I have created one application for that we have prepared one feedback form to collect feedback from users regarding our application for that we have taken gridview to bind all the feedbacks into one page. Here some of the users have given one line of feedback some of the users have given two lines of feedback remaining people have given feedback with bigger matter at that time if we bind all the feedbacks to one gridview at that time gridview size has increased a lot and in some rows matter is small but columns size is bigger that is just like this

Convert objectdatasource to dataset or datatable in asp.net | How to bind dataset with an Objectdatasource data in asp.net

Sep 29, 2010 3 comments
Introduction:

Here I will explain how to bind dataset with objectdatasource data using asp.net

Description:

Here we need to remember that if we bind our gridview with objectdatasource that objectdatasource fill with data only whenever gridview databind is called like this 

gridview1.DataBind()=ods (ods is ObjectDataSource);

Gridview checkbox validation using javascript

Sep 21, 2010 15 comments
Introduction

Hi here I will explain how to check the checked status of checkboxes in gridview using JavaScript 

Description

I have a one gridview with checkboxes and one button if user clicks on button I need to raise validation if user doesn’t checked at least one checkbox in gridview for that I have written one JavaScript function to check whether checkboxes selected in gridview or not.

For that write the following code in aspx page

Disable button if gridview doesn't contains any Data in asp.net

Sep 7, 2010 3 comments

Here I will explain how to disable button if gridview doesn’t contain records.
Now I have a two button Button1 and Button2 and one gridview. Now I want to display Button2 and gridview whenever user click on Button1.if user clicks on Button1 before displaying the Button2 and gridview I need to check if gridview has data or not if that gridview doesn’t contain data disable Button2 and display gridview with No Records found .For that I have written one function in button click like this

How to Merger the two datatbles into one table in asp.net

Apr 22, 2010 7 comments
It is very easy to merge two data tables into one table in asp.net 

Using Merge Method ucan add two tables

 DataTable dt = new DataTable();
 
DataTable dt1 = new DataTable();

dt.Merge(dt1);

 I think it helps you

Set Color of GridLines in Gridview

Apr 16, 2010 4 comments
There are times when you will want to set the color of the grid lines in your GridView - however there is not to my knowledge a way of doing this declaratively. A workaround is to do this by tapping into the GridView's RowDataBound event.


First, set the OnRowDataBound property in the markup of the GridView:

OnRowDataBound="MyGrid_RowDataBound"

Second, set the color in the OnRowDataBound handler method:

protected void MyGrid_RowDataBound(object sender, GridViewRowEventArgs e)
    {

        foreach (TableCell tc in e.Row.Cells)
        {

            tc.Attributes["style"] = "border-color: #c3cecc";

        }

    }

Happy Coding

© 2015 Aspdotnet-Suresh.com. All Rights Reserved.
The content is copyrighted to Suresh Dasari and may not be reproduced on other websites without permission from the owner.