Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
164 views
hi everybody
i need to run this server code in client side.
protected void RadGrid1_ItemCommand(object sender, GridCommandEventArgs e)
{
    if (e.Item is GridDataItem)
    {
        GridDataItem data = (GridDataItem)e.Item;
        if (e.CommandName == "Command1")
        {
            data["OrderID"].Text = "300";
        }
        else if (e.CommandName == "Command2")
        {
            data["OrderID"].Text = "600";
        }
    }
}
can anybody help me to convert this code to java script?
Andrey
Telerik team
 answered on 15 Jul 2013
3 answers
960 views
Hi,

   Is it possible to display the RadAjaxLoadingPanel over a RadAjaxPanel (or ASP Panel) using javascript even if you won't have any server event?
   Say, I have several user controls that I load within RadTabStrip. Each user control has their own javascript function that kicks a webservice call. What I want to accomplish is, the moment the javascript initiates the webservice call until the webservice returns a result, I want to display the RadAjaxPanel so the user will know that the transaction is being executed. At the same time, they won't be able to click on anything inside the tab until the webservice returns and prompt that the transaction was successfully completed. Is the use of RadAjaxLoadingPanel possible fo this scenario? Or is there any work around that we can do for this?

Thanks in advance!


Regards,
Arthur
Maria Ilieva
Telerik team
 answered on 15 Jul 2013
1 answer
148 views
Hello,

As you can see in the demo:
http://demos.telerik.com/aspnet-ajax/treelist/examples/client/resizing/defaultcs.aspx

When you size one column, the other columns are also adjusted... Even when I state a fixed width (40px ie) and state that the column is not sizeable, and state the min and max size at 40px, it still gets sized when i size an other column... how can I make a column stay 40px??

Erik
Deyan Enchev
Telerik team
 answered on 15 Jul 2013
1 answer
197 views
Hello to all,

Me and my team are very "fresh" in working with Telerik Dev Tools and we are exploring its potencials to see how can we use them in the platform we are developing. We are very excited with the available controls but we have some concerns on the correct usage of the controls and which are the best practices to use them.

Today's doubt is regarding the RadAjaxManager best usage.
Our web platform is using Master Pages to have similar GUI and implement many global functions. Also we have different web controls that can be reused on different pages. These controls can make partial updates and like that needed to be "ajaxified" for Rad Ajax Manager, which is a control we want to use to have more flexibility on the Partial Updates and on the controls that trigger these Updates.
With some quick readings we caught and resolve some issues regarding the usage of ascx with Rad Ajax Manager and the best practice is to register the control programatically. We created a simple method on the Page that receives a Control and register it on the Rad Ajax Manager updating some Panels that are on the same Page. We implemented this approach (see code bellow) with good results.
//this method will be available on each page
public void AjaxifyControl(Control ctrl)
{
    //Add the necessary AJAX setting programmatically
    RadAjaxManager1.AjaxSettings.AddAjaxSetting(ctrl, Panel1);
    RadAjaxManager1.AjaxSettings.AddAjaxSetting(ctrl, Panel2);
    RadAjaxManager1.AjaxSettings.AddAjaxSetting(ctrl, Panel3);
}

But now we have a dillema... With the massive usage of the Telerik Controls we have a "Software Design doubt" about where to put the Rad Ajax Manager?
  1. On the Master Page and like that we only allow to programatically register all the "Ajaxified Controls" with all "Updatable Controls", leaving the register decision for each page, but taking the risk that could be many pages without really needing the RadAjaxManager. We think allowing this by making available a method similar to the one i show bellow: 
    //this method will be available on the Master Page.
    public void RegisterAjaxSetting(Control ajaxifiedCtrl, Control updatedCtrl)
    {
        RadAjaxManager1.AjaxSettings.AddAjaxSetting(ctrl, updatedCtrl);
    }
  2. On all needed Pages (we have this approach right now) having a mix between Markup registered controls (the ones that can be registered thru markup -> basic Page controls) and Programatically registered controls (the ones that exists on the Web User Controls ans need to be added by code), creating a RadAjaxManager on each page that needs a Rad Ajax Manager.

We want to know if exists some documentation that can help us with that or simply which is the best practice that you guys advise.

Many thanks in advance.
Hugo Salgado
Maria Ilieva
Telerik team
 answered on 15 Jul 2013
1 answer
115 views
Hi,

I'm having issues sorting a Grid groupped by default.

The thing is that I have a Grid groupped by Department (The grid displays all users within the company). Inside that grouping I want to apply a custom sort order (I have a numeric Order field) but it does not happen.

If I'm not groupping by default the users appear correctly, but when I apply a groupby expression

<GroupByExpressions>
                <telerik:GridGroupByExpression>
                    <SelectFields>
                        <telerik:GridGroupByField FieldAlias="Departamento" FieldName="Departamento" FormatString="{0}"> </telerik:GridGroupByField>
                    </SelectFields>
                    <GroupByFields>
                        <telerik:GridGroupByField FieldName="Departamento" SortOrder="Ascending"></telerik:GridGroupByField>
                    </GroupByFields>
                </telerik:GridGroupByExpression>
            </GroupByExpressions>

it applies an unkown order, my datasource is an SQL and i've tried to apply my custom sort using the "Order By" clause in the "Select".

What I'm doing wrong?
Maria Ilieva
Telerik team
 answered on 15 Jul 2013
1 answer
59 views
I use a RadGrid for displaying, inserting, deleting and updating rows.
I want to have any input field for an image path, that is selected via the standalone ImageManager.
In display mode just the path should be shown without the button for the ImageManager. In update mode the path already saved in the database should be displayed.
I found this article:
http://www.telerik.com/support/kb/aspnet-ajax/editor/using-the-image-and-document-managers-outside-radeditor.aspx

That is working pretty good outside the grid. However how can I realize such a textbox and an upload button inside a RadGrid item in edit / insert mode? Anyhow I have to register the JavaScript event handler, but how to get the ClientIDs for building the correct JS?
Kostadin
Telerik team
 answered on 15 Jul 2013
2 answers
131 views
Hello,

I am having a problem getting RadAjaxManager_AjaxRequest to update a control on the page.  Here is my scenario...

I have a page with RadAjaxManager declared as below...

<telerik:RadAjaxManager ID="ramMain" runat="server" OnAjaxRequest="RamMain_AjaxRequest">

I have a standard asp:Repeater bound to a datasource server side, it is wrapped in an asp:Panel and it is laid out like so..

<div runat="server" id="caseStudyDisplayPanel" class="span6">
<asp:Repeater ID="rptrCaseStudies" runat="server" ClientIDMode="Static">
<HeaderTemplate>
<ul id="List">
</HeaderTemplate>
<ItemTemplate>
<li>
<div><%# DataBinder.Eval(Container.DataItem, "Name") %></div>
</li>
</ItemTemplate>
<FooterTemplate>
</ul>
</FooterTemplate>
</asp:Repeater>
</div>

Above the repeater I have a "Add New" button which pops a RadWindow, Containing a UserControl with a RadGrid.  Each Row in the popup grid has a "Select" button, which triggers the RowSelected event.  On RowSelected I do some small javascript functions then hand off to the ajaxManager.ajaxRequest request via javascript passing over the info from the selected row.  So far so good, everything works to this point...the server side method (RamMain_AjaxRequest) gets fired and runs perfectly.  The last thing I do in the request is add my newly selected row to the datasource, and rebind the repeater.  On rebind (if I add a break point) I see exactly what I am expecting with the newly added item included in the datasource collection.  Problem is the screen never updates.  If I save at this point, and come back the item is there, so I know it is getting added, just not displayed.

What should be added to the AjaxSetting to accomplish this?  It seems I have tried every combination of controls and cannot see the update.  Here is my current seetings (which aren't working)

<telerik:AjaxSetting AjaxControlID="ramMain">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="caseStudiesWrapper" />
                    <telerik:AjaxUpdatedControl ControlID="rptrCaseStudies" />
                </UpdatedControls>
            </telerik:AjaxSetting>   
<telerik:AjaxSetting AjaxControlID="caseStudiesWrapper">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="caseStudiesWrapper" />
                </UpdatedControls>
            </telerik:AjaxSetting>
<telerik:AjaxSetting AjaxControlID="rptrCaseStudies">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="rptrCaseStudies" />
                </UpdatedControls>
            </telerik:AjaxSetting>

Thanks So Much!!
Konstantin Dikov
Telerik team
 answered on 15 Jul 2013
3 answers
189 views
I am trying to get to a control in the edittemplate on postback but EditItems[0] returns null.
I check MasterTableView.IsInserted and it shows true.
The grid is part of a user control that opens a new window to enable entering of a new item in order to add it to the combobox in the edit form if it does not exist.
If I skip past the code to update the combobox the grid displays with the insert form open.
The program flow is:
Main page has a grid with a user control for editing, that control will open a window with a control (page 1) containing a grid in order to add a new item to the main page combobox, the return from (page 1) will populate the combo as expected.
(page 1) can also open a window (page 2) with a user control containing a grid to add an item to the combobox on (page 1)
When (page 2) return to (page 1) the grid on (page 1) is the one that returns null for EditItems[0] but shows the grid in insert mode.
Below is the code behind:
if (Request["__EVENTTARGET"] == "wndEquipmentRental")
{
    if (Request["__EVENTARGUMENT"] != "undefined")
    {
        if (RadGrid1.MasterTableView.IsItemInserted)
        {
            GridEditFormInsertItem insItm = RadGrid1.EditItems[0] as GridEditFormInsertItem;
        }
 
        else
        {
            GridEditFormItem editItm = RadGrid1.EditItems[0] as GridEditFormItem;
        }
    }
}

Kostadin
Telerik team
 answered on 15 Jul 2013
6 answers
366 views
I have a aspx page that I open in a radwindow.  On this page is a button that when clicked updates some other elements on the page, and should change the Page.Title which should then be reflected in the radwindow caption.

This works fine & dandy, unless I ajaxify the button. If I use the ajaxmanager to update the other controls when the button is pressed, they update quickly, and the Page.Title does change, but it's not updated in the radwindow caption.

 I'd prefer to use ajax to update the few items on the page, rather than a full postback.  Anybody out there have a solution ?

ver.  2010.1.519.35
Marin Bratanov
Telerik team
 answered on 15 Jul 2013
1 answer
93 views
Dear Telerik Team,

I'm using your RadTileList control on one of my ASP.NET C# projects. This is a very nice addition to the suite, but I feel it is still very "raw". 

I would appreciate your inputs on the following:

- Add a background image to the TileList, and then somehow attach it to the scrolling events, so that I can create a nice parallax effect when the user scrolls through the TileList.
- How to increse the scroll velocity ? I haven't found any property.
- How to add a title to each TileGroup ? This object only has the collection of Tiles.

Thank you in advance for your answers,
Keep up the good work
Marin Bratanov
Telerik team
 answered on 15 Jul 2013
Narrow your results
Selected tags
Tags
+? more
Top users last month
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Dean
Top achievements
Rank 1
Leland
Top achievements
Rank 2
Iron
Iron
Iron
Emil
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Dean
Top achievements
Rank 1
Leland
Top achievements
Rank 2
Iron
Iron
Iron
Emil
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?