Click here to Skip to main content
16,017,899 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi all...,


I want data bound to the drop down of data list,i.e i am already bind the data from one table .but in edit Item template i want bind one datafiled to dropdown from another sqltable. how it is possible .....please suggest me.







Thanks&Regards,
SriramNidamanuri.
Posted

1 solution

protected void rgItems_ItemCommand(object sender, GridCommandEventArgs e)
{
     If(e.CommandName == "Edit")// or "Update";
    ComboBox cBox = (e.Item.FindControl("your ComboBox") as ComboBox);
    //now treat cBox as "Your ComboBox"  so you can bind data to it
}
//but dont forget to add in you aspx page in your grid (OnItemCommand="rgItems_ItemCommand")

regards
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900