private void SetActions()
{
String sString =
@"
function SaveTreeState(action)
{
var tree = $find('" + RadTreeView1.ClientID + @"');
if(tree == null) { return; }
var nodes = tree.get_allNodes();
if(action == 'expand')
{
for(var cnt=0; cnt<nodes.length; cnt++)
{
nodes[cnt].expand();
}
}
if(action == 'collapse')
{
for(var cnt=0; cnt<nodes.length; cnt++)
{
nodes[cnt].collapse();
}
}
var expandedNodes = '';
for(var cnt=0; cnt<nodes.length; cnt++)
{
if(nodes[cnt].get_expanded())
{
expandedNodes += nodes[cnt].get_value() + '|';
}
}
SaveCookie('mpnotetreestate',expandedNodes);
}
function SaveCookie(name,value,days) {
if (days) {
if (days>730) {
days=730;
}
var date = new Date();
date.setTime(date.getTime()+(days*24*60*60*1000));
var expires = '; expires='+date.toGMTString();
}
else var expires = '';
document.cookie = name+'='+value+expires+'; path=/';
}
";
ScriptManager.RegisterClientScriptBlock(this, typeof(ViewNotes), "SaveTreeStateBlock", sString, true);
ViewToolBar1.btnExpandAll.Attributes.Add("onclick", "try{SaveTreeState('expand');}catch(err){return;}return false;");
ViewToolBar1.btnCollapseAll.Attributes.Add("onclick", "try{SaveTreeState('collapse');}catch(err){return}return false;");
}
OnClientNodeExpanded="SaveTreeState" ShowLineImages="false" ID="RadTreeView1" runat="server">
<CollapseAnimation Duration="100" Type="None" />
<ExpandAnimation Duration="100" Type="None" />
function OnRibbonBarButtonClicking(sender, args) { if (args.get_button().get_value() == "delete") { args.set_cancel(true); radConfirm("Sure?", _callbackFunc); }}function _callbackFunc(arg) { if (arg) { // do postback, but how? }}Hi There
I have a RadComboBox
And definition look like this
<telerik:RadComboBox Filter="Contains" runat="server" ID="cmbTechnicalServicePerson" Width="420px"
MarkFirstMatch="true" DataSourceID="DSGetTechnicalServicePerson"
HighlightTemplatedItems="true" OnClientItemsRequested="UpdateItemCountField"
OnDataBound="cmbTechnicalServicePerson_DataBound" OnItemDataBound="cmbTechnicalServicePerson_ItemDataBound"
LabelWidth="100" Label="Technical Service Name:" Skin="Office2010Black" Style="position: absolute; top: 310px; left: 21px; z-index: 6500; height: 16px;" EmptyMessage="Select a Value" TabIndex="3">
<HeaderTemplate>
<ul>
<li class="col1">Name</li>
<li class="col2">Position</li>
<li class="col2">Unit</li>
</ul>
</HeaderTemplate>
<ItemTemplate>
<ul>
<li class="col1">
<%# DataBinder.Eval(Container.DataItem, "[FULLNAME]")%></li>
<li class="col2">
<%# DataBinder.Eval(Container.DataItem, "Position")%></li>
<li class="col3">
<%# DataBinder.Eval(Container.DataItem, "[Department]")%></li>
</ul>
</ItemTemplate>
<FooterTemplate>
A total of
<asp:Literal runat="server" ID="RadComboItemsTCount" />
items
</FooterTemplate>
</telerik:RadComboBox>
Some time user would like to un select the selected value but this setting does not allow them. Initial the EmptyMessage="Select a Value" appear but as soon as they select something they will not be able to unselect to the empty value
Can someone please give some suggestion?
Many thanks
Syed


| <telerik:RadGrid ID="RadGrid1" ShowStatusBar="true" Height="420px" EnableAJAX="true" |
| runat="server" AutoGenerateColumns="False" AllowSorting="true" AllowMultiRowSelection="False" |
| AllowPaging="true" GridLines="None" ShowFooter="true" |
| AllowFilteringByColumn="false" EnableDrag="false" |
| EnableHeaderContextMenu="false" TableLayout="auto" |
| AllowAutomaticDeletes="True" AllowAutomaticInserts="True" |
| AllowAutomaticUpdates="True" PageSize="10" |
| OnNeedDataSource="RadGrid1_NeedDataSource" |
| OnItemDataBound="RadGrid1_ItemDataBound" |
| OnUpdateCommand="RadGrid1_UpdateCommand" |
| OnInsertCommand="RadGrid1_InsertCommand" |
| OnDeleteCommand="RadGrid1_DeleteCommand" |
| onitemcommand="RadGrid1_ItemCommand" |
| > |
| protected void RadGrid1_InsertCommand(object source, GridCommandEventArgs e) |
| { |
| // Perform insert |
| RadGrid1.MasterTableView.ClearEditItems(); |
| } |