Telerik Forums
UI for ASP.NET AJAX Forum
2 answers
86 views

Hi,

I'm using Tabstrig in an user control that is dynamicly loaded in my page
Below is the code of my user control :

<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="org_crscls.ascx.cs" Inherits="WBTManager.manageUser.org_crscls" %>
<%@ Reference Page="org.aspx" %>
 
<telerik:RadScriptBlock ID="PageRadScriptBlock" runat="server">
    <script type="text/javascript">
    <!--
        ActiveTab('org_crscls_td', 'OrgMenu_selected', 'OrgMenu', 'td', 'tableOrgMenu');
        var theForm = document.getElementById('wbtform');
        function checkForm(pForm) {
            var bTest = true;
            return bTest;
        }
    //-->  
    </script>
</telerik:RadScriptBlock>
 
<div id="OrgContent" class="OrgContent">
    <telerik:RadTabStrip ID="RadTabHtml" SelectedIndex="0" runat="server" MultiPageID="RadMultiPageCrsCls">
        <Tabs>
            <telerik:RadTab runat="server" Text="Courses" PageViewID="RadPageViewCourses">
            </telerik:RadTab>
            <telerik:RadTab runat="server" Text="Classes" PageViewID="RadPageViewClasses">
            </telerik:RadTab>
        </Tabs>
    </telerik:RadTabStrip>
    <telerik:RadMultiPage ID="RadMultiPageCrsCls" runat="server" SelectedIndex="0">
        <telerik:RadPageView ID="RadPageViewCourses" runat="server">
            Courses...
        </telerik:RadPageView>
        <telerik:RadPageView ID="RadPageViewClasses" runat="server">
            Classes...
        </telerik:RadPageView>
    </telerik:RadMultiPage>
</div>
 
<div class="WinButton">
    <div class="WinButtonDetailsAdmin">
        <asp:Button id="BtnCancel" runat="server" Cssclass="button90_second_action" OnClientClick="CloseRadWindow();" />
        <asp:Button id="BtnSubmit" runat="server" Cssclass="button90_main_action" OnClientClick="return(checkForm(theForm));" />
    </div>
</div>

When I first load my control, the first tabstrip element is selected but both pageview appears...
If I then click on the second tab, only the 2nd pageview displays  (that's fine...)
If I go back to the first tab, only the 1st pageview displays  (fine too...)

My problem is at the first load of the control.
My code behind page doesn't contain anything regarding the tabstrip or pageview.

Has someone alreday faced that issue ? nad has a solution ?

Regards.


Nencho
Telerik team
 answered on 09 Nov 2012
3 answers
154 views
I'm developing some prototype and i'd like to make use of ribbon bar just like an office application, for example, i want the ribbon bar to have that application menu with some options like, new, save, and stuff like that. I'm also using a panel bar as a side menu.

The scenario is:
I need to change the tabs and buttons of the ribbon bar with an event from the side bar.

The event on the sidebar changes the xml that populates the ribbon bar but that is where I have a problem.

To change the ribbon bar with xml I have to remove the application menu because with it, I get some exception.

Sys.WebForms.PageRequestManagerServerErrorException:
Failed to load viewstate.  The control tree into which viewstate is being
loaded must match the control tree that was used to save viewstate during
the previous request. For example, when adding controls dynamically, the
controls added during a post-back must match the type and position of the
controls added during the initial request.


I believe that it could be solved if I add definitions for application menu in the xml and use my population event.
But the xml that was created from the method from ribbonbar ("GetXml()") didn't create anything.

I'd like to know if I should add it manually or the tags to do so. (if possible)
Or even another way to make something like that (use the dynamic population for the ribbon bar with application menu)

Thanks
Bozhidar
Telerik team
 answered on 09 Nov 2012
1 answer
226 views
Hi friends,

Am using Radscheduler to Book the Employee for the Particular Project, i need to display the Employees in the Left side, on the right side it will list Project Period Date which i mentioned.
am not using any SqlDataSource / ObjectDatasource for Binding, am using only one Dataset which contains Employee List and also the Date Allocated to the Employees

SQL Returns

EMPID        PROJ_CODE      START_DATE           STATUS
-----------------------------------------------------------------------------------------------
00522         APN_PROJ          05-SEP-2012           BOOKED

00522         APN_PROJ          06-SEP-2012           BOOKED

00522         APN_PROJ          NULL                        NULL

00522         APN_PROJ          08-SEP-2012           PENDING


When i binding this it show as like the return from the SQL Values.

Kindly Check the Attached file. for two Dates. it shows two records for me

    <telerik:RadScheduler runat="server" ID="RadScheduler1" GroupBy="RTT_EMP_STAFFID,Start" Skin="Black"  ShowNavigationPane="false" ShowViewTabs="false"
                OverflowBehavior="Auto" TimelineView-HeaderDateFormat="dd-MMM-yyyy" DataKeyField="RTT_EMP_STAFFID"
                TimelineView-ColumnHeaderDateFormat=" ddd - dd"    >                  
                  <ResourceTypes>
                        <telerik:ResourceType KeyField="RTT_EMP_STAFFID"  Name="RTT_EMP_STAFFID" TextField="RTT_EMP_STAFFID" ForeignKeyField="RTT_EMP_STAFFID" ></telerik:ResourceType>
                   </ResourceTypes>
                
            </telerik:RadScheduler>
           


aspx.cs File
==========

 ds_temp = objProjectBooking.GetEmployeeHolidayWeeklyOff(objSessionInfo, "ProjCode", "Activity ID", "", "", "", "", "01-SEP-2012", "31-DEC-2012", "", "E");
                    if (ds_temp.Tables.Count > 0 && ds_temp.Tables[0].Rows.Count > 0)
                    {

                        RadScheduler1.SelectedDate = Convert.ToDateTime("01-SEP-2012");
                        RadScheduler1.SelectedView = SchedulerViewType.TimelineView;
                        RadScheduler1.TimelineView.NumberOfSlots = Convert.ToInt32(10);
                        //RadScheduler1.DataKeyField = "ID";
                        RadScheduler1.DataSubjectField = "Subject";
                        RadScheduler1.DataStartField = "Start";
                        RadScheduler1.DataEndField = "End";
                        RadScheduler1.GroupBy = "RTT_EMP_STAFFID,Start";
                        RadScheduler1.GroupingDirection = GroupingDirection.Vertical;
                        RadScheduler1.DataSource = ds_temp;    
                        RadScheduler1.ResourceTypes[0].DataSource = ds_temp;
                        RadScheduler1.DataBind();                     

                    }


what was the Problem in this kinldly Help me

Plamen
Telerik team
 answered on 09 Nov 2012
0 answers
47 views
Hi,

I am using version 2011.3.1305.35 of the ASP.NET for AJAX controls.

When I insert a treeview node using client side code, and then drag and drop it, the server side code's SourceDragNode.Value is wrong.  It is the value of the node that is directly ABOVE my inserted node.

I am doing the following:
1)  Using a command on a context menu that uses javascript and an asp ScriptManager and a ServiceReference to insert a node into the treeview.  The javascript that runs in the context menu clicking event is:

selectedFolderParentID = treeNode.get_value();
var UserIDHiddenField = document.getElementById('=UserIDHiddenField.ClientID;');
Portal.UserFavoritesWS.AddFavoriteFolderReturnNode(UserIDHiddenField.value, selectedFolderParentID, folderName, OnFolderInsertCompleted);
eventArgs.set_cancel(true);


2) Then in the callback function (OnFolderInsertCompleted - which is run when the web service returns), I insert the node into the tree at the correct location and put it into edit mode:

function OnFolderInsertCompleted(nodeData) {
var tree = $find("=Me.SavedFavoritesTreeView.ClientID");
var node = new Telerik.Web.UI.RadTreeNode();
tree.trackChanges();
var folderName = nodeData.Text;
var folderID = nodeData.Value;
node.set_text(folderName);
node.set_value(folderID);
node.get_attributes().setAttribute("ObjectTypeID", "80");
node.set_cssClass("savedFolderNode");
var parentNode = tree.findNodeByValue(selectedFolderParentID);
parentNode.get_nodes().add(node);
parentNode.expand();
if (parentNode != tree && !parentNode.get_expanded()) {
    parentNode.set_expanded(true);
}
node.select();
tree.commitChanges();
if (node)
   setTimeout(function () { node.startEdit() }, 20);}


ALL OF THAT WORKS, and I can see that the node's value is indeed the correct ID that was sent back from the node data by the web service.

3) However, if I then immediately Drag and Drop that node (before any other server side page refresh or postback), the server-side SourceDragNode.Value is NOT from the node I've dragged.  It is the value from the node directly ABOVE the node I've dragged.

The result of this, since I have the wrong SourceDragNode.Value, is that the wrong node is being dragged and dropped!

Of course on any full page refresh or postback the SourceDragNode.Value is correct and drag and drop works find because I rebind my treeview on the server, so everything is property sync'ed up at that time...  But it seems like if I do the database insert from the client and also add the node from the client, the server code isn't yet aware of that node (like it is accessing the wrong index item or something).

Any Ideas on what I'm doing wrong or how I can fix this?

Thanks,
Brent
Brent Hetland
Top achievements
Rank 1
 asked on 09 Nov 2012
5 answers
354 views
Apologies for the slightly aggressive title, but I have been coding, googling, and browsing the forums for hours, and I am basically no nearer to getting anything to work!

Your advice on working with Entity Framework objects is all over the place, and I can't seem to work out a simple answer.  One page says I should bind to an EntityDataSource, the next says that NeedDataSource is the preferred binding method for Entity Framework.  Oh and for good measure, some people say ObjectDataSource should be used (this is related to the fact I'm using Code First POCOs).  So here are my challenges:

Binding through EntityDataSource
If I bind through the entity data source, it works for a whole 1 request, that is to say that no postback operations work in the slightest.  I set up my entity data source, enabled updates/deletes/inserts, and I can click anything I like, but nothing actually seems to interact with the data source.  I see the following events on deleting for example:
  1. Click delete
  2. Grid deletecommand event fires, where all references to the data item in question are null
  3. No call to data source events
  4. NeedDataSource is called
  5. Result - no effect

Binding through NeedDataSource
This can not possibly be the recommended approach!  Everything becomes manual to the point of complete frustration and the only benefit I get from the grid is it looks pretty!  Everything from Sort Expressions, to grouping, to OH MY WORD filtering (what a nightmare) becomes a hassle from hell.  What the heck is the idea behind using dynamic linq expressions for filtering???  Can't you just spit out some predicates or something.  Yeah it might not be that simple, but you guys have a heck of a lot of developers there.

Entity Framework is I admit newer than sql, but come on, it's not that new!  It's not like we're on CTP V1, we're now expecting V5 of Entity Framework and apologies, but it's high time telerik caught up.  It's starting to feel like the ASP.NET controls are losing funding and you guys are on your way to retiring them.  If that's the case, please just say so, so I can go out and advise clients to move to a different control suite if they want to build ASP.NET apps.

By the way, don't get me wrong, I've been a Telerik fan for a long time, and Sitefinity, Kendo, and the rest of your product line are all pretty fantastic (OpenAccess is an odd one, but you can't do everything perfect!! :)

I appreciate that this post is about 40% fuelled by a tired mind frustrated at not being able to accomplish what I'm trying to do, but that should also be a concern for you.  If I can't find what I need from your forums, documentation and examples, I'm not going to be a happy customer... oh wait, that's exactly what I'm not right now!

Please help me keep some of my hair from going grey.  Obi Wan Telerik, you're my only hope!

(p.s I know this post is devoid of code examples, but if I was to post all the things I've tried, I'd cause out of memory exceptions in your web server or disk space problems for your dba's, so if you can point me in the right direction, I'll let you know where I've been already down that road.)
Shinu
Top achievements
Rank 2
 answered on 09 Nov 2012
4 answers
388 views
I'm trying out the upload controls on MVC, but I'm having some small problems.

When I'm using RadUpload, the Progress is only showed on really large files. However when that happens, the controller action is triggered before recieving the file, so I get no file in the action, and later an uploaded file that the server never notice.

When I'm using RadAsyncUpload it seems to upload nicely, but I can't figure out how I should reach the files in the controller action when eventually posting the form.

Any ideas or opinions?
Plamen
Telerik team
 answered on 09 Nov 2012
5 answers
94 views
Hi

I have a couple of things in my query:
1. I spotted an bug in the Metro touch skin , on your demos as well as my implementation the alignment property on the bootm drop down does not allow you to select an alignment , this happens on tables too, also the fileds are so big that they flow over the editor.

2. I am developing a dynamic form designer , what i would like to do is create pre defined elements that can be dragged on to the designer. and when selected display a property panel with pre defined properties.These elements will be of combined markup for example.
<div class="designElement" id="element1">
<table>
<tr>
<td>Some Text</td>
<td><img src="img.png"></td>
</tr>
</table>
</div>

For this to be able to work I wish to block the inner html of the for being edited by the designer.
also I would like to know is there a javascript method I can Use in order to get the element that is selected.

So In short I would like to select the element (of class designelement) in the designer and return the ID when clicked but I down want any element in the inner HTML of that div to be changeable through the designer.

Stanimir
Telerik team
 answered on 09 Nov 2012
1 answer
209 views
Hi,
I am struggling to set the selected index for the first page, it works for the 2nd page, but not the first page, the tab selects but it displays the second page. Am i missing a tag?

<telerik:RadTabStrip ID="RadTabStrip1" runat="server"
        MultiPageID="RadMultiPage1" SelectedIndex="0">
        <Tabs>
            <telerik:RadTab runat="server" PageViewID="pageStandardProject"
                Text="Standard Project" Selected="True">
            </telerik:RadTab>
 
            <telerik:RadTab runat="server" PageViewID="pageBillOfQuantities"
                Text="Bill of Quantities">
            </telerik:RadTab>
            <telerik:RadTab runat="server" PageViewID="pageAudit" Text="Audit">
            </telerik:RadTab>
        </Tabs>
    </telerik:RadTabStrip>

Thanks in Advance
Ryan
Shinu
Top achievements
Rank 2
 answered on 09 Nov 2012
9 answers
157 views
Hi everyone,

I am attempting to create an application page in SharePoint 2010 using Telerik ASP.NET AJAX controls. I created an empty SharePoint project (see attached file 'solution.png') then added an application page project. I am referencing Telerik.Web.UI. However, I am getting an error (see attached file 'error.png') saying the assembly Telerik.Web.UI cannot be found.

I think the error lies here: SharePoint 2010 is purely 64-bit. It seems that I have the Telerik controls installed but they reside in the directory 'C:\Program Files (x86)\Telerik\RadControls for ASP.NET AJAX Q3 2012\Bin35'. Assembly Telerik.Web.UI exists in the GAC but I think they're of the wrong versions (see attached file 'Assembly.png').

Could this be giving me these errors?
Stanimir
Telerik team
 answered on 09 Nov 2012
1 answer
63 views
Hi,

I'm working on a radwindow that behave like the example on this page (Ajax / Loading user controls)
What i would like is the loaded control to be submitted using it's inner submit button (I manage to do that..) but also when another control is asked to be loaded.
I already manage to do a javascript check before changing tab but i do not manage to submit my control content by the same time.
I think I need to isolate in the control page_load the fact that a button or link has been clicked in the page containin my control but i have no idea to do so !
If anyone has an idea...it would be great and really helpfull !

Thanks in advance

Pierre Henri
Pierre-Henri
Top achievements
Rank 1
 answered on 09 Nov 2012
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
Radek
Top achievements
Rank 2
Iron
Iron
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Richard
Top achievements
Rank 4
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
Radek
Top achievements
Rank 2
Iron
Iron
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Richard
Top achievements
Rank 4
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?