Skip to content

Infragistics Community Forum / Web / Ultimate UI for ASP.NET Web Forms / Get WebGridView row from dropdownlist selectedindexchanged

Get WebGridView row from dropdownlist selectedindexchanged

New Discussion
Roger Tristan
Roger Tristan asked on Feb 12, 2019 6:03 AM

okay so in a typical gridview (Microsoft ASP.net one) you can put a drop down list in a template column, then in the selectedindexchanged event you can type this

    Protected Sub ddl_PackWeek_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs)

        Dim gd_data1 As New DataAccessLayer()

        'get dropdownlist object
        Dim Myddl As DropDownList = CType(sender, DropDownList)

        'use naming container property to get the row in which the control resides
        Dim MyRow As GridViewRow = CType(Myddl.NamingContainer, GridViewRow)

'database call
        gd_data1.updatePackWeek(MyRow.Cells(0).Text, Myddl.SelectedItem.Value)

        Me.gv_receiving.DataBind()
    End Sub

How do you do this in a web grid view?

in so many words, how do I access info from the ROW of my Drop Down List?

ASP if you need it

                                         
                                         
                                              
                                             
                                         </ItemTemplat

 

 

Sign In to post a reply

Replies

  • 0
    Svetla Boykova
    Svetla Boykova answered on Feb 11, 2019 10:29 AM

    Hello Roger,

    You can see the following sample that demonstrates the Drop-Down Editors in WebDataGrid here.

    You can check this help help topic  as well.

    You can find the row the drop-down belongs using SelectionChanged client event as described in that forum post

    You can find the row the drop-down belongs using SelectionChanged server event as described in that forum post

    Let me know if I may be of further assistance.

    Svetla Boykova

    • 0
      Roger Tristan
      Roger Tristan answered on Feb 11, 2019 4:01 PM

      Ok what about itemcommand ? 

      • 0
        Svetla Boykova
        Svetla Boykova answered on Feb 12, 2019 6:03 AM

        Hello Roger,

        You can find more information about WebDataGrid Using ItemCommand Event in the following help topic:

        WebDataGrid Using ItemCommand Event

        Let me know if I may be of further assistance.

        Svetla Boykova

  • You must be logged in to reply to this topic.
Discussion created by
Favorites
Replies
Created On
Last Post
Discussion created by
Roger Tristan
Favorites
0
Replies
3
Created On
Feb 12, 2019
Last Post
7 years ago

Suggested Discussions

Created by

Created on

Feb 12, 2019 6:03 AM

Last activity on

Feb 23, 2026 6:58 AM