the weird part is - if the combobox has data in it - it doesn't fire the OnItemsRequested event, but i can clear out the contents and it fires just fine.
is there something i'm missing here? it's got to be something simple. i've included partial markup for the grid - the databind method & the combobox method.
any help is totally appreciated.
thanks
rik
RAD GRID MARKUP:::
<telerik:RadGrid ID="WorkOrderItemsRadGrid" runat="server" AllowPaging="true" AutoGenerateColumns="false"
Skin="WebBlue" PageSize="8" EnableTheming="false" AllowFilteringByColumn="false" AllowCustomPaging="false"
OnItemDataBound="WorkOrderItemsRadGrid_ItemDataBound" OnNeedDataSource="WorkOrderItemsRadGrid_NeedDataSource"
Width="100%" OnItemCreated="WorkOrderItemsRadGrid_ItemCreated" AllowMultiRowSelection="true">
<GroupingSettings CaseSensitive="false" />
<PagerStyle Mode="NextPrevAndNumeric" />
<MasterTableView DataKeyNames="WORKORDERNUMBER,LOCATIONID,WORKORDERID,WORKORDERDETAILID,WOTYPENAME,LASTUPDATED,RACKNUMBER,LASTUPDATEDBY,MATERIALTYPE,MATERIALTYPEID,MATERIALDESCRIPTION"
CommandItemSettings-ShowAddNewRecordButton="false" EditMode="PopUp" CommandItemDisplay="Top"
AllowSorting="true" CommandItemSettings-RefreshText="Refresh" CommandItemSettings-RefreshImageUrl="~/App_Themes/GOLD Main/ToolBar/refresh_16x16.gif" >
<HeaderStyle HorizontalAlign="Left" />
<Columns>
<telerik:GridTemplateColumn AllowFiltering="false" HeaderStyle-Width="100px" UniqueName="RackNumberColumn"
ItemStyle-HorizontalAlign="Left" ItemStyle-Width="100px" HeaderText="Rack">
<ItemTemplate>
<telerik:RadComboBox ID="RackNumberGridComboBox" runat="server" Width="90px" Height="160px"
Skin="WebBlue" EnableLoadOnDemand="true" AutoPostBack="true" OnItemsRequested="RackNumberGridComboBox_ItemsRequested"
AllowCustomText="false" HighlightTemplatedItems="true" DataValueField="RACKID"
DataTextField="RACKNUMBER" DropDownWidth="210px">
<HeaderTemplate>
<ul class="woCustomerDropDown" style="width: 180px;">
<li class="woCustomerCol" style="width: 120px;">Rack Number</li>
<li class="woCustomerCol" style="width: 60px;">Utilization</li>
</ul>
</HeaderTemplate>
<ItemTemplate>
<ul class="woCustomerDropDown" style="width: 180px;">
<li class="woCustomerCol" style="width: 120px;">
<%# DataBinder.Eval(Container.DataItem, "RACKNUMBER") %></li>
<li class="woCustomerCol" style="width: 60px;">
<%# DataBinder.Eval(Container.DataItem, "UTILIZATION") %></li>
</ul>
</ItemTemplate>
</telerik:RadComboBox>
</ItemTemplate>
</telerik:GridTemplateColumn>
<telerik:GridBoundColumn DataField="WORKORDERITEMDISPLAY" HeaderText="Work Order"
HeaderStyle-Width="80px" FilterControlWidth="60px" />
</Columns>
</MasterTableView>
</telerik:RadGrid>
RAD GRID DATABIND:
protected void WorkOrderItemsRadGrid_ItemDataBound(object sender, GridItemEventArgs e)
{
GridCommandItem cmndItem = (GridCommandItem)WorkOrderItemsRadGrid.MasterTableView.GetItems(GridItemType.CommandItem)[0];
LinkButton btn = (LinkButton)cmndItem.FindControl("RebindGridButton");
((System.Web.UI.WebControls.TableCell)(btn.Parent)).HorizontalAlign = HorizontalAlign.Left;
if (e.Item is GridDataItem)
{
GridDataItem boundItem = (GridDataItem)e.Item;
string wonumber = Convert.ToString(boundItem.OwnerTableView.DataKeyValues[boundItem.ItemIndex]["WORKORDERNUMBER"]);
string woid = Convert.ToString(boundItem.OwnerTableView.DataKeyValues[boundItem.ItemIndex]["WORKORDERID"]);
string locationid = Convert.ToString(boundItem.OwnerTableView.DataKeyValues[boundItem.ItemIndex]["LOCATIONID"]);
string wodetailid = Convert.ToString(boundItem.OwnerTableView.DataKeyValues[boundItem.ItemIndex]["WORKORDERDETAILID"]);
string lastracknumber = Convert.ToString(boundItem.OwnerTableView.DataKeyValues[boundItem.ItemIndex]["RACKNUMBER"]);
string lastrackid = Convert.ToString(boundItem.OwnerTableView.DataKeyValues[boundItem.ItemIndex]["RACKID"]);
string lastupdate = Convert.ToString(boundItem.OwnerTableView.DataKeyValues[boundItem.ItemIndex]["LASTUPDATED"]);
string lastupdateby = Convert.ToString(boundItem.OwnerTableView.DataKeyValues[boundItem.ItemIndex]["LASTUPDATEDBY"]);
int materialtypeid = Convert.ToInt32(boundItem.OwnerTableView.DataKeyValues[e.Item.ItemIndex]["MATERIALTYPEID"]);
string materialdesc = boundItem.OwnerTableView.DataKeyValues[e.Item.ItemIndex]["MATERIALDESCRIPTION"].ToString();
if (lastracknumber != "")
{
RadComboBox rackBox = boundItem.FindControl("RackNumberGridComboBox") as RadComboBox;
using (TruckingBC tbc = new TruckingBC())
{
rackBox.DataSource = tbc.GetRackNumbers(DivisionID,lastracknumber);
rackBox.DataBind();
}
}
}
COMBO BOX ON GRID EVENTS:
protected void RackNumberGridComboBox_ItemsRequested(object sender, RadComboBoxItemsRequestedEventArgs e)
{
RadComboBox comboBox = (RadComboBox)sender;
using (TruckingBC tbc = new TruckingBC())
{
comboBox.DataSource = tbc.GetRackNumbers(DivisionID);
comboBox.DataBind();
}
}