CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    Apr 2005
    Posts
    33

    Accessing Template Column Elements

    Hello,

    I have a GridView control with a template column. This templated column contains a dropdownlist for edit mode. Suppose I am in edit mode, i.e. I am editing some row. And suppose that some event has been fired, so my handler is being called now. How can I access the dropdownlist of that template column from the C# code? Sorry for this (probably) trivial question, I am new to ASP.NET, and I can't find the answer...

  2. #2
    Join Date
    Dec 2005
    Location
    Waterloo ON
    Posts
    545

    Re: Accessing Template Column Elements

    In RowEditing event of GridView1, you can get the dropdownlist control by
    Code:
    GridView1.Rows(e.NewEditIndex).FindControl("DropDownList1")

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured