Telerik Forums
UI for ASP.NET AJAX Forum
2 answers
146 views
I just loaded up the latest dlls and it seems that the radupload is fixed width at 430 and the width attribute in the tag does nothing.  It use to display fine at width="100%" and now its stuck at 430px.  Did something change?
John
Top achievements
Rank 1
 answered on 03 Oct 2008
1 answer
120 views
I am trying to customize the advanced form template in a web application project. The problem seems to be that the MultipleValuesResourceControl.ascx and  ResourceControl.ascx both use

 "public partial class ResourceControls : UserControl"

for their .cs files. These contain duplicate properties and functions which generate errors when I try to build the project.

What would I need to do modify the template in a web applicaion project?

Thanks,
Dave
T. Tsonev
Telerik team
 answered on 03 Oct 2008
2 answers
170 views
I want to submit a support ticket because I've had a problem for awhile and no one has been able to help me so far.  I've been working at my company for a little over a year and have been registered on telerik since 9/27/07.  Is this something where I only have a year for certain support?  Am I able to tell if I can still get this support through my company?  I'd rather not have my boss (whom I think all the software is registered to because he bought it) enter all my questions because I don't want to bother him all the time.  Just wondering if he'd be able to add my email/username and all that to the company signin so I can have access to everything.  Or, maybe the company doesn't have this support anymore?  How can I go about figuring this out?  Thanks!
Amanda
Top achievements
Rank 2
 answered on 03 Oct 2008
1 answer
154 views
Hi, I have a tabstrip in a table cell with 5 tabs.  how can i adjust the vertical position of the text in the tab without affecting the tab graphics.  EnableEmbeddedSkins="false" then I have my own CssClass, SelectedCssClass and HoveredCssClass from the examples

The TD vert alignment is set to middle but the text on the tab always shows in the top not the middle.

I created my own css class and if I add a margin or padding it moves the text down but also make the container bigger also.  all I want is to center the text vertically in the tab

The text is also left justified and if I change the padding-left it adds padding to both the tab and the text.  can I keep the distance between the tabs 1 pixels but move the text for the tab to the right a bit.  I dont want it centered I want it 5 pixels from the left of the tab graphic

Thanks
Keith
SonicImaging
Top achievements
Rank 1
 answered on 03 Oct 2008
1 answer
119 views
Hi there, I was wondering if there is a way to prevent users from clicking the red x in a RadConfirm dialog. If not is there some way to know when they do click the red x?
Georgi Tunev
Telerik team
 answered on 03 Oct 2008
5 answers
169 views
Hi,

I using the fonction radGrid.MasterTableView.ExportToExcel() , and it work fine.

But  when I want to use the Excel file with the MailMerge fonctionality in word, it does not work. I found a workaround that is bizarre. I cut and paste the Excel content in a new Excel file and now it's working. This solution is not the best and not very professionnel to offer to my client. I you aware of this issue and do you have a solution for me ?

thanks
J-F
Jean-Francois
Top achievements
Rank 1
 answered on 03 Oct 2008
2 answers
111 views
Hi,How to get reference for grid in FormTemplate for a row in editMode, outside the itemDataBound?I had a toolbar inside my FormTemplate and my command is launch with this toolbar. The reference is always nothing when i search in the EditItems.Ty
Jack
Top achievements
Rank 1
 answered on 03 Oct 2008
2 answers
112 views
Hi all,
How do i make a grid respond to a double click, mine doesnt postback when i click or double click,
I cant seem to find a property for autopostback like other web controls

Regards
Omlac
Top achievements
Rank 1
 answered on 03 Oct 2008
1 answer
64 views
Hi, I have a licensed version of the controls and previously had the demo version.   My project is referencing the licensed version, but I am still receiving the demo displays occasionally.    Is there a trick to getting rid of that?
Paul
Telerik team
 answered on 03 Oct 2008
1 answer
330 views

I have a scenario similar to this thread:

http://www.telerik.com/community/forums/thread/b311D-bckhem.aspx

I have implemented a grid editing scenario with RadWindow and ajaxmanager using client-side script callbacks.

I have a master page and a content page.  Currently the Rad Ajax Manager resides in the content page.  I am not currently using
the Rad Ajax Manager Proxy.

Everything is working well so far and I am able to edit and add grid items and refresh the grid using client-side script and the rad Ajax manager.

The code so far looks like the following (code is from the content page - ClientDetail.aspx that displays the grid and a page that is opened in the rad window - ServiceEventDetail.aspx which does not use a master page)

ClientDetail.aspx: (abbreviated for clarity)  There is alot of AJAX stuff going on on the page as ther ar multiple grids on different tabs of a tabstrip. Sorry I can't get the code formatter to work for me so I just made everything blue.

<telerik:RadCodeBlock runat="server">
<script type="text/javascript">
 

function openEditEventWindow(ServiceEventID) {
    var oWnd = radopen("ServiceEventDetail.aspx?ServiceEventID=" + ServiceEventID, "Edit Service Event");
    oWnd.set_modal(true);
    oWnd.setSize(750, 600);
    oWnd.set_behaviors(Telerik.Web.UI.WindowBehaviors.Close + Telerik.Web.UI.WindowBehaviors.Move);
    oWnd.set_visibleStatusbar(false);
    oWnd.Center();
}
function openAddEventWindow() {
    //open a new window for adding a client comment parsing the URL request for the current client ID
    var oWnd = radopen("ServiceEventDetail.aspx?ClientID=" + gup('ClientID'), "Add Service Event");
    oWnd.set_modal(true);
    oWnd.setSize(750, 600);
    oWnd.set_behaviors(Telerik.Web.UI.WindowBehaviors.Close + Telerik.Web.UI.WindowBehaviors.Move + Telerik.Web.UI.WindowBehaviors.Reload);
    oWnd.set_visibleStatusbar(false);
    oWnd.Center();
}

function refreshServiceEventGrid() {
    var radMgr = $find("<%=RadAjaxManager1.ClientID %>");
    radMgr.ajaxRequest("Rebind_ServiceEvents");
}

</script>
</telerik:RadCodeBlock>

<telerik:RadGrid runat="server"
ID="radGridServiceEvents"
AllowMultiRowSelection="false"
ClientSettings-Selecting-AllowRowSelect="false">
<MasterTableView
    AutoGenerateColumns="False"
    DataKeyNames="ID"
    Width="100%"
    CommandItemDisplay="Top"
    PageSize="10"
    EnableNoRecordsTemplate="true">
...
    <Columns>
        <telerik:GridTemplateColumn
            UniqueName="TemplateEditColumn"
            HeaderText="View/Edit"
            HeaderStyle-Width="100">
            <ItemTemplate>
                <asp:ImageButton ID="EditButton" OnClientClick='<%# Eval("ID", "openEditEventWindow({0}); return false;" ) %>'  runat="server"  ImageUrl="./images/edit.gif"></asp:ImageButton>
            </ItemTemplate>
        </telerik:GridTemplateColumn>
    </Columns>
    <CommandItemTemplate>
        <table border="0" style="width:100%;">
            <tr>
                <td align="left"><td align="left"><input type="button"  value=" " onclick="javascript:openAddEventWindow()" id="AddNewEventButton" title="Add New Service Event" class="rgAdd" /><a  href="javascript:openAddEventWindow()">Add" originalAttribute="href" originalPath="javascript:openAddEventWindow()">Add" New Service Event</a></td></td>
            </tr>
        </table>
    </CommandItemTemplate>
   </MasterTableView>
 </telerik:RadGrid>

...

 <telerik:RadAjaxManager runat="server" ID="RadAjaxManager1" OnAjaxRequest="RadAjaxManager1_AjaxRequest">
   <AjaxSettings>
        <telerik:AjaxSetting AjaxControlID="RadAjaxManager1">
        <UpdatedControls>
                <telerik:AjaxUpdatedControl ControlID="radGridServiceEvents" />
                <telerik:AjaxUpdatedControl ControlID="radGridComments" />
                <telerik:AjaxUpdatedControl ControlID="radGridClientDocuments" />
            </UpdatedControls>
        </telerik:AjaxSetting>
        <telerik:AjaxSetting AjaxControlID="ddlPrimaryRace">
            <UpdatedControls>
                <telerik:AjaxUpdatedControl ControlID="ddlSecondaryRace" />
            </UpdatedControls>
        </telerik:AjaxSetting>
        <telerik:AjaxSetting AjaxControlID="radGridServiceEvents">
            <UpdatedControls>
                <telerik:AjaxUpdatedControl ControlID="radGridServiceEvents" />
            </UpdatedControls>
        </telerik:AjaxSetting>
        <telerik:AjaxSetting AjaxControlID="radGridClientDocuments">
            <UpdatedControls>
                <telerik:AjaxUpdatedControl ControlID="radGridClientDocuments" />
            </UpdatedControls>
        </telerik:AjaxSetting>
        <telerik:AjaxSetting AjaxControlID="radGridComments">
            <UpdatedControls>
                <telerik:AjaxUpdatedControl ControlID="radGridComments" />
                <telerik:AjaxUpdatedControl ControlID="lblMessage" />
            </UpdatedControls>
        </telerik:AjaxSetting>
    </AjaxSettings>
</telerik:RadAjaxManager>

ClientDetail.aspx.cs

...

public void LoadServiceEvents(bool resetPage)
    {
        List<CSTServer.ServiceEvent> _ServiceEvents;
        if (_client == null)
        {
            _ServiceEvents = CSTServer.ServiceEventService.GetForClient(Int32.Parse(Request.QueryString["ClientID"]));
        }
        else
        {
            _ServiceEvents = _client.getServiceEvents(true);
        }

        if (_ServiceEvents != null)
        {
            radGridServiceEvents.DataSource = _ServiceEvents;

            if (resetPage == true)
            {
                radGridServiceEvents.CurrentPageIndex = 0;
            }
            radGridServiceEvents.DataBind();
        }
        radGridServiceEvents.Focus();
    }

...

    protected void  RadAjaxManager1_AjaxRequest(object sender, Telerik.Web.UI.AjaxRequestEventArgs e)
    {
        switch (e.Argument)
        {
            case "Rebind_ServiceEvents":
                LoadServiceEvents(true);
                break;
        }
    }

...

ServiceEventDetail.aspx:

<script type="text/javascript">  
        //Get a reference to the the containing RadWindow  
        function GetRadWindow()  
        {  
            var oWindow = null;  
            if (window.radWindow) oWindow = window.radWindow;  
            else if (window.frameElement.radWindow) oWindow = window.frameElement.radWindow;  
            return oWindow;  
        }          
        function CloseAndRebind(args)
        {
            GetRadWindow().Close();
            GetRadWindow().BrowserWindow.refreshServiceEventGrid(args);
        }
        function CancelEdit()
        {
            GetRadWindow().Close();  
        }
        </script>

and in the code behind

ServiceEventDetail.aspx.cs

private int SaveServiceEvent()
    {
        if (Request.QueryString["ServiceEventID"] != null)
        {
            //load the Client we're in edit mode
            _serviceEvent = ServiceEventService.GetByID(Int32.Parse(Request.QueryString["ServiceEventID"]));
           
            SaveScreenToServiceEvent();

            ServiceEventService.Save(_serviceEvent);
            //call the client side CloseAndRebind on reload of page after postbacl whhihc calls the parent refresh grid
            ClientScript.RegisterStartupScript(Page.GetType(), "mykey", "CloseAndRebind();", true);
        }
        else if (!(Request.QueryString["ClientID"] == null))
        {
            //new ServiceEvent
            _serviceEvent = new ServiceEvent();
            _serviceEvent.ClientID = Int32.Parse(Request.QueryString["ClientID"]);
           
            SaveScreenToServiceEvent();
            ServiceEventService.Save(_serviceEvent);
           
            //call the client side CloseAndRebind on reload of page after postback which calls the parent refresh grid
            ClientScript.RegisterStartupScript(Page.GetType(), "mykey", "CloseAndRebind('navigateToInserted');", true);
        }
        return _serviceEvent.ID;

    }

OK so far so good.  The problem is now I would like to start using the Rad Ajax Manager Proxy in the ClientDetail.aspx (Content Page)
and put the Rad Ajax Manager in the master page as I would like to update a control which is in the master page to return messages
to the user when the grid is updated via AJAX on the content page.  I am wondering given the complexity of this scenario, whether this is even worth it :-)

In the documentation for the Rad Ajax Manager Proxy:

"The purpose of the new control is to ease the design-time configuration only. The Proxy does not provide client-side functionality as the Manager does. There is no client-side object as well as functions like ajaxRequest/ajaxRequestWithTarget and client-side events. Instead, one can get the Manager instance through the GetCurrent static method similar to the ASP:ScriptManager control and call the master manager client-side methods if necessary. "

and

"Accessing master manager client-side from content page"

   <telerik:RadCodeBlock ID="RadCodeBlock1" runat="server">
       <script type="text/javascript">
           function myUserControlClickHandler()
           {
               $find("<%= RadAjaxManager.GetCurrent(Page).ClientID %>").ajaxRequest("content");
           }
       </script>
   </telerik:RadCodeBlock>

 

So it would be possible to get the manager from the javascript code on the client on the content page, however this brings up the crux of the prolem:

1.  Will the RadAjaxManager1_AjaxRequest event be fired on the master page and have to be handled on the master page code behind?
That would mean that all Ajax requests initiated through client-side script throughout the application - I'm using this pattern all over the place - would have to be handled in a single function on the master page would you then have all the grid data-loading functions replicated in the master page.?..  Can you use delegate functions here?  do you have an example?

2.  If indeed the RadAjaxManager1_AjaxRequest resides in the code behind of the master page, how will it be able to access controls that are on the content page, and be able to compile.  Would all content page controls that are referenced from within RadAjaxManager1_AjaxRequest on the master page need to be addressed with FindControl and casting?

3.  Obviously maintaining the rad Ajax Manager configuration in the markup of the master page would become unmanageable for a large application.  Should I then programmatically configure the master page Ajax Manager from the content page code behind a rather than in the markup?  Could you convert my AJAX Manager Configuration to code as an example?

Sorry this is a long one, this stuff gets pretty complex and I wanted to be specific.

Thanks!

Jonathan
Iana Tsolova
Telerik team
 answered on 03 Oct 2008
Narrow your results
Selected tags
Tags
+? more
Top users last month
Tien
Top achievements
Rank 1
Iron
Krasimir
Top achievements
Rank 3
Bronze
Iron
Iron
Cedar
Top achievements
Rank 1
Iron
Emil
Top achievements
Rank 1
Iron
Kyle Watson
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Tien
Top achievements
Rank 1
Iron
Krasimir
Top achievements
Rank 3
Bronze
Iron
Iron
Cedar
Top achievements
Rank 1
Iron
Emil
Top achievements
Rank 1
Iron
Kyle Watson
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?