or
[OperationContract]
[WebInvoke(Method =
"POST"
, BodyStyle = WebMessageBodyStyle.WrappedRequest, RequestFormat = WebMessageFormat.Json, ResponseFormat = WebMessageFormat.Json)]
RadTreeNodeData[] GetNodes(RadTreeNodeData node, IDictionary<
string
,
object
> context);
<
telerik:RadTreeView
ID
=
"RadTreeView1"
runat
=
"server"
Width
=
"100%"
PersistLoadOnDemandNodes
=
"false"
EnableViewState
=
"false"
LoadingStatusPosition
=
"AfterNodeText"
>
<
ExpandAnimation
Type
=
"none"
></
ExpandAnimation
>
<
CollapseAnimation
Type
=
"none"
></
CollapseAnimation
>
<
WebServiceSettings
Path
=
"http://localhost/_vti_bin/xxxx.xxxx.xxxx/myTopBarNavigation.svc"
Method
=
"GetNodes"
UseHttpGet
=
"false"
></
WebServiceSettings
>
<
Nodes
>
<
telerik:RadTreeNode
Text
=
"Root Node"
ExpandMode
=
"WebService"
>
</
telerik:RadTreeNode
>
</
Nodes
>
</
telerik:RadTreeView
>
//This code sets the initial dimensions of the CropBox and the aspect ratio
this
._widthTxt.value = 300;
this
._heightTxt.value = 300;
var
ratio = 100 / 100;
// (w/h)
this
._setCropBoxRatio(ratio);
this
._sizeRatio = ratio;
this
._updateCropBoxFromControls();
I have gone through a couple of examples to achieve this. I am unable to bind my combobox to a datasource. The combobox on dropdown doesn't display a list of values.
I have a RadGrid as follows:
_RadGrid1.MasterTableView.DataKeyNames = new string[] { this._PopRuleList.PopCapabilityRuleIdColumn.ColumnName }; _RadGrid1.Width = Unit.Percentage(98); _RadGrid1.PageSize = 15; _RadGrid1.AllowPaging = true; _RadGrid1.PagerStyle.Mode = GridPagerMode.NextPrevAndNumeric; _RadGrid1.AllowSorting = true; _RadGrid1.AllowFilteringByColumn = _ShowFilter; _RadGrid1.ShowStatusBar = _ShowFilter; _RadGrid1.AutoGenerateColumns = false; _RadGrid1.MasterTableView.NoMasterRecordsText = "There are no exceptions."; _RadGrid1.Skin = "WebBlue"; _RadGrid1.MasterTableView.Width = Unit.Percentage(100); _RadGrid1.ItemCommand += RadGrid1_ItemCommand; _RadGrid1.ShowHeader = true;
string ColumnName = "Bandwidth"; boundColumn = new GridBoundColumn(); boundColumn.FilterTemplate = new MyTemplate(ColumnName, _RadGrid1); _RadGrid1.MasterTableView.Columns.Add(boundColumn); boundColumn.DataField = this._PopRuleList.BandwidthsColumn.ColumnName; boundColumn.AllowFiltering = true; boundColumn.HeaderText = "Bandwidth"; boundColumn.UniqueName = "Bandwidth"; boundColumn.HeaderStyle.Width = Unit.Pixel(25);Also I have the following class:
class MyTemplate : ITemplate { protected RadComboBox combo; private string colname; RadGrid radgrid; GlobalCrossing.IFO.ServerControls.Pops.CapabilitiesExceptionListCtrl ce = new GlobalCrossing.IFO.ServerControls.Pops.CapabilitiesExceptionListCtrl(); public MyTemplate(string cName, RadGrid grid) { colname = cName; radgrid = grid; } public void InstantiateIn(System.Web.UI.Control container) { combo = new RadComboBox(); combo.ID = "RadComboBoxControl"; combo.DataBinding += new EventHandler(RadComboBoxControl_DataBinding); container.Controls.Add(combo); combo.AutoPostBack = true; combo.SelectedIndexChanged += new RadComboBoxSelectedIndexChangedEventHandler(RadComboBoxControl_SelectedIndexChanged); } public void RadComboBoxControl_DataBinding(object sender, EventArgs e) { RadComboBox combo = (RadComboBox)sender; GridFilteringItem container = (GridFilteringItem)combo.NamingContainer; combo.DataTextField = ce._PopRuleList.BandwidthsColumn.ColumnName; combo.DataValueField = ce._PopRuleList.BandwidthsColumn.ColumnName; combo.DefaultItem.Text = "All"; combo.EnableAutomaticLoadOnDemand = true; combo.AllowCustomText = true; combo.DataSource = ce._PopRuleList; } void RadComboBoxControl_SelectedIndexChanged(object sender, RadComboBoxSelectedIndexChangedEventArgs e) { RadComboBox combo = sender as RadComboBox; string filterExpression; filterExpression = "([Bandwidth] LIKE '" + e.Value + "')"; radgrid.MasterTableView.FilterExpression = filterExpression; radgrid.MasterTableView.Rebind(); } }Please let me know how can I bind the RadComboBox so that it displays a list of values to select from.