I have to rad combo boxes, RadLaborSchedule (rad1) and RadLaborCatDesc (rad2). Both these rad combo boxes are declared as EditItems in a radgrid. How do I populate rad2 with selected value of rad1?
I tried using this code in javascript, which errors out at compile time because RadLaborCatDesc can not be found, being an edit item of a rad grid.
Thanks.
Suresh
Here is the javascript:
//global variables for the countries and cities comboboxes
var LaborCatCombo;
function pageLoad()
{
// initialize the global variables
// in this event all client objects
// are already created and initialized
LaborCatCombo = $find(
"<%= RadComboBoxLaborCatDesc.ClientID %>");
}
function LoadLaborCategories(combo, eventArqs)
{
var item = eventArqs.get_item();
LaborCatCombo.set_text(
"Loading...");
LaborCatCombo.clearSelection();
// if a labor schedule is selected
if (item.get_index() > 0)
{
// this will fire the ItemsRequested event of the
// countries combobox passing the continentID as a parameter
LaborCatCombo.requestItems(item.get_value(),
false);
}
else
{
// the -Select a continent- item was chosen
LaborCatCombo.set_text(
" ");
LaborCatCombo.clearItems();
}
}
And this is the radgrid declaration:
<telerik:GridTemplateColumn DataField="LaborSchedule" HeaderText="Labor Schedule" UniqueName="LaborSchedule">
<ItemTemplate >
<asp:Label id="LabelLaborSchedule" runat="server" Text='<%#DataBinder.Eval(Container.DataItem, "LaborSchedule")%>'
></asp:Label>
</ItemTemplate>
<ItemStyle Width="500px" />
<EditItemTemplate>
<telerik:RadComboBox DataTextField="LaborSchedule"
DataValueField="LaborSchedule"
AutoPostBack="false"
EnableLoadOnDemand="True"
ID="RadComboBoxLaborschedule"
runat="server"
Height="140px"
Width="100px"
SelectedValue = '<%#DataBinder.Eval(Container.DataItem, "LaborSchedule")%>'
SelectedText = '<%#DataBinder.Eval(Container.DataItem, "LaborSchedule")%>'
DataSourceId = "ObjectDataSourceGetSchedules"
OnItemsRequested= "RadComboBoxLaborschedule_ItemsRequested"
OnClientSelectedIndexChanging="LoadLaborCategories"
>
</telerik:RadComboBox>
</EditItemTemplate>
</telerik:GridTemplateColumn>
<telerik:GridTemplateColumn DataField="LaborCategoryDesc" HeaderText="LaborCategoryDesc" UniqueName="RadComboBoxLaborCatDesc">
<ItemTemplate>
<asp:Label id="LabelLaborCategoryDesc" runat="server" Text='<%#DataBinder.Eval(Container.DataItem, "LaborCategoryDesc")%>'
></asp:Label>
</ItemTemplate>
<EditItemTemplate>
<telerik:RadComboBox ID="RadComboBoxLaborCatDesc" runat="server"
DataTextField="LaborCategoryDesc"
DataValueField="LaborCategoryCode"
SelectedValue = '<%#DataBinder.Eval(Container.DataItem, "LaborCategoryCode")%>'
SelectedText = '<%#DataBinder.Eval(Container.DataItem, "LaborCategoryDesc")%>'
DataSourceId = "ObjectDataSourceLabelCategory"
OnItemsRequested= "RadComboBoxLaborCatDesc_ItemsRequested"
AutoPostBack="false"
>
</telerik:RadComboBox>
</EditItemTemplate>
</telerik:GridTemplateColumn>
| <div id="tabs"> |
| <telerik:RadTabStrip ID="rtsCategoryList" runat="server" skin="" EnableEmbeddedSkins="false" Width="788px" Height="20px" |
| OnTabClick="rtsCategoryList_TabClick" ScrollChildren="true" |
| PerTabScrolling="true" ScrollPosition="0" BackColor="#000000" ScrollButtonsPosition="Right"> |
| </telerik:RadTabStrip> |
| </div> |
Default.aspx.cs (Relevant Portion Only)
| DataTable table = RetrievalProcedures.SpWsGetCategoriesByCityState(_city, _state); |
| // Build the tabs. |
| foreach (DataRow row in table.Rows) |
| { |
| RadTab newTab = new RadTab(); |
| newTab.Value = row["categoryId"].ToString(); |
| newTab.Text = row["categoryName"].ToString(); |
| newTab.CssClass = "tab"; |
| newTab.HoveredCssClass = "tabHover"; |
| newTab.SelectedCssClass = "tabSelected"; |
| rtsCategoryList.Tabs.Add(newTab); |
| } |
| // Set the first tab as selected. |
| rtsCategoryList.Tabs[0].Selected = true; |
main.css (Relevant Portion Only)
| div.divBusinessSearchPanel #tabs |
| { |
| width: 788px; |
| height: 20px; |
| border: 0px; |
| margin-bottom: 0px; |
| } |
| div.divBusinessSearchPanel .tab, div.divBusinessSearchPanel .tabHover, div.divBusinessSearchPanel .tabSelected |
| { |
| display: inline-block; |
| width: 120px; |
| height: 18px; |
| margin: 0px 2px 0px 0px; |
| padding: 2px 0px 0px 0px; |
| font-size: 12px; |
| font-weight: bold; |
| color: #ffffff; |
| text-align: center; |
| } |
| div.divBusinessSearchPanel .tab |
| { |
| background-image: url(/images/ReusableControls/BusinessSearchPanel/bg-tab.png); |
| color: #ffffff; |
| } |
| div.divBusinessSearchPanel .tabHover |
| { |
| background-image: url(/images/ReusableControls/BusinessSearchPanel/bg-tab.png); |
| color: #fff000; |
| } |
| div.divBusinessSearchPanel .tabSelected |
| { |
| background-image: url(/images/ReusableControls/BusinessSearchPanel/bg-tab-selected.png); |
| color: #f0f0f0; |
| } |
| div.divBusinessSearchPanel .rtsPrevArrow |
| { |
| background-color: #eeefff; |
| } |
| div.divBusinessSearchPanel .rtsNextArrow |
| { |
| background-color: #000fff; |
| } |
| <telerik:GridTemplateColumn HeaderText="Type" DataField="Type" > |
| <ItemTemplate> |
| <%# Eval("Type.Name") %> |
| </ItemTemplate> |
| <EditItemTemplate> |
| <telerik:RadComboBox ID="PropertyType" runat="server" Width="250" Height="150" |
| DropDownWidth="300" ShowDropDownOnTextboxClick="true" MarkFirstMatch="true" |
| ShowToggleImage="false" AppendDataBoundItems="true" |
| DataSourceID="PropertyTypes" DataValueField="Id" DataTextField="Name" |
| AllowCustomText="false" SelectedValue='<%# Bind("Type.Id") %>'> |
| <Items> |
| <telerik:RadComboBoxItem Text="" /> |
| </Items> |
| </telerik:RadComboBox> |
| </EditItemTemplate> |
| </telerik:GridTemplateColumn> |
I have a radchart with a default type of spline. The issue is that user can't tell the beginning and end of the line. I have tried all the different end caps but because they are the same color they just are not obvious.
I couldn't figure out how to use the custom endCap or StartCap and I am looking for a solution or alternative such as plotting two points.