Results 1 to 2 of 2

Thread: Having trouble w/TemplateColumn w/Dropdown having trouble

  1. #1

    Thread Starter
    Registered User
    Join Date
    Jul 2002
    Posts
    80

    Question Having trouble w/TemplateColumn w/Dropdown having trouble

    I have a problem. I have a datagrid that I want to edit. When I press the edit link, the first column dropdown list populates fine. I don't know how to get my dropdown list to default to the value that was in the cell before the edit link was pressed.
    I've played with the OnDataBinding event on the dropdown but have not been successful. I tried to use the Findcontrol method to find the dropdown id but my code does not see it. If I can access the properties and methods of the dropdown I can use a loop until I find a match and use the selectindex= assignment. I have another column with the same data that is hidden. in the procedure that is call when the edit link is clicked I use this column to assign a session variable the value that I want the dropdown to defautl to.Can someone point me in the right direction.

    James

  2. #2
    Fanatic Member
    Join Date
    Dec 2002
    Location
    London
    Posts
    678

    grid

    I am guessing that you are using e.index.itemindex to find the row. Then Can u not use the selectedindex on the drop down?
    Lets say the selectedindex is 4
    Then when the drop down is being populated (say using a datareader) set the index of the dropdown to listindex?

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