Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
170 views

I have a 2 level heirchy in radgrid.
When I select the Second Detail Table i want to dynamically render content in the

 

 

NestedViewTemplate.

What is the best way or event Iam using ItemCommand:

 

 

<

 

 

telerik:RadGrid ID="RadGridTariffSericeLevel" runat="server" DataSourceID="ObjectDataSourceTariffLanesByServiceLevel"

 

 

 

 

 

 

 

 

 

 

EnableLinqExpressions="false" Width="950px" Skin="Vista" GridLines="Horizontal"

 

 

 

 

AllowPaging="True" AutoGenerateColumns="false" Hei

 

 

 

 

 

 

 

 

 

 

OnItemCreated="RadGridTariffSericeLevel_ItemCreated"

 

 

 

 

OnItemCommand="RadGridTariffSericeLevel_ItemCommand"

 

 

 

 

onitemdatabound="RadGridTariffSericeLevel_ItemDataBound"

 

 

 

 

ondatabound="RadGridTariffSericeLevel_DataBound"

 

 

 

 

onselectedindexchanged="RadGridTariffSericeLevel_SelectedIndexChanged"

 

 

 

 

onneeddatasource="RadGridTariffSericeLevel_NeedDataSource" >

 

 

 

 

 

 

 

 

 

 

<ClientSettings>

 

 

 

 

 

 

 

 

 

 

<Selecting AllowRowSelect="True"></Selecting>

 

 

 

 

 

 

 

 

 

 

</ClientSettings>

 

 

 

 

 

 

 

 

 

 

<MasterTableView DataKeyNames="TariffDataID, ServiceLevelID" ShowFooter="true" DataSourceID="ObjectDataSourceTariffLanesByServiceLevel"

 

 

 

 

 

 

 

 

 

 

ItemStyle-BackColor="#eff4f8" AlternatingItemStyle-BackColor="#eff4f8" FooterStyle-ForeColor="Red" Font-Size="Large">

 

 

 

 

 

 

 

 

 

 

<Columns>

 

 

 

 

 

 

 

 

 

 

<telerik:GridBoundColumn DataField="ServiceLevelID" HeaderText="Service" HeaderStyle-Width="75px" />

 

 

 

 

 

 

 

 

 

 

<telerik:GridBoundColumn DataField="Lanes" HeaderText="Lanes" HeaderStyle-Width="75px"

 

 

 

 

 

 

 

 

 

 

Aggregate="Sum" FooterAggregateFormatString="{0:n0}" />

 

 

 

 

 

 

 

 

 

 

<telerik:GridBoundColumn DataField="ShipmentsPerMonth" HeaderText="Pros" HeaderStyle-Width="75px"

 

 

 

 

 

 

 

 

 

 

Aggregate="Sum" FooterAggregateFormatString="{0:n0}" />

 

 

 

 

 

 

 

 

 

 

<telerik:GridBoundColumn DataField="TotalCost" HeaderText="Total Cost" DataFormatString="{0:c2}"

 

 

 

 

 

 

 

 

 

 

Aggregate="Sum" FooterAggregateFormatString="{0:c2}" />

 

 

 

 

 

 

 

 

 

 

</Columns>

 

 

 

 

 

 

 

 

 

 

<DetailTables>

 

 

 

 

 

 

 

 

 

 

<telerik:GridTableView runat="server" Name="GridTableViewOrigin" DataSourceID="ObjectDataSourceTariffLanesByServiceLevelOrigin"

 

 

 

 

 

 

 

 

 

 

DataKeyNames="TariffDataID, ServiceLevelID, OriginServicePointID" AutoGenerateColumns="false" Width="100%" HierarchyLoadMode="ServerBind">

 

 

 

 

 

 

 

 

 

 

<Columns>

 

 

 

 

 

 

 

 

 

 

<telerik:GridBoundColumn DataField="OriginServicePointID" HeaderText="Origin" HeaderStyle-Width="75px" />

 

 

 

 

 

 

 

 

 

 

<telerik:GridBoundColumn DataField="Lanes" HeaderText="Lanes" HeaderStyle-Width="75px" />

 

 

 

 

 

 

 

 

 

 

<telerik:GridBoundColumn DataField="ShipmentsPerMonth" HeaderText="Pros" HeaderStyle-Width="75px" />

 

 

 

 

 

 

 

 

 

 

<telerik:GridBoundColumn DataField="TotalCost" HeaderText="Total Cost" DataFormatString="{0:c2}" />

 

 

 

 

 

 

 

 

 

 

</Columns>

 

 

 

 

 

 

 

 

 

 

<ParentTableRelation>

 

 

 

 

 

 

 

 

 

 

<telerik:GridRelationFields DetailKeyField="OriginServicePointID" MasterKeyField="ServiceLevelID" />

 

 

 

 

 

 

 

 

 

 

</ParentTableRelation>

 

 

 

 

 

 

 

 

 

 

<NestedViewTemplate>

 

 

 

 

 

 

 

 

 

 

<asp:PlaceHolder ID="PlaceHolder1" runat="server"></asp:PlaceHolder>

 

 

 

 

<asp:Button ID="Button1" runat="server" Text="Button" OnClick="Button1_Clicked" CommandName="Button1" />

 

 

 

 

 

 

 

 

 

 

</NestedViewTemplate>

 

 

 

 

 

 

 

 

 

 

</telerik:GridTableView>

 

 

 

 

 

 

 

 

 

 

</DetailTables>

 

 

 

 

 

 

 

 

 

 

</MasterTableView>

 

 

 

 

 

 

 

 

 

 

</telerik:RadGrid>

 

 

 

protected void RadGridTariffSericeLevel_ItemCommand(object source, GridCommandEventArgs e)

 

 

{

 

 

 

if (e.CommandName == "ExpandCollapse" && e.Item.OwnerTableView.Name == "GridTableViewOrigin")

 

 

{

 

 

 

GridDataItem OriginItem = (GridDataItem)e.Item;

 

 

 

 

GridNestedViewItem NestedViewItem = (GridNestedViewItem)OriginItem.ChildItem;

 

 

 

 

if (NestedViewItem != null)

 

 

{

 

 

 

PlaceHolder PlaceHolder1 = (PlaceHolder)NestedViewItem.FindControl("PlaceHolder1");

 

 

PlaceHolder1.Controls.Add(GetTable());

 

 

 

Label Label = (Label)NestedViewItem.FindControl("Label1");

 

 

}

 

}

 

}

Tsvetoslav
Telerik team
 answered on 20 Apr 2011
1 answer
52 views
I need to set the amount of pages on the grid.

Each time i change the page i will retrieve data from the database.

Suggestions please
Pavlina
Telerik team
 answered on 20 Apr 2011
4 answers
95 views

Hi,

  I am using RadTreeList and using RadToopTipManager to popup in the TreeList Data. But when i mouse over i am getting a parse error. 

RadToolTip Manager response error: Exception=Sys.Webforms.PageRequestManagerParseErrorException

Please guide me to rectify this error.

Thanks
Kannan
Kannan
Top achievements
Rank 1
 answered on 20 Apr 2011
2 answers
66 views


Hi,

I am using RadTreeList version:2010.3.1215.35, in that the paging controls is not aligned properly as attached screenshot. Please assist me to do that.

Thanks 
Kannan

 
Kannan
Top achievements
Rank 1
 answered on 20 Apr 2011
1 answer
163 views
Hey, I'm working on building a treeview dynamically based onClicked event for a menu item.
'
function onClicked(sender, eventArgs) {
 
var treeView = $find("<%= RadTreeView1.ClientID %>");
 
var selectedNode = treeView.get_selectedNode();        
 
var node = new Telerik.Web.UI.RadTreeNode();
 
var parent = treeView.get_selectedNode();
 node
.Image= "~/Images/Folder-Add-icon.png";
 parent
.get_nodes().add(node);
 treeView
.commitChanges();
}

But, the problem is I'm not getting the image next to the node when I try to add it, what's the problem?'
Kate
Telerik team
 answered on 20 Apr 2011
2 answers
67 views
I have a page with multiple TimePickers in a databound grid. They all share a TimeView to cut down on the HTML, but I need a button I've placed in the header template of the shared TimeView to 'clear' the value of the time picker I've clicked on (because a blank time has meaning for my application).

The template is fine, I have my control in the header, but I'm not sure how to get access to the TimePicker that has been clicked in client side script to be able to set_selectedTime('');

Any ideas?

<edit>
This page has exactly what I need - with the 'Clear' button in the footer - but the example code isn't for that image!

http://www.telerik.com/help/aspnet-ajax/calendar-time-view.html
Andrew
Top achievements
Rank 1
 answered on 20 Apr 2011
1 answer
72 views

I have a grid with 19 columns of varying widths, but most of which are formatted to 42px. When I enter InPlace edit mode, the columns width grows to over 150px which is far wider than the screen.

I have AutoGenerateColumns set to False and in my GridNumericColumnEditor the NumericTextBox-Width is set to 38px.

Can anyone give me some guidance on how to format my page when in edit mode?

Thanks in advance!

Pavlina
Telerik team
 answered on 20 Apr 2011
8 answers
142 views
I am using VS2010, latest Telerik controls and ASP.NET 4.

I have a very large business intelligence application that I would like to remove all update panels and replace with Telerik AJAX controls.  My application contains tons of user controls and lots of unnecessary update panels all over the place with triggers.

Based on the Telerik documentation, it seems that I would be able to do the following:
Place a Telerik AJAX manager on the Master Page
Place a Telerik AJAX Manager Proxy on all user controls that use Update Panels
Replace all update panels with telerik AJAX panels

Is that correct?

Do I need to set triggers?

Thanks in advance,
--Jeff
Sebastian
Telerik team
 answered on 20 Apr 2011
1 answer
64 views
I'm looking at the controls used in the forum, for log in, etc and they don't appear to match any of the skins that ship with the latest version of Telerik (ASP.NET AJAX specifically)? Is it a custom skin? Did you start with a standard skin and just enhance it with some CSS? I'm interested in learning how I can achieve a similar look and feel.  Thanks!
Iana Tsolova
Telerik team
 answered on 20 Apr 2011
1 answer
115 views
Hello,

By Looking here:  http://demos.telerik.com/aspnet-ajax/calendar/examples/datetimepicker/customcollection/defaultcs.aspx
I can see that I can bind RadTimePicker control to custom collections of DateTime objects. In the example you bind it to List, ArrayList, DateTime array and Object array.

I want to bind it to Dictionary<DateTime, string> and have something similar like you have in comboBox:
ComboBox.DataTextField = "Key";
ComboBox.DataValueField = "Value";


Is it possible to do in DatePicker?

Thanks,
Nick
Tsvetina
Telerik team
 answered on 20 Apr 2011
Narrow your results
Selected tags
Tags
+? more
Top users last month
Ambisoft
Top achievements
Rank 2
Iron
Pascal
Top achievements
Rank 2
Iron
Matthew
Top achievements
Rank 1
Sergii
Top achievements
Rank 1
Iron
Iron
Andrey
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Ambisoft
Top achievements
Rank 2
Iron
Pascal
Top achievements
Rank 2
Iron
Matthew
Top achievements
Rank 1
Sergii
Top achievements
Rank 1
Iron
Iron
Andrey
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?