Hi,
In RadGird I have taken one RadComboBox, in that I have taken the thins as follow
<telerik:RadGrid ID="rg_AddPorts" runat="server" AllowPaging="True" Skin="Default"
GridLines="Horizontal" PageSize="10" Width="100%" OnNeedDataSource="rg_AddPorts_NeedDataSource"
OnInsertCommand="rg_AddPorts_InsertCommand" OnItemDataBound="rg_AddPorts_ItemDataBound"
OnUpdateCommand="rg_AddPorts_UpdateCommand">
<MasterTableView CommandItemDisplay="TopAndBottom" AutoGenerateColumns="false" DataKeyNames="Port_PortNo"
EditMode="EditForms" CommandItemSettings-AddNewRecordText="Add Ports">
<Columns>
………
</Columns>
<EditFormSettings EditFormType="Template">
<EditColumn UniqueName="EditCommandColumn1">
</EditColumn>
<FormTemplate>
<!-- Grid Table Designing->
<table cellpadding="0" cellspacing="0" border="0" width="100%" class="TblMaster">
<tr>
<td>
<telerik:RadComboBox ID="rcbxCity" runat="server" Height="190px" Width="127px" MarkFirstMatch="true"
EnableLoadOnDemand="true" HighlightTemplatedItems="true" DataTextField="Place_City"
DataValueField="Place_No" DropDownWidth="300">
<HeaderTemplate>
<table style="width: 375px" cellspacing="0" cellpadding="0">
<tr>
<td style="width: 125px;">
City
</td>
<td style="width: 125px;">
State
</td>
<td style="width: 125px;"> Country
</td></tr></table> </HeaderTemplate> <ItemTemplate> <table style="width: 375px" cellspacing="0" cellpadding="0"> <tr> <td style="width: 125px;" class="comboItemCell"> <div class="comboItem"> <%# DataBinder.Eval(Container.DataItem, "place_City")%> </div> </td> <td style="width: 125px;" class="comboItemCell"> <div class="comboItem"> <%# DataBinder.Eval(Container.DataItem, "place_State")%> </div> </td> <td style="width: 125px;" class="comboItemCell"> <div class="comboItem"> <%# DataBinder.Eval(Container.DataItem, "place_Country")%> </div> </td> </tr></table> </ItemTemplate> </telerik:RadComboBox> </td>
protected void rg_AddPorts_ItemDataBound(object sender, GridItemEventArgs e)
{
if ((e.Item is GridEditFormItem) && (e.Item.IsInEditMode))
{
GridEditFormItem item1 = (GridEditFormItem)e.Item;
RadComboBox rcbxPortCity = item1.FindControl("rcbxCity") as RadComboBox;
DataSet ds=BO_AddPorts.Fill_PortCity();
rcbxPortCity.DataSource = ds;
rcbxPortCity.DataBind();
}
}
And when I click “AddNew Record”Button on RadGird its Biding Perfectly. But when I want to Edit Records then I am nt able to Bind Corresponding record
Edit Mode
This time I am n table to bind The corresponding record.
Here I am taking this PlaceNo,City,State,country in to separate table and Bidning like this. Pls Guide me how to Bind Exact Inserted record when I will perform Edit Mode.