Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
98 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
53 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
123 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
165 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
332 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
82 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
3 answers
173 views
Hi Admin,



I want to display

Pivot Data

with RadGrid control , i have gone through the link
http://demos.telerik.com/aspnet-ajax/grid/examples/programming/pivot/defaultcs.aspx

it helps me but i want some modification

like i dont want to bind grid with automatically generated columns
bcz i need some image fileds and hyperlink fileds and gridtemplate columns
so I want to work with atugeneratedcolumns set to false
and manually adding labels to itemtemplates.

Any help really appreciated (Need help with code)

Thanks
Radoslav
Telerik team
 answered on 15 Jul 2013
1 answer
162 views
HI,
 I am using Rad Editor in my project that I have created with VS2010.   As per my project requirement, I have a html table in radeditor and i want  no one can change the content of this table in design mode as well as in preview mode. 
I have tried to unselect to table on OnClientSelectionChange event of rad editor. But it work only in IE not in other browsers. please help me.
i have use this code.
<%@ Page Language="vb" AutoEventWireup="false" CodeBehind="demo.aspx.vb" Inherits="ComplianceTable.demo" %>

<%@ 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></title>
    <telerik:RadScriptBlock ID="scriptBlock" runat="server">
        <script type="text/javascript">
            function OnClientSelectionChange(editor, args) {
                editor.getSelection()._window.document.selection.empty();
            } 
        </script>
    </telerik:RadScriptBlock>
</head>
<body>
    <form id="form1" runat="server">
    <div>
        <telerik:RadScriptManager ID="ScriptManager1" runat="server" />
        <telerik:RadEditor runat="server" ID="RadEditor11" OnClientSelectionChange="OnClientSelectionChange"
            AllowScripts="true">
            <Content>
              
   <table style="width: 700px; margin-top: 20px; margin-left: 15px; border-top-color: rgb(37, 160, 218);
            border-right-color: rgb(37, 160, 218); border-top-width: 1px; border-right-width: 1px;
            border-top-style: solid; border-right-style: solid; float: left;" id="Table1"
            cellspacing="0" cellpadding="0">
            <tbody>
                <tr style="background-color: rgb(205, 242, 242);" >
                    <th>
                        <div contenteditable="true">
                            <b>Header0</b></div>
                    </th>
                    <th>
                        <div contenteditable="true">
                            <b>header1</b></div>
                    </th>
                    <th>
                        <div contenteditable="true">
                            <b>Header2</b></div>
                    </th>
                </tr>
                <tr>
                    <td >
                        <div contenteditable="true">
cell0
                        </div>
                    </td>
                    <td  >
                        <a contenteditable="true"  onclick="return true;" href="">http:// </a>
                    </td>
                    <td  >
                        <div contenteditable="true">
                          cell1</div>
                    </td>
                </tr>
                <tr >
                    <td >
                        <div contenteditable="true">
                         cell0
                       </div>
                    </td>
                    <td >
                        <a contenteditable="true" href="">http:// </a>
                    </td>
                    <td >
                        <div contenteditable="true">
                           cell1
                        </div>
                    </td>
                </tr>
            </tbody>
        </table>
            </Content>
        </telerik:RadEditor>
    </div>
    </form>
</body>
</html>


Ianko
Telerik team
 answered on 15 Jul 2013
0 answers
162 views
Hi,

We are looking to use Imperva as a CDN and in testing, it is flagging up XSS issues with codetemplates.xml

Looking in Codetemplates.XML, there are references sucha as {0}, {1} etc  which are triggering the Imperva XSS attack analysis.


Is there anything we can do to circumvent this ?  (using 2010 Rad Ajax)

Is there a risk in removing or commenting out the {0} etc?

Regards
Paul

Paul Buxton
Top achievements
Rank 1
 asked on 15 Jul 2013
1 answer
44 views

Hello,

I'm using telerik Controls, I'm getting this error on vs2010 debugger on any ajax request (if I publish the webapplication to my web server it works normaly)

JavaScript runtime error: Sys.WebForms.PageRequestManagerParserErrorException: The message received from the server could not be parsed.

Princy
Top achievements
Rank 2
 answered on 15 Jul 2013
Narrow your results
Selected tags
Tags
+? more
Top users last month
Chester
Top achievements
Rank 1
Iron
Simon
Top achievements
Rank 1
Iron
Douglas
Top achievements
Rank 2
Iron
Iron
SUNIL
Top achievements
Rank 3
Iron
Iron
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Chester
Top achievements
Rank 1
Iron
Simon
Top achievements
Rank 1
Iron
Douglas
Top achievements
Rank 2
Iron
Iron
SUNIL
Top achievements
Rank 3
Iron
Iron
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?