.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

from datalist to gridview

Posted By:      Posted Date: August 27, 2010    Points: 0   Category :ASP.Net

hi guys


I have a problem, I wanna Insert that cridentials with gridview but I can't , I could that with datalist , so how can I do this with grid view

if there is a sample code i be happy

thanks to everybody..





Sub InsertAllBasketItems()

Dim productAPI As New basketTableAdapters.OrdersTableAdapter

For Each Item As DataListItem In DataList1.Items

View Complete Post

More Related Resource Links

Datalist, Gridview or Listview

I am extremely new to ASP and just started learning. I want to know which is better between Datalist, Gridview or Listview if I need paging and sorting functionality? This is what I have so far.I've tried Datalist but I am having trouble with the paging portion. I've tried gridview and listview and got the paging to work but for some reason, when I click on Pg 2, it refreshes the search or something and what was shown on Pg 1 would appear again on Pg 2.Thanks in advance for your help.<asp:MultiView id="MultiView1" ActiveViewIndex="0" Runat="server">                        <asp:View ID="View1" runat="server">                        <asp:DataList ID="DataList1" runat="server" DataKeyField="ItemID"                         DataSourceID="SqlDataSourceImage1" Width="100%"                         HorizontalAlign=

Help:JAVASCRIPT (checkAll) & (Hide/Unhide GridView1) in a Datalist with a nested Gridview


Hey guys,

 I'm at my wits end on this one looked/Searched/Played/Experimented and I need your help if you can.

This page is going to be primarily used on a mobile device using Win Mobile 5


Need to Accomplish:

  1. Prevent Postback(serverside) of Page using JavaScript (Postback's slow down the page on mobile device)


JavaScript Requests:

  1. Hide and UnHide the Nested Gridview1 by Clicking on a imagebutton1 in DataList1icon_minized_collapse.pngicon_expand_collapse.png
  2. CheckBox in DataList1 Checks All and UNChecks All, CheckBox in just the related Gridview1


Controls :

  1. Gridview1 nested inside DataList1


Note: Datalist1 and Gridview1 have datasource's in production. The Codebehind page is just appling test data to help me figure this out.


Thank you all in advance for helping me with this.

Example data below:<

NULL value of Gridview inside Datalist


I am using a gridview, which is inside datalist, but whenever I try to serach gridview in datalist it reyurns NULL. I using the following code, bolded line is not able to assign gridview:

amespace DataListXML
    public partial class _Default : System.Web.UI.Page
        DataSet _dataSet;
        protected void Page_Load(object sender, EventArgs e)

repeater, gridview, datalist etc



I'm really confused about this. There are sites which say don't use repeater, use a gridview and some vice versa.

Basically, repeater is the less memory hungry but is read only (and forward only). Fine, all clear.

So, within my C# I am faced with 2 options when populating my repeater/gridview or datalist.

SqlDataAdapter da = new SqlDataAdapter();
da.SelectCommand = cmd;

DataSet ds = new DataSet();
da.Fill(ds, "dsFFC");
grdView.DataSource = ds;



SqlDataAdapter da = new SqlDataAdapter();
da.SelectCommand = cmd; 

SqlDataReader rdr = cmd.ExecuteReader();
grdView.DataSource = rdr; grdView.DataBind();


Is it this section (above) where the resource is taken up and I need to be careful or within the HTML page, as regardless of the 2 methods above, I can choose either asp:DataList, asp:GridView or asp:Repeater on the HTML page.


How to get some data fom GridView (or whatever control DataList etc...)


Hi everyone,

I really love GridView and I like to use it whenever it suits well. Just out of curisority, recently, I been thinking what if i wanna get sme data from the GridView I just bind on the page without actually nesting each column and row? For example :


From the above table, say I wanna take the value Three and Five. How can I get it back from the table ? I know I can query back the database to get the value but that's not what I am trying to figure out here. Thanks all and will be looking forward to getting some cool stuff from you guys.

Inplace Edit in GridView

In this article I am presenting a different way to look at EditItemTemplate, using which user navigation for editing is reduced and . it looks very different (see screeen shots) then regular implementation of GridView.

GridView Confirmation Box Using JQuery BlockUI in asp.net

JQuery is the most popular JavaScript library. One of the main reasons for its fame is the plugin architecture. Anyone can create a separate library that leverage the JQuery library. In this article we are going to look at the BlockUI library which is used to block the user screen while performing a task.

Textbox Editable GridView in ASP.NET

This article describes how I made a fully editable gridview in C# using ASP.NET 2. The idea is that the GridView looks and works like an Excel spreadsheet. You see all the cells in the table, and you can edit any of the cells you like, and they are automatically updated (i.e. saved to the database). This is very often how people expect data tables to work in web pages, and I've often seen people clicking in vain on un-editable gridview cells, somehow expecting to edit them, and not understanding that they need to click an Edit button at the end of the row.

Adding Dynamic Rows in ASP.NET GridView Control with TextBoxes and with Delete functionality

In my previous examples, I have demonstrated on how to add dynamic rows in GridView control with TextBoxes and how to save the values into the database. Now, seems that most of the developers are asking if how to add a delete functionality with it. So in this example, I'm going to show on how to delete a certain row in the dynamic GridView with TextBoxes.

AJAX GridView Checkbox Select All in ASP.Net

In the previous article GridView Select Multiple Rows you learnt the multiple row selection in GridView control. Here you will get the C# code sample to select all the gridview rows using single checkbox server control. You can highlight the selected rows with different color and Font state Bold. If you want to use the selection values on different ASP.Net

AJAX GridView Paging and Sorting using C# in ASP.Net

To enable the GridView Paging and Sorting to update the GridView Data without refreshing the ASP.Net web page AJAX Extension controls are used. UpdatePanel is used to hold the GridView control that triggers the events for the controls placed inside it. By Default UpdatePanel triggers the asynchronous postbacks for its child controls.

GridView Paging Using Ajax in ASP.Net

To enable the GridView Paging and Sorting to update the GridView Data without refreshing the ASP.Net web page AJAX Extension controls are used. UpdatePanel is used to hold the GridView control that triggers the events for the controls placed inside it. By Default UpdatePanel triggers the asynchronous postbacks for its child controls.

Displaying Row Details Tooltip on GridView using JQuery

Continuing exploring JQuery! I decided to implement a feature to display some kind of details related to a row displayed on GridView. For example when displaying employees details on GridView some information might not fit in the GridView because it will make it huge and wide. These infomration can be diplayed as Tooltip. Or when you want to display a picture and some kind of formated text to be diplayed as tooltip when mouse hover on the image.

jQuery: Highlight Gridview Rows with Checkbox

Im learning and experimenting with jQuery and ASP.NET. Below is a simple solution I created to highlight rows in a gridview by clicking on a checkbox next to the row.

Gridview setup:

Sortable GridView using jQuery's TableSorter

This article explains how to use jQuery's plug-in Tablesorter to implement client-side sorting in an ASP.NET GridView. This comes in handy especially when an ObjectDataSource is used with a GridView as GridView does not provide sorting out of the box.

Sorting Gridview using Jquery with ASP.NET

I want to show how to sorting a gridview using a Jquery in ASP.NET, it is a flexible client-side table sorting. We have known that Jquery is a new kind of Javascript Library. You can find detail of Jquery in this site http://jquery.com/ there are lot of example with documentation and also allow free download a latest version.

GridView Parent Child View with JQuery Effects

I was just checked how to add some more cool effects to the GridView control using JQuery. In this post I will display parent-child data in the GridView control with some help of the wonderful JQuery library.

Let's first populate the GridView control.
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend