Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9121521
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T05:52:54+00:00 2026-06-17T05:52:54+00:00

I have a grid view with 3 columns(Product, Quantity, Price) with header and footer.

  • 0

I have a grid view with 3 columns(Product, Quantity, Price) with header and footer. I added a dropdownlist for the Product footer. Now I want to bind this dropdownlist with products which is in dataset, can anyone help me?
i used the following code in cs file, but im getting error near find control as

“Object reference not set to an instance of an object.

protected void gv_page2_RowDataBound(object sender, GridViewRowEventArgs e)
    {
        dal = new DAL();
        ds = new DataSet();
        ds=dal.DALBindFooterDDL();
        if (e.Row.RowType == DataControlRowType.Footer)
        {
            DropDownList ddl = (DropDownList)gv_page2.FooterRow.FindControl("ftrDDL");
            ddl.DataSource = ds.Tables[0];
            ddl.DataBind();
        }
    }
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-17T05:52:56+00:00Added an answer on June 17, 2026 at 5:52 am

    Use RowCreated (or RowDataBound event) – for example

    void ProductsGridView_RowCreated(Object sender, GridViewRowEventArgs e)
    {
        if(e.Row.RowType == DataControlRowType.FooterRow)
        {
          // Find the product drop-down list, you can id (or cell number)
          var ddlProducts = e.Row.FindControl("Products") as DropDownList;
          // var ddlProducts = e.Row.Cells[0].Controls[0]; // Finding by cell number and index
          if (null != ddlProducts)
          {
              // bind to the data
          }
        }
    }
    

    Disclaimer: untested code – provided to get an idea/hint of actual soltion

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have grid something like this: Ext.define('Exp.view.dashboard.Tv', { extend: 'Ext.grid.Panel', initComponent: function() { this.columns
I have a simple grid view like this : <asp:GridView ID=gv_userActivities runat=server AutoGenerateColumns=False> <Columns>
I have data grid view with columns product name and product image and I
I have one grid view that contains some template columns. In this, the first
I have a Grid View. I added AutoGenerateEditButton=True . I want to display that
I have a grid view that has two simple columns, a report number and
I have a grid view and I add columns to it by code: //Retrieve
I have grid <?php $this->widget('bootstrap.widgets.TbGridView',array( 'id'=>'products-grid', 'htmlOptions'=>array('class'=>'grid-view table-striped',), 'dataProvider'=>$model->search(), 'columns'=>$columns, )); ?> $model->search() return
i have used mvccontrib grid in mvc 2.0 I want to just bind a
So far i have used this coding for view formy mvc contrib grid....here the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.