
AutoCompleteBoxEntry childNode = new AutoCompleteBoxEntry(); childNode.Text = lblTeamLeaderName.Text; childNode.Value = lblTASKTEAM_ID.Text; txtusers.Entries.Add(childNode);txtusers.Entries[0].Value = lblTASKTEAM_ID.Text; txtusers.Entries[0].Text = lblTeamLeaderName.Text;Hi,
I want to use client side binding and need to set additional Parameters (projectId) for GetTasks(). Every other controls (scheduler etc.) has a client Event, where I can set additional parameters in context. Is there a similar client event in RadGantt? To use session variables is no option for me.
thx
gregor
Hi,
I have an issue with users pasting invalid HTML into the editor (usually from an email client). The HTML comes in with no closing tags, which then causes issues when we render the saved content onto a web page.
Example
<span style>some text<span style>more text <span style> some more textIs there any way to either strip the invalid tags out or add the closing tags when the user pastes the data?
Thanks
Gavin.

I'm unable to get a RadListBox to sort.
.Net 4.5; version 2015.1.225.45
Here is the code below:
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="default.aspx.cs" Inherits="WebApplication1._default" %>
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
</head>
<body>
<form id="form1" runat="server">
<asp:ScriptManager ID="ScriptManager1" runat="server" />
<telerik:RadSkinManager ID="RadSkinManager1" runat="server" ShowChooser="false" />
<telerik:RadAjaxPanel runat="server" ID="RadAjaxPanel1" CssClass="demo-containers">
<div class="demo-container size-thin">
<telerik:RadListBox
ID="RadListBox1"
runat="server"
Sort="Descending"
DataSortField="t"
CheckBoxes="true"
ShowCheckAll="true" >
</telerik:RadListBox>
</div>
</telerik:RadAjaxPanel>
</form>
</body>
</html>
protected void Page_Load(object sender, EventArgs ed)
{
DataTable dt = new DataTable();
dt.Clear();
dt.Columns.Add("v");
dt.Columns.Add("t");
DataRow a = dt.NewRow();
a["v"] = "1"; a["t"] = "a";
dt.Rows.Add(a);
DataRow b = dt.NewRow();
b["v"] = "2"; b["t"] = "f";
dt.Rows.Add(b);
DataRow c = dt.NewRow();
c["v"] = "3"; c["t"] = "d";
dt.Rows.Add(c);
DataRow d = dt.NewRow();
d["v"] = "4";d["t"] = "x";
dt.Rows.Add(d);
DataRow e = dt.NewRow();
e["v"] = "5"; e["t"] = "b";
dt.Rows.Add(e);
RadListBox1.DataSource = dt;
RadListBox1.DataTextField = "t";
RadListBox1.DataValueField = "v";
RadListBox1.DataBind();
}
<body> <form id="form1" runat="server"> <div> <asp:ScriptManager ID="ScriptManager1" runat="server"> </asp:ScriptManager> <telerik:RadSchedulerRecurrenceEditor runat="server" ID="AppointmentRecurrenceEditor" SharedCalendarID="SharedCalendar" StartDate="2000-01-20" /> <telerik:RadCalendar runat="server" ID="SharedCalendar" ShowRowHeaders="false" RangeMinDate="1900-01-01" /> <asp:HiddenField runat="server" ID="OriginalRecurrenceRule" /> </div> </form></body>Is there anybody can help me to do like this on attachment? I have one text box and one telerik grid and one button. What I want to do is when user enter room no in text box and click GO button then I want to point out text box value on grid because grid have many records.I would like to show attached screen shot.
Thanks
Hello,
I have a problem with RadListBox in a Control Page (.ASCX). Everything seems to work fine when transferring from one RadListBox to a second one from client-side.
The problem is after post back. Changes are not being read. These are my JS and ASPX codes.
I would appreciate any help. Thank you.
var listBox;var listBox2; function transferItem(item, lbSource, lbTarget) { var itemsTarget = lbTarget.get_items(); lbTarget.trackChanges(); itemsTarget.insert(0, item); lbTarget.commitChanges();} function pageLoad() { var $ = $telerik.$; listBox = $find("<%= AllLanguages.ClientID %>"); listBox2 = listBox.get_transferTo();} function transferRight() { var items = listBox.get_selectedItems(); for (var i = 0; i < items.length; i++) { var item = items[i]; if (item.get_text() != "Select" || item.get_value() != "") { transferItem(item, listBox, listBox2); } } listBox.clearSelection(); listBox2.clearSelection(); return false;} function transferLeft() { var items = listBox2.get_selectedItems(); for (var i = 0; i < items.length; i++) { var item = items[i]; if (item.get_text() != "Select" || item.get_value() != "") { transferItem(item, listBox2, listBox); } } listBox.clearSelection(); listBox2.clearSelection(); return false;} function removeAll() { var items = listBox2.get_items(); for (var i = items.get_count() - 1 ; i > -1 ; --i) { transferItem(items.getItem(i), listBox2, listBox); }}
<table border="0" style="width: 760px; border-collapse: collapse; border-spacing: 0px"> <tr> <td>Available:</td> <td></td> <td>Selected:</td> </tr> <tr> <td> <telerik:RadListBox ID="AllLanguages" runat="server" Height="500px" Width="300px" SelectionMode="Multiple" TransferToID="SelectedLanguages"></telerik:RadListBox> </td> <td> <telerik:RadButton ID="btnAdd" runat="server" Text="Add >" Width="100px" OnClick="btnAdd_Click" OnClientClicked="transferRight" AutoPostBack="False" UseSubmitBehavior="False"></telerik:RadButton> <br /> <telerik:RadButton ID="btnRemove" runat="server" Text="< Remove" Width="100px" OnClientClicked="transferLeft" AutoPostBack="False" UseSubmitBehavior="False"></telerik:RadButton> <br /> <telerik:RadButton ID="btnRemoveAll" runat="server" Text="Remove All" Width="100px" OnClientClicked="removeAll" AutoPostBack="False" UseSubmitBehavior="False"></telerik:RadButton> <br /> </td> <td> <telerik:RadListBox ID="SelectedLanguages" runat="server" Height="500px" Width="300px" OnClientLoad="pageLoad"></telerik:RadListBox> </td> </tr></table>
I have a hierarchical radgrid that is displaying "No child records to display" even when records exist. See attached photo. Below is my RadGrid definition:
<telerik:RadGrid ID="RadGrid1" runat="server" ShowStatusBar="true" AutoGenerateColumns="False" AllowSorting="True" OnDetailTableDataBind="RadGrid1_DetailTableDataBind" OnNeedDataSource="RadGrid1_NeedDataSource" OnPreRender="RadGrid1_PreRender" GroupPanelPosition="Top" OnBatchEditCommand="RadGrid1_BatchEditCommand" Skin="Office2010Black" AllowFilteringByColumn="True" CellSpacing="-1" GridLines="Both" Visible="false"> <MasterTableView DataKeyNames="wbs_id" RetainExpandStateOnRebind="True" AllowMultiColumnSorting="True" CommandItemDisplay="Top"> <DetailTables> <telerik:GridTableView runat="server" Width="100%" DataKeyNames="task_id" RetainExpandStateOnRebind="True" Name="Steps"> <CommandItemSettings ShowAddNewRecordButton="False"></CommandItemSettings> </telerik:GridTableView> <telerik:GridTableView runat="server" Width="100%" DataKeyNames="task_id" RetainExpandStateOnRebind="True" Name="Steps"> <DetailTables> <telerik:GridTableView runat="server" Width="100%" DataKeyNames="task_id" RetainExpandStateOnRebind="True" EditMode="Batch" Name="StepDetails" CommandItemDisplay="Top"> </telerik:GridTableView> </DetailTables> </telerik:GridTableView> </DetailTables> <CommandItemSettings ShowAddNewRecordButton="False"></CommandItemSettings> </MasterTableView> <PagerStyle Mode="NumericPages"></PagerStyle> <MasterTableView DataKeyNames="wbs_id" AllowMultiColumnSorting="True" CommandItemDisplay="Top" RetainExpandStateOnRebind="true"> <CommandItemSettings ShowAddNewRecordButton="false" ShowRefreshButton="true"></CommandItemSettings> <DetailTables> <telerik:GridTableView DataKeyNames="task_id" Name="Steps" Width="100%" RetainExpandStateOnRebind="true"> <DetailTables> <telerik:GridTableView DataKeyNames="task_id" Name="StepDetails" Width="100%" EditMode="Batch" CommandItemDisplay="Top" RetainExpandStateOnRebind="true"> <CommandItemSettings ShowSaveChangesButton="true" ShowCancelChangesButton="true" ShowAddNewRecordButton="false" /> <Columns> <telerik:GridBoundColumn SortExpression="proc_id" HeaderText="proc id" HeaderButtonType="TextButton" DataField="proc_id" Display="false"> </telerik:GridBoundColumn> <telerik:GridBoundColumn SortExpression="proc_name" HeaderText="Step Name" HeaderButtonType="TextButton" DataField="proc_name" ReadOnly="true"> </telerik:GridBoundColumn> <telerik:GridBoundColumn SortExpression="proc_wt" HeaderText="Step Weight" HeaderButtonType="TextButton" DataField="proc_wt" ReadOnly="true" AllowFiltering="false"> </telerik:GridBoundColumn> <telerik:GridBoundColumn SortExpression="complete_pct" HeaderText="Percent Complete" HeaderButtonType="TextButton" DataField="complete_pct" ReadOnly="true" AllowFiltering="false"> </telerik:GridBoundColumn> <telerik:GridTemplateColumn UniqueName="CompleteFlag" DataField="complete_flag" HeaderText="Complete" ReadOnly="true" AllowFiltering="false"> <ItemTemplate> <asp:CheckBox ID="CheckBox1" runat="server" Checked='<%#DataBinder.Eval (Container.DataItem,"complete_flag").ToString()!="N"? true:false %>' /> </ItemTemplate> </telerik:GridTemplateColumn> <telerik:GridDateTimeColumn MinDate="2013-01-01" DataField="act_start" HeaderText="Actual Start" SortExpression="act_start" UniqueName="act_start" DataType="System.DateTime" FilterControlAltText="Filter act_start column" DataFormatString="{0:yyyy/MM/dd}" ItemStyle-BackColor="#c6f3ff" AllowFiltering="false"> </telerik:GridDateTimeColumn> <telerik:GridDateTimeColumn MinDate="2013-01-01" DataField="est_act_finish" HeaderText="Est/Actual Finish" SortExpression="est_act_finish" UniqueName="est_act_finish" DataType="System.DateTime" FilterControlAltText="Filter est_act_finish column" DataFormatString="{0:yyyy/MM/dd}" ItemStyle-BackColor="#c6f3ff" AllowFiltering="false"> </telerik:GridDateTimeColumn> <telerik:GridBoundColumn SortExpression="complete_pct_upd" HeaderText="Updated Percent Complete" HeaderButtonType="TextButton" DataField="complete_pct_upd" DataType="System.Decimal" ItemStyle-BackColor="#c6f3ff" AllowFiltering="false"> </telerik:GridBoundColumn> <telerik:GridBoundColumn SortExpression="last_updated" HeaderText="Last Updated" HeaderButtonType="TextButton" DataField="last_updated" ReadOnly="true" DataType="System.DateTime" DataFormatString="{0:yyyy/MM/dd}" AllowFiltering="false"> </telerik:GridBoundColumn> <telerik:GridBoundColumn SortExpression="updated_by" HeaderText="Updated By" HeaderButtonType="TextButton" DataField="updated_by" ReadOnly="true" AllowFiltering="false"> </telerik:GridBoundColumn> <telerik:GridBoundColumn SortExpression="comments" HeaderText="Comments" HeaderButtonType="TextButton" DataField="comments" ReadOnly="false" DataType="System.String" AllowFiltering="false" ItemStyle-BackColor="#c6f3ff"> </telerik:GridBoundColumn> </Columns> </telerik:GridTableView> </DetailTables> <Columns> <telerik:GridBoundColumn SortExpression="task_id" HeaderText="task_id" HeaderButtonType="TextButton" DataField="task_id" Display="false" ReadOnly="true"> </telerik:GridBoundColumn> <telerik:GridBoundColumn SortExpression="task_code" HeaderText="Activity ID" HeaderButtonType="TextButton" DataField="task_code" UniqueName="task_code" ReadOnly="true"> </telerik:GridBoundColumn> <telerik:GridBoundColumn SortExpression="task_name" HeaderText="Activity Name" HeaderButtonType="TextButton" DataField="task_name" UniqueName="task_name" ReadOnly="true"> </telerik:GridBoundColumn> <telerik:GridBoundColumn SortExpression="start" HeaderText="Start" HeaderButtonType="TextButton" DataField="start" UniqueName="start" DataType="System.DateTime" ReadOnly="true" DataFormatString="{0:yyyy/MM/dd}" AllowFiltering="false"> </telerik:GridBoundColumn> <telerik:GridBoundColumn SortExpression="finish" HeaderText="Finish" HeaderButtonType="TextButton" DataField="finish" UniqueName="finish" DataType="System.DateTime" ReadOnly="true" DataFormatString="{0:yyyy/MM/dd}" AllowFiltering="false"> </telerik:GridBoundColumn> <telerik:GridBoundColumn DataField="remain_work_qty" EmptyDataText="" HeaderText="Remaining Hours" SortExpression="remain_work_qty" UniqueName="remain_work_qty" DataType="System.Decimal" ReadOnly="true" AllowFiltering="false" DataFormatString="{0:0}"> </telerik:GridBoundColumn> </Columns> </telerik:GridTableView> </DetailTables> <Columns> <telerik:GridBoundColumn SortExpression="wbs_id" HeaderText="wbs_id" HeaderButtonType="TextButton" DataField="wbs_id" Display="false"> </telerik:GridBoundColumn> <telerik:GridBoundColumn SortExpression="wbs_name" HeaderText="Work Package" HeaderButtonType="TextButton" DataField="wbs_name"> </telerik:GridBoundColumn> </Columns> </MasterTableView> </telerik:RadGrid>This is how it is being bound:
protected void RadGrid1_NeedDataSource(object sender, GridNeedDataSourceEventArgs e) { if (RadComboBox1.SelectedIndex != -1 && RadDropDownList1.SelectedIndex != -1) { string projid = RadDropDownList1.SelectedValue; string cam = RadComboBox1.SelectedValue; if (!e.IsFromDetailTable) { RadGrid1.DataSource = GetDataTable("SELECT * FROM PrimaveraWbs WHERE proj_id = " + projid + " and name = '" + cam + "'"); } } } public DataTable GetDataTable(string query) { String ConnString = ConfigurationManager.ConnectionStrings["PSMSystemConnectionString"].ConnectionString; SqlConnection conn = new SqlConnection(ConnString); SqlDataAdapter adapter = new SqlDataAdapter(); adapter.SelectCommand = new SqlCommand(query, conn); DataTable myDataTable = new DataTable(); conn.Open(); try { adapter.Fill(myDataTable); } finally { conn.Close(); } return myDataTable; } protected void RadGrid1_DetailTableDataBind(object source, Telerik.Web.UI.GridDetailTableDataBindEventArgs e) { GridDataItem dataItem = (GridDataItem)e.DetailTableView.ParentItem; switch (e.DetailTableView.Name) { case "Steps": { string wbs_id = dataItem.GetDataKeyValue("wbs_id").ToString(); e.DetailTableView.DataSource = GetDataTable("SELECT * FROM PrimaveraTask WHERE wbs_id = " + wbs_id + " ORDER BY task_code"); break; } case "StepDetails": { string task_id = dataItem.GetDataKeyValue("task_id").ToString(); e.DetailTableView.DataSource = GetDataTable("SELECT * FROM PrimaveraSteps WHERE task_id = " + task_id + ""); break; } } } protected void RadGrid1_PreRender(object sender, EventArgs e) { string acb = RadDropDownList1.SelectedText; if (RadComboBox1 != null && RadDropDownList1.SelectedIndex != -1) { if (!Page.IsPostBack) { RadGrid1.MasterTableView.Items[0].Expanded = true; RadGrid1.MasterTableView.Items[0].ChildItem.NestedTableViews[0].Items[0].Expanded = true; } } }How do I ensure that this message is not displayed when records do exist?
Thanks in advance,
Josh