Telerik Forums
UI for ASP.NET AJAX Forum
4 answers
177 views
Hi,

I have a master page and two content pages for that master page.
The code in the two content pages is almost identical. When I try to setup the Ajax settings in the page load event of the master page, I can get a  reference to the control in one of the content pages but not the other.


Following is the code in the master page code behind: Page_Load

In the following code Grid2 comes back as nothing which is my main issue:

Dim Grid1 As Telerik.Web.UI.RadGrid = CType(Me.ContentPlaceHolder11.FindControl("RadGrid1"), Telerik.Web.UI.RadGrid)

Dim Grid2 As Telerik.Web.UI.RadGrid = CType(Me.ContentPlaceHolder22.FindControl("RadGridPage1"), Telerik.Web.UI.RadGrid)

'Grid2 comes back as nothing

AjaxManager1.AjaxSettings.AddAjaxSetting(RadComboBox1, Grid1,

Nothing)

AjaxManager1.AjaxSettings.AddAjaxSetting(Grid1, RadComboBox2,

Nothing)

AjaxManager1.AjaxSettings.AddAjaxSetting(Grid1, Grid2,

Nothing)



Following is the markup for the Master Page:

<%

@ Master Language="VB" CodeFile="MasterPage.master.vb" Inherits="MasterPage" %>

<%

@ Register TagPrefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI" %>

<!

DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<

html xmlns="http://www.w3.org/1999/xhtml">

<

head runat="server">

<title>Untitled Page</title>

<asp:ContentPlaceHolder id="head" runat="server">

</asp:ContentPlaceHolder>

 

<

telerik:RadScriptBlock runat="server" ID="ScriptBlock1">

<

script type="text/javascript">

</

script>

</

telerik:RadScriptBlock>

</

head>

<

body>

<form id="form1" runat="server">

<div>

<div>

<asp:ScriptManager ID="ScriptManager" runat="server" />

<telerik:RadAjaxManager ID="AjaxManager1" runat="server">

<AjaxSettings>

<telerik:AjaxSetting AjaxControlID="RadComboBox1">

<UpdatedControls>

<telerik:AjaxUpdatedControl ControlID="RadComboBox1" ></telerik:AjaxUpdatedControl>

</UpdatedControls>

</telerik:AjaxSetting>

</AjaxSettings>

</telerik:RadAjaxManager>

<telerik:RadAjaxPanel ID="RadAjaxPanelMain" runat="server" EnableAJAX="true">

<telerik:RadComboBox ID="RadComboBox1" runat="server" AutoPostBack="true">

<Items>

<telerik:RadComboBoxItem Value="1" Text="One" />

<telerik:RadComboBoxItem Value="2" Text="Two" />

</Items>

</telerik:RadComboBox>

<telerik:RadComboBox ID="RadComboBox2" runat="server" AutoPostBack="true">

<Items>

<telerik:RadComboBoxItem Value="1" Text="One1" />

<telerik:RadComboBoxItem Value="2" Text="Two2" />

</Items>

</telerik:RadComboBox>

<br />

<asp:TextBox ID="Txtfilter" runat="server" onkeyUp="TxtFilterChange(this);" > </asp:TextBox>

</telerik:RadAjaxPanel>

</div>

<telerik:RadAjaxPanel ID="Content1" runat="server" EnableAJAX= "True">

<asp:ContentPlaceHolder id="ContentPlaceHolder11" runat="server">

</asp:ContentPlaceHolder>

</telerik:RadAjaxPanel>

<telerik:RadAjaxPanel ID="Content2" runat="server" EnableAJAX= "True">

<asp:ContentPlaceHolder id="ContentPlaceHolder22" runat="server">

</asp:ContentPlaceHolder>

</telerik:RadAjaxPanel>

<br />

<br />

 

</div>

</form>

</

body>

</

html>

Following is the Markup for the first Content Page:

<%

@ Page Language="VB" AutoEventWireup="false" CodeFile="Default.aspx.vb" Inherits="_Default" MasterPageFile="~/MasterPage.master" %>

<%

@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>

 

 

<asp:content ID="Content11" contentplaceholderid="ContentPlaceHolder11" runat="server">

Main page

<asp:Panel ID="Panel1" Style="background-color: ButtonFace; width: 100%;" runat="server">

<telerik:RadComboBox ID="RadComboBox1" runat="server">

</telerik:RadComboBox>

<telerik:RadGrid ID="RadGrid1" runat="server" AllowPaging="True" PageSize="6" PagerStyle-Mode="Slider" ClientSettings-EnablePostBackOnRowClick="true">

<ClientSettings AllowRowsDragDrop="false">

<Selecting AllowRowSelect="True" />

</ClientSettings>

</telerik:RadGrid>

</asp:Panel>

</

asp:content>


Following is the Markup for the second Content page:

<%

@ Page Language="VB" AutoEventWireup="false" CodeFile="DefaultPage2.aspx.vb" Inherits="DefaultPage2" MasterPageFile="~/MasterPage.master" %>

 

<%

@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>

<asp:content ID="Content22" contentplaceholderid="ContentPlaceHolder22" runat="server">

Main page

<asp:Panel ID="PanelPage1" Style="background-color: ButtonFace; width: 100%;" runat="server">

<telerik:RadComboBox ID="RadComboBoxPage1" runat="server">

</telerik:RadComboBox>

<telerik:RadGrid ID="RadGridPage1" runat="server" AllowPaging="True" PageSize="6" PagerStyle-Mode="Slider" ClientSettings-EnablePostBackOnRowClick="true">

<ClientSettings AllowRowsDragDrop="false">

<Selecting AllowRowSelect="True" />

</ClientSettings>

</telerik:RadGrid>

</asp:Panel>

</

asp:content>

Please let me know if you need more details.

Thanks in advance.

Anshul
Top achievements
Rank 1
 answered on 29 Aug 2008
1 answer
140 views
Hi,

I am using Rad tab strip and my page can be changed from editable and lock mode at run time. when i am in tab 1 and i click on edit and lock buttons, page works as expected. but when i go to tab 2 and click on edit button, i cannot do any other operation in the page.i cannot navigate to another tab or clik on anything. if i click on edit in tab 1 and then come to tab 2 everything works as expected.but when i click on edit in tab 2 this behavior is seen.

the only thing my edit button does is that it enables all the controls on the page view which are previously disabled. iam not doing anything specific in the page load to create any problem.

any idea why this is happening. below is my code

<telerik:RadTabStrip ID="RadTabStrip1" runat="server"

Skin="WebBlue" MultiPageID="RadMultiPage1" SelectedIndex="0"

Align="Justify" ReorderTabsOnSelect="True" Font-Bold="True" Height="25px">

<Tabs>

<telerik:RadTab runat="server" Text="P" Selected="True">

</telerik:RadTab>

<telerik:RadTab runat="server" Text="A">

</telerik:RadTab>

<telerik:RadTab runat="server" Text="O">

</telerik:RadTab>

<telerik:RadTab runat="server" Text="T">

</telerik:RadTab>

<telerik:RadTab runat="server" Text="L">

</telerik:RadTab>

<telerik:RadTab runat="server" Text="T">

</telerik:RadTab>

<telerik:RadTab runat="server" Text="P">

</telerik:RadTab>

<telerik:RadTab runat="server" Text="K">

</telerik:RadTab>

</Tabs>

</telerik:RadTabStrip>

Atanas Korchev
Telerik team
 answered on 29 Aug 2008
2 answers
118 views
I have a treeview that has Times as the parent nodes and Classes as the child nodes. I would like the customer to only be able to check 1 child node under each parent node. And I guess if they check a child node and another is already checked then I would like the other to be unchecked (maybe after a confirmation).

So, in the example below they could select Class1 and Class 11, but not Class 1 and Class 2.

Is this possible?

8AM
     Class 1
     Class 2
     Class 3
10AM
     Class 11
     Class 12
     Class 13
     Class 14
1PM
    Class 22
    Class 23

Thanks
Darren
Top achievements
Rank 1
 answered on 29 Aug 2008
2 answers
119 views
Can one direct me to samples using ObjectDataSources and RadGrid Hierarchy with full editing ablity.
Phil
Top achievements
Rank 2
 answered on 29 Aug 2008
3 answers
106 views
I have been able to make a tabstrip switch a multiview based on hovering the mouse over the tab correctly, unfortunately it's too fast! is there a way to do a delay so that it only switches the tab if the mouse hovers for say 1 second or so? this is the code I'm using to select on hover:

<

script type="text/javascript">
<!--
function onMouseOver(sender, args)
{
var SelectedTab = args.Tab;
SelectedTab.Select();
}
-->
</script>

SelAromDotNet
Top achievements
Rank 2
 answered on 29 Aug 2008
1 answer
180 views
I'll try to make this as brief as possible. I've got a ajaxified grid among many others in a radmulitpage and radtab. That's not the problem.

I have one grid bound to a collection. The  EditFormType is AutoGenerated, and it's a popup. AllowAutoInsert/Update/Delete is turned off. I'm trying to handle all actions through the ItemCommand event, where I can just check the CommandName and do the appropriate actions. Through trial and error I've gotten most other commands to work, such as "Delete", "DeleteSelected", "Edit", etc...

The problem is with trying to access the new edit form fields on the "Update" and "UpdateEdited" commands. I don't allow mulit row edit. I've tried to cast every which way to get to these new form fields. I only can get the old values by doing this:

string newFirst = ((GridDataItem)RadGrid1.EditItems[0])["FirstName"].Text.Trim();


I use EditItems[0] because again I'm allowing only one row to be edited and I do validation anyway. This get's me the right row but it's the value before it's edited. What's the best way to access the edited form values. Can I get it through accessing the GridCommandEventArgs or the RadGrid instance? What's the easiest and best way?

Sorry to be longwinded... there's probably an easy explanation.

Thanks,
Brad
Missing User
 answered on 29 Aug 2008
1 answer
187 views
Whats the best way to embed youtube videos using the design mode of the editor?

Thanks,
Curt.
Rumen
Telerik team
 answered on 29 Aug 2008
2 answers
212 views
I'm styling my grids with a modified version of the Hay skin files.

My boss has now decided he wants vertical grid lines. I've tried just setting the GridLines property on the grid itself but that has had no impact; I assume that this is because of the fact that I'm using an external CSS file.

Which bit of the skin's CSS file should I alter to get the most consistent looking vertical lines for both the grid rows and the header?

--
Stuart
Dan
Top achievements
Rank 1
 answered on 29 Aug 2008
6 answers
79 views
I'm trying to prototype quickly that I can build a CMS system using your Dock control. It is very impressive. Essentially I'm trying to mimic the SiteFinity design as much as possible. I do not want the 'widgets' to be draggable at runtime to outsiders so the dock controls are not in the actual public web pages. I've bouced back and forth between designing my pages using css and tables. I currently have a admin edit module that will load my master page, parse it, and inject your dock controls so that an admin can edit the layout of the page. Regardless of whether the underlying design is css or tables, the dockzones never appear exactly where they should.. They're either slight offset and expand outside their div's or table cells or sometimes even overlap themselves. Thinking it was something in my module, I made a new project with various layouts just to test that I could layout a page exactly the way I wanted too, then replace the various areas with DockZones and see if the dockzones would just contain themselves too and look nicely in those areas. Still doesn't work. They show up mostly in the right place, but not perfect.
Happy
Top achievements
Rank 1
 answered on 29 Aug 2008
3 answers
170 views
Hi all,

we are using the radWindow quite heavily and want to create a custom skin, however since we installed Q8 release we are unable to make the menu or the window use a skin from the radControls directory, it seems to use the embeded skins (in the dll). 

If I turn off the useEmbeded skins flag the radWindow shows as just an iframe floating..

confused n stuff
rob
Georgi Tunev
Telerik team
 answered on 29 Aug 2008
Narrow your results
Selected tags
Tags
+? more
Top users last month
Shiori
Top achievements
Rank 2
Iron
Tien
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Rob
Top achievements
Rank 4
Bronze
Bronze
Iron
Geoff
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Shiori
Top achievements
Rank 2
Iron
Tien
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Rob
Top achievements
Rank 4
Bronze
Bronze
Iron
Geoff
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?