Hi,
I am using RadTreeList and have data source with hierarchical data.
Data binding is done in NeedDataSource event handler.
Code example:
<telerik:RadTreeList RenderMode="Lightweight" ID="TreeListTrendsList" runat="server"
ParentDataKeyNames="DIM_LIST_ID_PARENT" DataKeyNames="DIM_LIST_ID" AllowPaging="true"
AutoGenerateColumns="false" AllowSorting="true" ExpandCollapseMode="Client" PageSize="150"
OnItemDataBound="TreeListTrendsList_ItemDataBound" OnNeedDataSource="TreeListTrendsList_NeedDataSource">
So, the DataKeyNames=DIM_LIST_ID and ParentDataKeyNames=DIM_LIST_ID_PARENT. Data source has ~100 records with DIM_LIST_ID_PARENT=0 and I expected to see them as top level nodes, but for some reason I see only single parent node (with DIM_LIST_ID_PARENT=0, DIM_LIST_ID=1).
Could somebody please suggest how to achieve the required behavior?
Hi
im using a RadComboBox with ItemTemplate like below:
<telerik:RadComboBox ID="RadComboBoxPart" runat="server" Width="251px"
DropDownWidth="540" DataSourceID="sqlParts" EmptyMessage="Choose Your Part ..." HighlightTemplatedItems="true"
MarkFirstMatch="true" EnableLoadOnDemand="true" Filter="Contains"
AutoCompleteSeparator="|"
Culture="fa-IR" LoadingMessage="Please Wait!" RenderMode="Mobile"
Sort="Ascending" OnItemDataBound="RadVehicle_ItemDataBound" OnItemsRequested="Radpart_ItemsRequested">
<HeaderTemplate>
<table style="width: 360px;">
<tr>
<td style="width: 280px;">PartName </td>
<td style="width: 80px;">PartCode </td>
</tr>
</table>
</HeaderTemplate>
<ItemTemplate>
<table style="width:360px">
<tr>
<td style="width: 280px;">
<asp:Label ID="Label10" runat="server" Text='<%# Bind("PartName") %>'></asp:Label>
</td>
<td style="width: 80px;">
<asp:Label ID="Label11" runat="server" Text='<%# Bind("PartCode") %>'></asp:Label>
</td>
</tr>
</table>
</ItemTemplate>
</telerik:RadComboBox>
and for DataSource i'v got this:
<asp:SqlDataSource ID="sqlParts" runat="server"
ConnectionString="<%$ ConnectionStrings:Gsgdb_tempConnectionString %>"
SelectCommand="select * from dbo.ActiveParts ></asp:SqlDataSource>
and in Code Behind for ItemDataBound Event i'v got this:
protected void RadComboBoxPart_ItemDataBound(object sender, Telerik.Web.UI.RadComboBoxItemEventArgs e)
{
e.Item.Text = ((DataRowView)e.Item.DataItem)["PartName"].ToString();
e.Item.Value = ((DataRowView)e.Item.DataItem)["ID"].ToString();
}
its work fine for me !
but it's taking too long to load in clintside
what am i doing wrong? any help would be appreciated.
I have a grid with Column Groups. The columns within each group have the same name (HeaderText)
something like :
Contract Non-Contract
Total Pending Total Pending
My problem comes when I display the Context Menu.
The list :
Total
Pending
Total
Pending
What I can't figure out is how to identify each so I can modify what is displayed.
In the ContextMenu_ItemCreated event, I can determine that I have "Pending" for example, but not which one.
Is there any way to determine the ColumnGroupName name at that point? Ideally I would use that.

Good Day,
I am trying to implement custom filtering on a Radgrid bound to an SQLDataSource with LINQExpressions disabled, however, I cannot seem to get it working on a particular column.
Now, the column in question has "Display='False'" as it's a foreign key column pointing to another table. I've then got another column that's binding to another SQLDataSource to get the actual data. As far as I can tell, this is the approved method of joining multiple tables into one RadGrid...
The problem is that the filterExpression then seems to not be able to see the hidden column. I've also tried filtering on the visible column using both the foreign key and the relevant column from the second table. Neither seems to work. How can I perform filtering on a foreign key column while showing a more pertinent column from the second table?
Also, I'm storing the selected filter variables in the ViewState. Pertinent code below;
1.<telerik:GridBoundColumn DataField="fk1_dID" DataType="System.Int32" FilterControlAltText="Filter fk1_dID column" HeaderText="Depot" SortExpression="fk1_dID" UniqueName="fk1_dIDo" Display="False" ReadOnly="true" InsertVisiblityMode="AlwaysHidden">2.</telerik:GridBoundColumn>3.<telerik:GridDropDownColumn FilterControlAltText="Filter column column" HeaderText="Depot" SortExpression="fk1_dID" UniqueName="fk1_dID" DataField="fk1_dID" DataSourceID="sqlDepot" ListTextField="dCode" ListValueField="dID">4. <FilterTemplate>5. <telerik:RadDropDownList ID="filterDepot" runat="server" DataSourceID="sqlDepot" DataValueField="dID" DataTextField="dCode" OnSelectedIndexChanged="filterDepot_SelectedIndexChanged" AutoPostBack="true" AppendDataBoundItems="true"><Items><telerik:DropDownListItem Value="0" Text="All" /></Items></telerik:RadDropDownList>6. </FilterTemplate>7.</telerik:GridDropDownColumn>01.private string dateFilter() {02. int y = int.Parse(vsYear);03. int m = int.Parse(vsMonth);04. return ( y != 1990 ? ( m == 0 ? $"([iDate] >= '{y}-01-01' AND [iDate] <= '{y}-12-31')" : $"([iDate] >= '{y}-{string.Format("{0:0#}", m)}-01' AND [iDate] <= '{y}-{string.Format("{0:0#}", m)}-{DateTime.DaysInMonth(y, m)}')" ) : "" );05.}06.private string depotFilter() {07. return ( vsDepot != "00" ? $"{( vsYear != "1990" ? " AND " : "" )}([fk1_dID] = {vsDepot})" : "" );08.}09.private string FilterBuilder() {10. dAuth.InnerText = $"{dateFilter()}{depotFilter()}";11. return $"{dateFilter()}{depotFilter()}";12.}13.protected void filterDepot_SelectedIndexChanged( object sender, DropDownListEventArgs e ) {14. vsDepot = e.Text;15. rglog.MasterTableView.FilterExpression = $"{FilterBuilder()})";16. rglog.MasterTableView.Rebind();17.}
Hello,
I am trying to implement Export To Excel functionality. The issue is it does not include template columns in exported file. I am sharing my markup and code here:
protected void imgBtn_EXP_Requests_Click(object sender, EventArgs e) { RadGrid.MasterTableView.ExportToExcel(); }<telerik:RadGrid RenderMode="Lightweight" ID="RadGrid" AllowSorting="True" EnableViewState="true" PageSize="35" AllowPaging="True" AllowCustomPaging="false" AllowAutomaticUpdates="True" AllowAutomaticInserts="True" runat="server" AutoGenerateColumns="false" GridLines="None" AllowFilteringByColumn="true" GroupingSettings-CaseSensitive="false" ExportSettings-FileName="Dashboard" ExportSettings-ExportOnlyData="true" ExportSettings-OpenInNewWindow="true" ExportSettings-IgnorePaging="true" OnItemCommand="RadGrid_ItemCommand" OnItemDataBound="RadGrid_ItemDataBound"> <PagerStyle Mode="NextPrevAndNumeric" AlwaysVisible="true"></PagerStyle> <ClientSettings> <Scrolling AllowScroll="true" UseStaticHeaders="true" SaveScrollPosition="true" FrozenColumnsCount="2" /> </ClientSettings> <MasterTableView Width="100%" CommandItemDisplay="Top" EnableViewState="true" TableLayout="Fixed" DataKeyNames="Id" AutoGenerateColumns="false" InsertItemPageIndexAction="ShowItemOnCurrentPage" > <CommandItemSettings ShowAddNewRecordButton="false" /> <CommandItemSettings ShowRefreshButton="false" /> <Columns> <telerik:GridBoundColumn DataField="Id" UniqueName="Id" HeaderText="Id" AllowSorting="false" ItemStyle-Wrap="false" HeaderStyle-Wrap="false" AllowFiltering="false"> </telerik:GridBoundColumn> <telerik:GridTemplateColumn HeaderText="Request Id" ShowFilterIcon="false" UniqueName="RequestId"> <ItemTemplate> <asp:LinkButton ID="lnkbtnRequestId" CausesValidation="false" runat="server" Text='<%#Eval("RequestId") %>'></asp:LinkButton> </ItemTemplate> </telerik:GridTemplateColumn> <telerik:GridTemplateColumn HeaderText="Record (Title)" ShowFilterIcon="false" UniqueName="Title"> <ItemTemplate> <asp:LinkButton ID="lnkbtnTitle" CausesValidation="false" runat="server" Text='<%#Eval("Title") %>'></asp:LinkButton> </ItemTemplate> </telerik:GridTemplateColumn> </Columns> </MasterTableView> </telerik:RadGrid>Hello,
I have RadHtmlChart Pie and I need to display a tooltip when user hovers mouse over it's legend item. I placed RadToolTip on my page, put some content into it and now I need to position it over legend items.
<telerik:RadToolTip ID="ToolTip" runat="server" RelativeTo="BrowserWindow" Position="Center" Width="150" Height="100">
<table>
<tr>
<td><span style="font-weight: bold" id="TooltipGroupName"></span></td>
</tr>
<tr>
<td><span id="TooltipAmount"></span></td>
</tr>
<tr>
<td>Transactions: <span id="TooltipNumTransaction"></span></td>
</tr>
</table>
</telerik:RadToolTip>
Here is the legend hover event handler:
function OnLegendItemHover(e) {
var DataItem = e.series.data[e.pointIndex];
var GroupName = DataItem.GroupName;
$("#TooltipGroupName").html(GroupName);
var Amount = kendo.format("{0:C2}", DataItem.AbsAmount * DataItem.AmountSign);
$("#TooltipAmount").html(Amount);
var NumTransaction = DataItem.NumTransaction;
$("#TooltipNumTransaction").html(NumTransaction);
var ToolTip = $find("<% =ToolTip.ClientID %>");
ToolTip.OffsetX = e.element.getBoundingClientRect()["left"] + " px";
ToolTip.OffsetY = e.element.getBoundingClientRect()["top"] + " px";
ToolTip.show();
}
I actually wasted two days trying different ways to position RadToolTip but I could not do it. Do RelativeTo options actually work ? RelativeTo="Mouse" would be easiest for me I guess. So I could simply call ToolTip.show() in my handler.
When I look at my page using RadGrid with one of the built in Skins (WebBlue) on localhost everything appears correct, but as soon as I upload to server and view the page the Skin images do not display, I just see an empty button. This holds for the filter drop-down arrow, the sort arrow, the pager buttons and all the export command buttons. I then looked at the online demo's and i see the same issue. Works fine with Chrome and Firefox, just not IE11 (11.0.9600.18816).
Any ideas?
Is there any way of knowing whether the control that triggered a OnPageSizeChanged event was the pager for a master table or a detail table? e has absolutely nothing useful in it :(
We are saving grid page sizes in a DB in order to retain page sizes across postbacks and session etc, but want to ignore detail table page size changes. I have tried everything I can think to try and identify which control (and therefore which table) triggered the event but cannot work it out.
Any advice would be appreciated.
Hi Guys
In VS 2015 I am getting a wavy blue line under a file which pops up a box saying " 'oncopy' is not a valid attribute of element radtextbox' ", plus the same for uncut and onpaste, although the functions themselves do what they are supposed to in the form.
How can I get rid of this warning?
I copied the website code from one machine to another so maybe there is a clue there.
I am using 2016.2 controls
Thanks for your help!
Clive

Hi,
I have a PivotGrid table with huge value. How do I customize the appearance of the value in the table using my sample javascript below?
function FormatNumber(value) { if (value === 0) { return 0 } if (value <= 999) { return value } if (value >= 1000 && value <= 999999) { return parseFloat(value / 1000).toFixed(1) + 'K' } if (value >= 1000000 && value <= 999999999) { return parseFloat(value / 1000000).toFixed(1) + 'M' } if (value >= 1000000000 && value <= 999999999999) { return parseFloat(value / 1000000000).toFixed(1) + 'B' } if (value >= 1000000000000 && value <= 999999999999999) { return parseFloat(value / 1000000000000).toFixed(1) + 'T' } if (value >= 1000000000000000 && value <= 999999999999999999) { return parseFloat(value / 1000000000000000).toFixed(1) + 'Q } return value}
Thanks.
