Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

ASP.Net GridView With ObjectDataSource. GridView not displaying data.

Posted on 2010-11-25
7
Medium Priority
?
828 Views
Last Modified: 2012-05-10
Dear Friends,

I am using GridView with ObjectDataSource to display some suppliers information. But inspite of all efforts the gridview is not displaying any data. Though in the debug mode I could see 3 records being fetched from the database and Totalrow count at 14. I fail to understand what the problem is and would like some assistance in the matter. The complete code is given  below:

.ASPX

<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="SupplierInfo.aspx.cs" Inherits="OMSWeb.SupplierInfo" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
</head>
<body>
    <form id="form1" runat="server">
    <div id="divSearch" runat="server">
        <fieldset>
            <legend>Supplier Search</legend>
            <table id="tblSearch" runat="server" cellpadding="5" cellspacing="0" border="0" width="90%">
                <tr>
                    <td>
                        <asp:Label ID="lblSupplierNameS" runat="server" Text="Supplier Name"></asp:Label>
                    </td>
                    <td>
                        <asp:TextBox ID="tbSupplierNames" runat="server" MaxLength="50"></asp:TextBox>
                    </td>
                    <td>
                        <asp:Label ID="lblSupplierEmailS" runat="server" Text="Supplier Email"></asp:Label>
                    </td>
                    <td>
                        <asp:TextBox ID="tbSupplierEmailS" runat="server" MaxLength="50"></asp:TextBox>
                    </td>
                </tr>
                <tr>
                    <td>
                        <asp:Label ID="lblCountryS" runat="server" Text="Country"></asp:Label>
                    </td>
                    <td>
                        <asp:DropDownList ID="ddlCountryS" runat="server" DataTextField="CountryName" DataValueField="CountryID">
                        </asp:DropDownList>
                    </td>
                    <td>
                        <asp:Label ID="lblCityS" runat="server" Text="City"></asp:Label>
                    </td>
                    <td>
                        <asp:DropDownList ID="ddlCityS" runat="server" DataTextField="CityName" DataValueField="CityID">
                        </asp:DropDownList>
                    </td>
                </tr>
            </table>
        </fieldset>
    </div>
    <br />
    <div id="divEdit" runat="server">
        <fieldset>
            <legend>Supplier Info</legend>
            <table id="tblEdit" runat="server" cellpadding="2" cellspacing="0" border="0" width="60%">
                <tr>
                    <td>
                        <asp:Label ID="lblSupplierID" runat="server" Text="Supplier ID :"></asp:Label>
                    </td>
                    <td>
                        <asp:TextBox ID="tbSupplierID" runat="server" MaxLength="50" ReadOnly="true"></asp:TextBox>
                    </td>
                    <td>
                        <asp:Label ID="lblSupplierName" runat="server" Text="Supplier Name :"></asp:Label>
                    </td>
                    <td>
                        <asp:TextBox ID="tbSupplierName" runat="server" MaxLength="50"></asp:TextBox>
                    </td>
                    <td width="25%" rowspan="3">
                        &nbsp;
                    </td>
                </tr>
                <tr>
                    <td>
                        <asp:Label ID="lblAddress1" runat="server" Text="Address :"></asp:Label>
                    </td>
                    <td>
                        <asp:TextBox ID="tbAddress1" runat="server" MaxLength="50"></asp:TextBox>
                    </td>
                    <td>
                        <asp:Label ID="lblAddress2" runat="server" Text="Address :"></asp:Label>
                    </td>
                    <td>
                        <asp:TextBox ID="tbAddress2" runat="server" MaxLength="50"></asp:TextBox>
                    </td>
                </tr>
                <tr>
                    <td>
                        <asp:Label ID="lblCountry" runat="server" Text="Country"></asp:Label>
                    </td>
                    <td>
                        <asp:DropDownList ID="ddlCountry" runat="server" DataTextField="CountryName" DataValueField="CountryID">
                        </asp:DropDownList>
                    </td>
                    <td>
                        <asp:Label ID="lblCity" runat="server" Text="City"></asp:Label>
                    </td>
                    <td>
                        <asp:DropDownList ID="ddlCity" runat="server" DataTextField="CityName" DataValueField="CityID">
                        </asp:DropDownList>
                    </td>
                </tr>
            </table>
        </fieldset>
    </div>
    <br />
    <br />
    <div id="divButton" runat="server">
        <table id="tblButton" runat="server" width="90%" cellpadding="2" cellspacing="0"
            border="0">
            <tr>
                <td width="10%">
                    &nbsp;
                </td>
                <td>
                    <asp:Button ID="btnNew" runat="server" Text="New" />
                </td>
                <td>
                    <asp:Button ID="btnSearch" runat="server" Text="Search" />
                </td>
                <td>
                    <asp:Button ID="btnReset" runat="server" Text="Reset" />
                </td>
                <td>
                    <asp:Button ID="btnUpdate" runat="server" Text="Update" />
                </td>
                <td>
                    <asp:Button ID="btnDelete" runat="server" Text="Delete" />
                </td>
                <td>
                    <asp:Button ID="btnCancel" runat="server" Text="Cancel" />
                </td>
                <td width="10%">
                    &nbsp;
                </td>
            </tr>
        </table>
    </div>
    <br />
    <br />
    <div id="divGrid" runat="server">
        <asp:GridView ID="gvGrid" runat="server" AllowPaging="true" AllowSorting="false"
            PageSize="4" DataKeyNames="SupplierID" AutoGenerateColumns="false" CellPadding="2"
            DataSourceID="MyDataSource" onrowdatabound="gvGrid_RowDataBound">
        </asp:GridView>
        <asp:ObjectDataSource ID="MyDataSource" runat="server" TypeName="OMS.DAL.SupplierBL"
            SelectCountMethod="SelectCountMethod" SelectMethod="SelectMethod" EnablePaging="true"
            StartRowIndexParameterName="StartRow" MaximumRowsParameterName="MaxRows">
            <SelectParameters>
                <asp:Parameter Name="StartRow" Type="Int32" />
                <asp:Parameter Name="MaxRows" Type="Int32" />
                <asp:ControlParameter ControlID="tbSupplierNames" Name="supplierName" PropertyName="Text" />
                 <asp:ControlParameter ControlID="tbSupplierEmailS" Name="supplierEmail" PropertyName="Text" />
                  <asp:ControlParameter ControlID="ddlCountryS" Name="countryID" PropertyName="SelectedValue" />
                  <asp:ControlParameter ControlID="ddlCityS" Name="cityID" PropertyName="SelectedValue" />
               
            </SelectParameters>
        </asp:ObjectDataSource>
    </div>
    </form>
</body>
</html>



__________________________________________________________________

.ASPX.CS

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace OMSWeb
{
    public partial class SupplierInfo : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
           
        }

        protected void gvGrid_RowDataBound(object sender, GridViewRowEventArgs e)
        {
            // This part was used for debugging purpose and is not relevant and will be deleted.
            // This part of the code is not reached, found during debugging.
            int xy = 10;
            int zz = xy;
            int ab = xy + zz;

            int bd = ab + xy + zz;
        }

     
    }
}


____________________________________________________________________________


SupplerBL.cs


using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using OMS.Entity;
using OMS.DAL;

namespace OMS.DAL
{
    public class SupplierBL
    {
        public SupplierBL()
        {
        }

        private int totalRows;

        public SupplierCollection SelectMethod(int MaxRows, int StartRow, string supplierName, string supplierEmail, int countryID, int cityID)
        {
            try
            {
                Supplier sup = new Supplier();
                SupplierCollection suc = new SupplierCollection();

                sup.SupplierName = supplierName;
                sup.SupplierEmail = supplierEmail;
                sup.SupplierCountry = countryID;
                sup.SupplierCity = cityID;

                SupplierDataSource sd = new SupplierDataSource();

                int totRows = 0;
                suc = sd.SupplierSearch(sup, StartRow, MaxRows, ref totRows);

               

                totalRows = totRows;

                return suc;


            }
            catch (Exception ex)
            {
                throw new Exception(ex.Message);
            }
            finally
            {

            }

        }

        public int SelectCountMethod(int MaxRows, int StartRow, string supplierName, string supplierEmail, int countryID, int cityID)
        {
            return totalRows;
        }
    }
}


____________________________________________________________________________

SupplierDataSource.cs



using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Configuration;
using System.Data;
using System.Data.SqlClient;
using System.Linq;
using System.Text;
using OMS.Entity;

namespace OMS.DAL
{
    public class SupplierDataSource
    {
        private SqlConnection con;
        private SqlCommand cmd;
        private DataSet ds;
        private SqlDataAdapter da;
        private SqlDataReader dr;

        private string connectionString;
        public SupplierDataSource()
        {
            try
            {
                con = new SqlConnection(ConfigurationManager.ConnectionStrings["OMSCS"].ToString());
                connectionString = ConfigurationManager.ConnectionStrings["OMSCS"].ToString();
            }
            catch (Exception ex)
            {
                throw new Exception(ex.Message);
            }
        }

        public Int32 SupplierAdd(Supplier sup)
        {
            Int32 rowsAffected = 0;
            try
            {
                using (SqlConnection con1 = new SqlConnection(connectionString))
                {
                    using (SqlCommand cmd1 = new SqlCommand("SupplierInsert", con1))
                    {
                        cmd1.CommandType = CommandType.StoredProcedure;

                        cmd1.Parameters.AddWithValue("@SupplierID", sup.SupplierID);
                        cmd1.Parameters.AddWithValue("@SupplierName", sup.SupplierName);
                        cmd1.Parameters.AddWithValue("@SupplierAddress1", sup.SupplierAddress1);
                        cmd1.Parameters.AddWithValue("@SupplierAddress2", sup.SupplierAddress2);
                        cmd1.Parameters.AddWithValue("@SupplierCity", sup.SupplierCity);
                        cmd1.Parameters.AddWithValue("@SupplierCountry", sup.SupplierCountry);
                        cmd1.Parameters.AddWithValue("@SupplierPinCode", sup.SupplierPinCode);
                        cmd1.Parameters.AddWithValue("@SupplierEmail", sup.SupplierEmail);
                        cmd1.Parameters.AddWithValue("@SupplierTelephone", sup.SupplierTelephone);

                        con1.Open();

                        rowsAffected = cmd1.ExecuteNonQuery();
                    }
                }
            }
            catch (Exception ex)
            {
                throw new Exception(ex.Message + " -- " + ex.InnerException);
            }
            finally
            {
            }

            return rowsAffected;
        }

        public int SupplierUpdate(Supplier sup)
        {
            Int32 rowsAffected = 0;
            try
            {
                using (SqlConnection con1 = new SqlConnection(connectionString))
                {
                    using (SqlCommand cmd1 = new SqlCommand("SupplierUpdate", con1))
                    {
                        cmd1.CommandType = CommandType.StoredProcedure;

                        cmd1.Parameters.AddWithValue("@SupplierID", sup.SupplierID);
                        cmd1.Parameters.AddWithValue("@SupplierName", sup.SupplierName);
                        cmd1.Parameters.AddWithValue("@SupplierAddress1", sup.SupplierAddress1);
                        cmd1.Parameters.AddWithValue("@SupplierAddress2", sup.SupplierAddress2);
                        cmd1.Parameters.AddWithValue("@SupplierCity", sup.SupplierCity);
                        cmd1.Parameters.AddWithValue("@SupplierCountry", sup.SupplierCountry);
                        cmd1.Parameters.AddWithValue("@SupplierPinCode", sup.SupplierPinCode);
                        cmd1.Parameters.AddWithValue("@SupplierEmail", sup.SupplierEmail);
                        cmd1.Parameters.AddWithValue("@SupplierTelephone", sup.SupplierTelephone);

                        con1.Open();

                        rowsAffected = cmd1.ExecuteNonQuery();
                    }
                }
            }
            catch (Exception ex)
            {
                throw new Exception(ex.Message + " -- " + ex.InnerException);
            }
            finally
            {
            }

            return rowsAffected;
        }


        public int SupplierDelete(int supID)
        {
            Int32 rowsAffected = 0;
            try
            {
                using (SqlConnection con1 = new SqlConnection(connectionString))
                {
                    using (SqlCommand cmd1 = new SqlCommand("SupplierDelete", con1))
                    {
                        cmd1.CommandType = CommandType.StoredProcedure;

                        con1.Open();

                        rowsAffected = cmd1.ExecuteNonQuery();
                    }
                }
            }
            catch (Exception ex)
            {
                throw new Exception(ex.Message + " -- " + ex.InnerException);
            }
            finally
            {
            }

            return rowsAffected;
        }


        public Supplier SupplierFetchByID(int supID)
        {
            Supplier sup = new Supplier();
            try
            {
                using (SqlConnection con1 = new SqlConnection(connectionString))
                {
                    using (SqlCommand cmd1 = new SqlCommand("SupplierFetchByID", con1))
                    {
                        cmd1.CommandType = CommandType.StoredProcedure;

                        cmd1.Parameters.AddWithValue("SupplierID", supID);

                        con1.Open();

                        //Int32 rowsAffected = cmd1.ExecuteNonQuery();

                        SqlDataReader dr = cmd1.ExecuteReader();

                        if (dr.HasRows)
                        {
                            while (dr.Read())
                            {
                                sup.SupplierID = dr.GetInt32(0);
                                sup.SupplierName = dr.GetString(1);
                                sup.SupplierAddress1 = dr.GetString(2);
                                sup.SupplierAddress2 = dr.GetString(3);
                                sup.SupplierCity = dr.GetInt32(4);
                                sup.SupplierCountry = dr.GetInt32(5);
                                sup.SupplierPinCode = dr.GetString(6);
                                sup.SupplierEmail = dr.GetString(7);
                                sup.SupplierTelephone = dr.GetString(8);
                            }
                        }
                    }
                }

            }
            catch (Exception ex)
            {
                throw new Exception(ex.Message + " -- " + ex.InnerException);
            }
            finally
            {
            }
            return sup;
        }


        public SupplierCollection SupplierSearch(Supplier sup, int startRowIndex, int maximumRows, ref int totalRows)
        {
           

            SupplierCollection suc = new SupplierCollection();
            Supplier su = new Supplier();

            try
            {
                using (SqlConnection con1 = new SqlConnection(connectionString))
                {
                    using (SqlCommand cmd1 = new SqlCommand("SupplierSearch", con1))
                    {
                        cmd1.CommandType = CommandType.StoredProcedure;

                        //cmd1.Parameters.AddWithValue("@SupplierID", sup.SupplierID);

                        cmd1.Parameters.AddWithValue("@SupplierName", sup.SupplierName);

                       // cmd1.Parameters.AddWithValue("@SupplierAddress1", sup.SupplierAddress1);

                        //cmd1.Parameters.AddWithValue("@SupplierAddress2", sup.SupplierAddress2);

                        cmd1.Parameters.AddWithValue("@SupplierCity", sup.SupplierCity);

                        cmd1.Parameters.AddWithValue("@SupplierCountry", sup.SupplierCountry);

                       // cmd1.Parameters.AddWithValue("@SupplierPinCode", sup.SupplierPinCode);

                        cmd1.Parameters.AddWithValue("@SupplierEmail", sup.SupplierEmail);

                        cmd1.Parameters.AddWithValue("@StartRowIndex", startRowIndex);

                        cmd1.Parameters.AddWithValue("@MaximumRows", maximumRows);

                        // The Below OutParameter is used to retrieve the output parameters from sqldatareader.
                        // Any other style failed in retrieving the output parameter values.
                        SqlParameter OutParameter = new SqlParameter("@TotalRows", SqlDbType.Int, 4);
                        OutParameter.Direction = ParameterDirection.Output;
                        cmd1.Parameters.Add(OutParameter);
                        //cmd1.Parameters.Add("@TotalRows", SqlDbType.Int);
                        //cmd1.Parameters["@TotalRows"].Direction = ParameterDirection.Output;
                        //cmd1.Parameters["@TotalRows"].Value = 0;

                        //cmd1.Parameters.AddWithValue("@TotalRows", 0);

                        SqlDataReader dr;

                        con1.Open();
                        dr = cmd1.ExecuteReader();

                        if (dr.HasRows)
                        {
                            while (dr.Read())
                            {
                                su = new Supplier();

                                su.SupplierID = dr.GetInt32(0);
                                su.SupplierName = dr.GetString(1);
                                su.SupplierAddress1 = dr.GetString(2);
                                su.SupplierAddress2 = dr.GetString(3);
                                su.SupplierCity = dr.GetInt32(4);
                                su.SupplierCountry = dr.GetInt32(5);
                                su.SupplierPinCode = dr.GetString(6);
                                su.SupplierEmail = dr.GetString(7);
                                su.SupplierTelephone = dr.GetString(8);

                                suc.Add(su);
                            }
                        }

                        dr.Close();

                       // totalRows = int.Parse(cmd1.Parameters["@TotalRows"].ToString());

                        totalRows = (int)OutParameter.Value;


                        con1.Close();
                    }
                }
            }
            catch (Exception ex)
            {
                throw new Exception(ex.Message + " -- " + ex.InnerException);
            }
            finally
            {
            }

            return suc;

        }

    }
}


-------------------------------------------------------------------------------------------------------------


Stored Procedure


USE [OMS]
GO
/****** Object:  StoredProcedure [dbo].[SupplierSearch]    Script Date: 11/25/2010 12:18:56 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
Create PROCEDURE [dbo].[SupplierSearch]
(
        @SupplierName           VARCHAR(50) = NULL, -- default to NULL
        @SupplierCity           INT = NULL,
        @SupplierCountry        INT = NULL,
        @SupplierEmail          VARCHAR(50) = NULL,
        @StartRowIndex                  INT,
        @MaximumRows                  INT,
        @TotalRows                        INT OUTPUT
)
AS
BEGIN
      
DECLARE @first_id int, @startRow INT
DECLARE @StringCity VARCHAR(20)
DECLARE @StringCountry VARCHAR(20)

IF @StartRowIndex > 0
SET @StartRowIndex =  (@StartRowIndex - 1)  * @MaximumRows

IF @StartRowIndex = 0
SET @StartRowIndex = 1

--PRINT @StartRowIndex
SET ROWCOUNT @StartRowIndex



IF RTRIM(@SupplierName)='' OR @SupplierName IS NULL
      SET @SupplierName = '%'
ELSE
      SET @SupplierName = @SupplierName + '%'
      
IF RTRIM(@SupplierEmail)='' OR @SupplierEmail IS NULL
      SET @SupplierEmail = '%'
ELSE
      SET @SupplierEmail = @SupplierEmail + '%'
      
IF RTRIM(@SupplierCity)='' OR @SupplierCity = 0 OR @SupplierCity IS NULL
      SET @StringCity = '%'
ELSE
      SET @StringCity = CONVERT(VARCHAR(20),@SupplierCity)
      
IF RTRIM(@SupplierCountry)='' OR @SupplierCountry = 0 OR @SupplierCountry IS NULL
      SET @StringCountry = '%'
ELSE
      SET @StringCountry = CONVERT(VARCHAR(20),@SupplierCountry)
      



               
        -- Append % for LIKE operator search (if not NULL)
--        IF @SupplierName IS NULL
--                SET @SupplierName = @SupplierName + '%'
--
--        IF @SupplierEmail IS NULL
--                SET @SupplierEmail = @SupplierEmail + '%'
--                
--  PRINT Convert(varchar(30),@StartRowIndex) + ' - @StartRowIndex'
--  PRINT Convert(varchar(30),@MaximumRows) + ' - @MaximumRows'
--  
--  PRINT Convert(varchar(30),@SupplierName) + ' - @SupplierName'
--  PRINT Convert(varchar(30),@StringCity) + ' - @SupplierCity'
--  PRINT Convert(varchar(30),@StringCountry) + ' - @StringCountry'
--  PRINT Convert(varchar(30),@SupplierEmail) + ' - @SupplierEmail'
--  
 
       
        SET ROWCOUNT @StartRowIndex
       
        SELECT @first_id = SupplierID FROM Supplier Where
                        (@SupplierName IS NULL OR [SupplierName] LIKE @SupplierName) AND -- If passed only applies to filter
                --(SupplierCity = IsNull(@SupplierCity,SupplierCity)) AND
                --(SupplierCountry = IsNull(@SupplierCountry,SupplierCountry)) AND
               
                 (SupplierCity like @StringCity) AND
                (SupplierCountry like @StringCountry) AND
               
                (@SupplierEmail IS NULL OR SupplierEmail LIKE @SupplierEmail)  
        ORDER BY SupplierID
               
       -- PRINT Convert(varchar(30),@first_id) + ' - First ID'
               
            SET ROWCOUNT @MaximumRows
            
        SELECT * FROM Supplier WHERE
                (@SupplierName IS NULL OR [SupplierName] LIKE @SupplierName) AND -- If passed only applies to filter
--                (SupplierCity = IsNull(@SupplierCity,SupplierCity)) AND
--                (SupplierCountry = IsNull(@SupplierCountry,SupplierCountry)) AND

                         (SupplierCity like @StringCity) AND
                (SupplierCountry like @StringCountry) AND
                (@SupplierEmail IS NULL OR SupplierEmail LIKE @SupplierEmail) AND
                (SupplierID > @first_id) ORDER BY SupplierID
       
        SET ROWCOUNT 0
       
       
        SELECT @TotalRows = COUNT(*) FROM Supplier
          WHERE
                (@SupplierName IS NULL OR [SupplierName] LIKE @SupplierName) AND -- If passed only applies to filter
--                (SupplierCity = IsNull(@SupplierCity,SupplierCity)) AND
--                (SupplierCountry = IsNull(@SupplierCountry,SupplierCountry)) AND

                        (SupplierCity like @StringCity) AND
                (SupplierCountry like @StringCountry) AND
                (@SupplierEmail IS NULL OR SupplierEmail LIKE @SupplierEmail)
         
        PRINT Convert(varchar(30),@TotalRows) + ' - Total Rows'    
       
END

_______________________________________________________


Please help sort this issue. Thank you very much.
0
Comment
Question by:MadhuMenong
  • 4
  • 2
7 Comments
 
LVL 1

Expert Comment

by:beyazlale
ID: 34211229
How is SupplierCollection type defined?
0
 

Author Comment

by:MadhuMenong
ID: 34211239

using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
using System.Text;

namespace OMS.Entity
{
    public class Supplier
    {
        private int supplierID;
        private string supplierName;
        private string supplierAddress1;
        private string supplierAddress2;
        private int supplierCity;
        private int supplierCountry;
        private string supplierPinCode;
        private string supplierEmail;
        private string supplierTelephone;

        public int SupplierID
        {
            get { return supplierID; }
            set { supplierID = value; }
        }

        public string SupplierName
        {
            get { return supplierName; }
            set { supplierName = value; }
        }

        public string SupplierAddress1
        {
            get { return supplierAddress1; }
            set { supplierAddress1 = value; }
        }

        public string SupplierAddress2
        {
            get { return supplierAddress2; }
            set { supplierAddress2 = value; }
        }

        public int SupplierCity
        {
            get { return supplierCity; }
            set { supplierCity = value; }
        }

        public int SupplierCountry
        {
            get { return supplierCountry; }
            set { supplierCountry = value; }
        }

        public string SupplierPinCode
        {
            get { return supplierPinCode; }
            set { supplierPinCode = value; }
        }

        public string SupplierEmail
        {
            get { return supplierEmail; }
            set { supplierEmail = value; }
        }

        public string SupplierTelephone
        {
            get { return supplierTelephone; }
            set { supplierTelephone = value; }
        }
   
    }



// The below is the SupplierCollection

    public class SupplierCollection : Collection<Supplier> { }
}
0
 

Accepted Solution

by:
MadhuMenong earned 0 total points
ID: 34211260
Dear Friends,

I found the problem, a big big mistake. I set the AutoGenerateColumns="false" and failed to define any columns.
But after I set the AutoGenerateColumns="true" its working.  


0
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 
LVL 1

Expert Comment

by:beyazlale
ID: 34211268
http://msdn.microsoft.com/en-us/library/system.web.ui.webcontrols.objectdatasource.selectmethod.aspx The select method has restrictions on return type. I am not sure how you defined but, can you try returning List<Supplier> in your methods? (change SupplierCollections wtih List<Supplier> I mean)
0
 

Author Comment

by:MadhuMenong
ID: 34211978
Dear rkworlds,

I dont understand this, why you are asking to delete post? Have I dont something wrong, please advise.
0
 

Author Closing Comment

by:MadhuMenong
ID: 34237313
The AutoGenerateColumns="false" and columns were not defined which was identified and rectified by me. So the points are not awarded anybody else but me. Having said that and be fair to others I really appreciate the efforts of all members to help sort issues.
Thank you.
0

Featured Post

Ask an Anonymous Question!

Don't feel intimidated by what you don't know. Ask your question anonymously. It's easy! Learn more and upgrade.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Problem Hi all,    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 …
Hello there! As a developer I have modified and refactored the unit tests which was written by fellow developers in the past. On the course, I have gone through various misconceptions and technical challenges when it comes to implementation. I would…
This lesson discusses how to use a Mainform + Subforms in Microsoft Access to find and enter data for payments on orders. The sample data comes from a custom shop that builds and sells movable storage structures that are delivered to your property. …
Screencast - Getting to Know the Pipeline

886 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question