Telerik Forums
UI for ASP.NET AJAX Forum
2 answers
194 views
Hi,

I have a requirement like:

I have 20 columns of a grid, and My user does not want all columns at a time, wanted to see 10 columns on screen. Now for that he is expecting to hide remaining 10 columns and show when it is required. So I am thinking to have 2 tables from a stored procedure, in which first will return columns which are by default available on grid and 2nd table will contain remaining 10 columns.

So common factor or parent relation will be on EmployeeID.

I tried to and I am successful till database level but somehow not able to bind data to database. I want to do this all in code behind as my stored procedure is quite complex and so dont want to use dataSourceID.

So anyone help me out to show nested grid through code behind?
Avinash
Top achievements
Rank 1
 answered on 04 Apr 2011
3 answers
206 views
Hi,
We're using the RadScheduler in web service data binding mode. We're using our own custom Advanced editing form template based on the examples provided. We are using a custom user control in this form which we want to pass the ID of the appointment (which is set as an int id value from our database). However when we try to access the ID property on the appointment object in server side code it is always null.
Is this due to the client side nature of the scheduler in this mode, and is there any way around this ?
We are setting the value when the appointments are created after being retrieved from the database. We have also tried setting it as a custom attribute but we are unable to access the value in server side code.
Seems like a simple thing to do and we can see all the other properties and attributes OK, and we can see the appointment ID if we use the client side API.

thanks,
Rowan
Peter
Telerik team
 answered on 04 Apr 2011
2 answers
1.1K+ views
Hello everyone,

I am new to RadGrid Control and want to achieve following functionality.

I have one grid which i wanted to bind with various data sources so I dont have fixed columns structure but it will be decided when I bind grid with data sources.

So I want to implement Dynamic columns in Grid when bound to data source.

I have tried to add columns in "Page_Load Events" and grid bind into "rgDemo_OnNeedDataSource" event but its not working when I change page index.

So I want proper way of doing same.

How can i do same?

Thanks in advance

Dharmesh Solanki
Dharmesh
Top achievements
Rank 1
 answered on 04 Apr 2011
14 answers
794 views
My company is considering evaluating your asp.net ajax controls.  Quick question: In an ASP.Net web app, how do your ajax controls handle forms authentication expiration on the client?  When a ajax call is made, do your controls gracefully handle the timeout and prompt the user to re-login?  If not, do you have any documentation that discusses best practices on how to implement this in asp.net web applications?  I'm surprised how there is very little information on the subject.  Thanks in advance.
Gosha
Top achievements
Rank 1
 answered on 04 Apr 2011
1 answer
91 views
Hello,

Let me try to explain the subject. I have a page with RadAjaxManager and need to get hold of it when application initially loads. I am doing it like that:
var ajaxManager = $find("<%= RadAjaxManager.GetCurrent(this).ClientID %>");

 problem is that it works fine when I open page in localhost, like http://localhost. However, when I change localhost to something else (like http://sameMachine), it can't get it and returns null.

Here is sample page:
<html lang="en">
<head id="Head1" runat="server">
    <meta charset="utf-8" />
    <title>Blah</title>
</head>
<body>
    <form id="form1" class="form" runat="server">
    <telerik:RadScriptManager ID="ScriptManager" runat="server" EnablePageMethods="True"
        EnableTheming="True">
    </telerik:RadScriptManager>
    <div id="Div1" class="page" runat="server">
            <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel" runat="server" Skin="Sitefinity" />
            <telerik:RadAjaxManager ID="RadAjaxManager" runat="server">
                <AjaxSettings>
                    <telerik:AjaxSetting AjaxControlID="testButton">
                        <UpdatedControls>
                            <telerik:AjaxUpdatedControl ControlID="testButton" UpdatePanelHeight="" />
                        </UpdatedControls>
                    </telerik:AjaxSetting>
                </AjaxSettings>
            </telerik:RadAjaxManager>
          <asp:Button ID="testButton" runat="server" Text="Test Me" OnClientClick="TestMe('button');" />
    </div>
    <script type="text/javascript">
        function TestMe(argument) {
            var ajaxManager = $find("<%= RadAjaxManager.GetCurrent(this).ClientID %>");
            if (ajaxManager == null) {
                alert('NULL. called by ' + argument);
            }
            else {
                alert('Got it from ' + argument);
            }
        }
 
        window.attachEvent("onload", function () {
           // will work fine if run on localhost
            TestMe('window.onload');
        });
 
       
    </script>
    </form>
</body>
</html>

Please advise.

Thanks,
Nick
Iana Tsolova
Telerik team
 answered on 04 Apr 2011
3 answers
176 views
Hello Everyone

I have an error during my compilation.
I am trying this link.
http://www.telerik.com/help/aspnet-ajax/data-binding-exchange-provider.html

When i import this:
Telerik.Web.Examples.Scheduler.Exchange

It can not find the .Examples.Scheduler.Exchange. I think it is with the version of the the telerik

Hoping for a quick reply.

Thank you
Erwin
Peter
Telerik team
 answered on 04 Apr 2011
5 answers
134 views
Hi,

When I use the Image Manager to insert an image into the contents of the RadEditor a link like <img alt="" style="width: 120px; height: 150px;" src="/CMS/Upload/Media/7038fa0c-61ec-46ae-a397-b899dc3b21e3.jpeg" complete="complete" complete="complete" /> is inserted (when I switch from the design view to the html view).
This is not xhtml compliant.
It is unclear to me why the attribute complete="complete" is inserted and why it's inserted twice.

Please inform me how to avoid such invalid attributes when inserting images.

Regards,

Mink
Rumen
Telerik team
 answered on 04 Apr 2011
1 answer
267 views
Hi,

Note: it's quick and dirty :)

I needed to customize the "Select" button's view to match UI, it should have had:
1)only button, no 'fake' file input, no file list, nothing, only immediate 1 file upload (to set current picture)
2)round corners
3)different style when hovered
4)resize to match inner text when site's language is changed

Note: when button is hovered in browsers that support Flash/Silverlight cursor doesn't change to 'pointer' type, but does in IE 64-bit.
I didn't investigate much, simple setting cursor: pointer !important; didn't do the trick (admins, any ideas?)

Ok, you will need to create 3 background png images (2 for button's left part (one with active image another passive) and 1 for the right part, the round corner). Note that I use one of left background images as background for ruUploadProgress span when there is an upload happening with a file name being uploaded.

.createContentPageAdditionalOptions .RadUpload
{
    width:100px !important;
}
.RadUpload input
{
    font-family: verdana !important;
}
.createContentPageAdditionalOptions .RadUpload input.ruFakeInput
{
    display: none;
}
.RadUpload input.ruBrowse
{
    background: url(/Images/btnLeftPartInactive.png) top left no-repeat !important;
    width: auto !important;
    line-height:21px;
    height:23px;
    text-align:left;
    margin:0px 3px 0px 0px !important;
    padding:0px 8px 3px 18px !important;
.createContentPageAdditionalOptions .RadUpload .ruInputs
{
    text-align:center;
}
.RadUpload input.ruBrowse,
.createContentPageAdditionalOptions .RadUpload .ruUploadProgress,
.createContentPageAdditionalOptions .RadUpload .ruCancel,
.createContentPageAdditionalOptions .RadUpload .ruRemove
{
    color:#fff !important;
}
.createContentPageAdditionalOptions .RadUpload .ruUploadProgress
{
    background: url(/Images/btnLeftPartInactive.png) top left no-repeat !important;
    margin:0px 3px 0px 0px !important;
    height:23px;
    overflow:hidden;
    width:80px;
}
.RadUpload input.ruButtonHover
{
    background: url(/Images/btnLeftPartActive.png) top left no-repeat !important;
    color: #d14b35 !important;
}
.RadUpload .ruFileWrap
{
    width: auto !important;
    padding: 0px !important;
    background: url(/Images/btnRightPart.png) top right no-repeat !important;
.RadUpload input.ruBrowse,
.createContentPageAdditionalOptions .RadUpload .ruCancel,
.createContentPageAdditionalOptions .RadUpload .ruRemove,
.RadUpload input.ruFileInput 
{
    cursor: pointer !important;
}

Note createContentPageAdditionalOptions class, I use it here cause I don't want to change the view of all asyncuploads I have, just particular one, next step, on the page where you have the control add following snippet:

var modules = Telerik.Web.UI.RadAsyncUpload.Modules;
       if (modules && (modules.Silverlight.isAvailable() || modules.Flash.isAvailable())) {
           $(".ruFileWrap").live("mouseover mouseout", function (event) {
               $(this).children("input[class != 'ruFakeInput']").toggleClass("ruButtonHover");
           });
       }

This will enable native hovering to work when browser is using Flash/Silverlight object.

Finally my control:
<telerik:RadAsyncUpload runat="server" ID="RadAsyncUploadImageForNavNode" AllowedFileExtensions="jpg,jpeg,png,gif"
                   CssClass="divToBeCentered" MaxFileSize="5242880" MultipleFileSelection="Disabled" 
                   OnFileUploaded="RadAsyncUploadImageForNavNode_FileUploaded" EnableInlineProgress="false" Width="120px"
                   MaxFileInputsCount="1" OnClientFileUploaded="RadAsyncUploadImageForNavNode_OnClientFileUploaded"
                   Localization-Select="<%$ Resources:PGC, ProjectContentElement_UploadImage %>"
                   Localization-Cancel="<%$ Resources:PGC, General_Cancel %>"
                   Localization-Remove="<%$ Resources:PGC, General_Remove %>"
                   >
               </telerik:RadAsyncUpload>

and JS it calls when upload completes:

function RadAsyncUploadImageForNavNode_OnClientFileUploaded(sender, args) {
            $("#btnRefreshUploadedImageToCurrentProjectElementStub").click();
        }

so that postback happens immediately and picture is set.

That's it, hopefully someone will find this usefull :)

P.S.: attached file has 4 views: default, hovered, uploading and default again (after upload)
Genady Sergeev
Telerik team
 answered on 04 Apr 2011
1 answer
177 views

Dear,

I want to access a pane and set it's content url.it works by using

var contentPane = $find("<%= PaneRight.ClientID %>");
and not works by using
var splitter = GetRadSplitter();
var pane = splitter.getPaneById("PaneRight");

the page source below
<%@ Page Title="" Language="C#" MasterPageFile="~/Common/Base.Master" AutoEventWireup="true"
    CodeBehind="RptAuth.aspx.cs" Inherits="Rp.UI.ReportManager.RptAuth" %>
  
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
  
    <script type="text/javascript" language="javascript">
        function GetRadSplitter() {
            return $find("<%= RadSplitter1.ClientID %>");
        }
  
        function tvClientNodeClicked(sender, eventArgs) {
            var node = eventArgs.get_node();
            if (node.get_nodes().get_count() > 0) {
                return;
            }
//            var splitter = GetRadSplitter();
//            var pane = splitter.getPaneById("<%= PaneRight.ClientID %>");
//            debugger;
            var contentPane = $find("<%= PaneRight.ClientID %>");
            if (!contentPane) return;
  
                 }
    </script>
  
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolderMain" runat="server">
    <telerik:RadSplitter ID="RadSplitter1" runat="server" Orientation="Vertical" BorderSize="0"
        BorderStyle="None" Height="100%" Width="100%">
        <telerik:RadPane ID="PaneLeft" runat="server" Scrolling="None" Height="100%" Width="180px">
            <div style="border-top-style: solid; border-top-width: 1px; border-top-color: #3333CC">
                <telerik:RadTreeView ID="tvUser" Height="100%" Width="100%" runat="server" OnClientNodeClicked="tvClientNodeClicked">
                    <Nodes>
                                   </div>
        </telerik:RadPane>
        <telerik:RadSplitBar runat="server" ID="RadSplitBar1" CollapseMode="Forward" />
        <telerik:RadPane ID="PaneRight" runat="server" Scrolling="Both">
        </telerik:RadPane>
    </telerik:RadSplitter>
</asp:Content>

I noticed that all the demo have used the second way to access the specified pane.how to fix my code?

thanks

Kevin
Dobromir
Telerik team
 answered on 04 Apr 2011
1 answer
81 views
Is there a list of features that being added to the RibbonBar control in SP1?  I checked the PITS system, but don't see anything there for the RibbonBar at all.

I have mentioned a couple of missing features/bugs in a previous issue which I was told were already on the to-do (Thanks! btw). 

Is there by chance going to be a server side OnClick/OnCommand event available for a RibbonBarButton with CommandName and CommandArgument properties?  How about a NavigateUrl for RibbonBarButton?

Thanks again!  I really love this new control.  We aren't planning on going live with it for a few months, but I at least want to make sure some of these features will eventually be added to the control.
Simon
Telerik team
 answered on 04 Apr 2011
Narrow your results
Selected tags
Tags
+? more
Top users last month
Bohdan
Top achievements
Rank 3
Iron
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Elliot
Top achievements
Rank 1
Iron
Iron
Iron
Sunil
Top achievements
Rank 1
Cynthia
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Bohdan
Top achievements
Rank 3
Iron
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Elliot
Top achievements
Rank 1
Iron
Iron
Iron
Sunil
Top achievements
Rank 1
Cynthia
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?