Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
70 views
Hi,
I have a grid in my web page with GridAttachmentColumn which displays download file link. When user click on link to download the file from server. I writes byte stream in response so that It shows download dialogue in user's browser. It works fine without using loading panel, but with loading panel enabled when I try to download a file clicking the download link of GridAttachmentColumn, it shows strange behavior with some javascript message "Sys.WebForms.PageRequestManagerParserErrorException: The message received from the server could not be parsed. Common causes for this error are when the response is modified by calls to Response.Write(), response filters, HttpModules, or server trace is enabled Details: Error parsing near '". How can I disable loading panel behavior when user try to download file only and still works for other grid operations like insert/edit/delete and paging operation.
Ohh yes, I know we can not write file to response while sending Ajax request or response.

Thanks

Tejas
Pavlina
Telerik team
 answered on 25 Apr 2011
1 answer
353 views
Hello,

As do many, I use a RadListBox inside of a RadComboBox's ItemTemplate to implement multiple selections.

One thing I want to provide is a maximum height of the RadListBox, similar to a RadComboBox.

Purpose:
For site-wide consistency, at max the RadListBox can be 170px high.  If there are fewer rows than fill up the space, then the height should be automatic.

I'm not setting a height on the RadComboBox and/or RadListBox so that they render in their unaltered size.  In the RadComboBox OnClientOpened event, I capture the size of the rcbSlide, which is the only element that I see that holds the actual height of the dropdown when it's expanded.  If the value is greater than 170px then we need to limit the height by resizing the RadListBox and the rcbSlide.  (I tried OnClientOpening, but the height hasn't been set at that point...)

Here is the JavaScript that I have so far.   At this point it's setting the height of the dropdown, but the overflow scrollbars do not appear on the RadListBox as I'd expect...

function multiSelect_RadComboBox_Opened(sender) {
    var height = sender.get_dropDownElement().parentElement.style.height;
    if (height.length > 0) {
        height = height.substring(0, height.length - 2);
        if (height > 170) {
            sender.get_dropDownElement().parentElement.style.height = '170px';
            var items = sender.get_items();
            items.getItem(0).findControl('rlbItems').get_element().style.height = '170px';
        }
    }
}

Thoughts??
Thanks!
Thad



Thad
Top achievements
Rank 2
 answered on 25 Apr 2011
1 answer
56 views
I use the

RadDatePicker  ( RadControls for ASP.NET AJAX Q3 2010)
When i enter the date 25/4/2008  not accept this date and convert it automatically to 24/4/2008
When i select the date 25/4/2008 from the calender from the button of the control not accept the date and write 24/4/2008

the date format (dd/MM/yyyy)
please, help me

Pavlina
Telerik team
 answered on 25 Apr 2011
1 answer
284 views

 

Hi,

 

 

I have a requirement to generate the RadGrid Columns at runtime. Also the data supplied to the grid as the Data Source would be the result of a transpose.

 

            I have tables in my database that store the definitions for the structure of the grid. The tables define the number of columns, type of column to be used, header text, tooltip, group that the column belongs to, the auto generated id of the column, etc as shown in the attached image Post1.png.

 

 We might have additional add-ons to the set of properties of the table that would be stored later. For example an additional column called PARENT_COLUMN may be added to the above schema as shown in the attached image Post2.png.

 

 

 

. Based on the definition, columns would need to be constructed into a RadGrid whose tag is statically defined in the .aspx.

Example, the following would be placed on the aspx page.

<telerik:RadGrid ID=’grdDynamic’ runat=’server’ />

 

The grid has to support inline editing. Also the headers have to support grouping, i.e. rowspan and colspan.

The following structure is an example.

Name

Address

Add. Info

Phone Number

City

 

 

 

 



            The data which is added into the grid, displayed into the grid is transposed. I have a few tables with the same structure except for where the name of the primary representative columns in the grid changes.

For instance in the below displayed grid the CHECKLIST_ITEM_ID is the primary representative. In this case this might be autogenerated. We may also have a column , say ‘XYZ’, which might be a FOREIGN KEY to another table.

‘XYZ’ may not be autogenerated..

 

 The tables contain the reference column which points to the relative record to which the current item belongs to. For example, we have a table which stores all the grid structures defined as templates. TEMPLATE_ID represents each structure defined.Refer to image Post3.png

 

We have another table that contains the structure of the grid. In this table TEMPLATE_FIELD_ID is the primary key whereas TEMPLATE_ID is the foreign key that defines the TEMPLATE or grid to which these columns belong to.Refer to image Post4.png

 

The data for this particular template is stored in a third table which stores the TEMPLATE_FIELD_ID, i.e. the ID of the column in the database, the ROW_NUM , which represents the row number of the item in the table, the Item, which stores the value entered by the user in the cell represented by the ROW_NUM, TEMPLATE_FIELD_ID,CHECKLIST_ID.

 

The CHECKLIST_ID represents the checklist that is created using the template as start.

Multiple checklists can be created using one TEMPLATE.Refer to image Post5.png

 

 

 

 

 


The code should handle the transpose of the data to get the data in the required format.

Also, it should create the grid at runtime.

 

I would like the programmer to have minimum effort to get the work done as it is to be done in multiple places.

Also, it would be better if you provided us with a custom Grid Control that would take very minimum parameters to get the work done. The code should also be easy to maintain as in the long run we are expecting to have more changes to the structure. Also it should provide flexibility to provide join querys . On the insert/update/delete command it should either perform the required actions automatically or provide the updated values in the untransposed format in a simple manner so that the developer can perform the required operations.

 

Name

Address

Add. Info

Phone Number

City

John

Avenue Park

1800-160-144

Galaba Galaba

 

 

 

 


Thanks in Advance.

 

Pavlina
Telerik team
 answered on 25 Apr 2011
1 answer
50 views
Hi all,
I've building a doucment management system, so i"ve got a menu RadMenu on the top, a RadTreeVew on the left and AsP list view on the right

The listview has Radbuttons for each file and folder and via Javascript I've got the click and Double click events to fire.

On the double click I make a AJAX REquest using the code below passing in a string arguement and reload the ListView. 

function InitiateAjaxRequest(RadAjaxManagerID,arguments) {
var ajaxManager = $find(RadAjaxManagerID);
ajaxManager.ajaxRequest(arguments);
}

After the AJAX Request completes all Telerik scripts stop working,the RadTree,RadMenu and RadComboBox top working.

any ideas?

 

Mira
Telerik team
 answered on 25 Apr 2011
1 answer
60 views
Hi,
We puchased a license for RadControls for ASP.NET AJAX recently. Does that imply that all previous versions of the product are also licensed to us in the same.

Thanks.
Rumen
Telerik team
 answered on 25 Apr 2011
2 answers
148 views
Hi there,

I am having some difficulties getting the functionality I desired using the RadMenu widget.

Here is the functionality I would like to achieve:
1) I have a repeater for each "row" of information
2) Each row has 1 menu item with 6 sub menu items
3) Clicking the 1 menu item, it expands the 6 sub menu items
4) When selecting a sub menu item, it validates some input and calls a server side method.  If the validation fails, it stays on the page.

Pretty simple, however, I am running into the case where I have everything mentioned but I can click and expand multiple menu items.

//to not expand on mouse over
function
OnClientMouseOverHandler(sender, eventArgs) {
    if (eventArgs.get_item().get_text() == 'Add') {
        sender.set_clicked(false);
    }
}

//to close the menu only if a sub menu is clicked
function
OnClientItemClickedHandler(sender, eventArgs) {
     var item = eventArgs.get_item();
     if (item.get_text() == 'Add') {
         eventArgs.set_cancel(true);
     } else {
        sender.close();
     }
}
 
//if sub menu is clicked, validate the field or if menu is clicked, expand the sub menu
//if input is invalid or menu is clicked, set cancel to stop a postback
function
OnClientItemClickingHandler(sender, eventArgs) {
    var item = eventArgs.get_item();
    if (item.get_text() != 'Add') {
        ResetQuantityStyles(sender._element);
        var parent = sender._element.parentNode;
 
        while (parent.nodeName != 'TR') {
            parent = parent.parentNode;
        }
        var list = parent.getElementsByTagName('input');
        var i = 0;
        for (i = 0; i < list.length; i++) {
            var txtQuantity = list[i];
            if (txtQuantity.id.indexOf('txtQuantity') > -1) {
                if (txtQuantity.value == '') {
                    txtQuantity.style.background = 'pink';
                    sender.close();
                    eventArgs.set_cancel(true);
                }
                break;
            }
        }
    }
    else
    {
        item.open();
        eventArgs.set_cancel(true);
    }
}
 
function ResetQuantityStyles(element) {
    var parent = element.parentNode;
 
    while (parent.nodeName != 'TABLE') {
        parent = parent.parentNode;
    }
    var list = parent.getElementsByTagName('input');
    var i = 0;
    for (i = 0; i < list.length; i++) {
        var txtQuantity = list[i];
        if (txtQuantity.id.indexOf('txtQuantity') > -1) {
            txtQuantity.style.background = '';
        }
    }
}

And my tag looks like this

<telerik:RadMenu runat="server" ID="rmAddIngredient" Visible="false"
    OnClientItemClicking="OnClientItemClickingHandler"
    OnClientMouseOver="OnClientMouseOverHandler"
    OnClientItemClicked="OnClientItemClickedHandler"
    OnItemClick="rmAddIngredient_Click" ClickToOpen="true">
    <Items>
        <telerik:RadMenuItem Text="Add">
            <Items>
                <telerik:RadMenuItem runat="server" Text="Breakfast" Value="1"></telerik:RadMenuItem>
                <telerik:RadMenuItem runat="server" Text="Morning Snack" Value="2"></telerik:RadMenuItem>
                <telerik:RadMenuItem runat="server" Text="Lunch" Value="3"></telerik:RadMenuItem>
                <telerik:RadMenuItem runat="server" Text="Afternoon Snack" Value="4"></telerik:RadMenuItem>
                <telerik:RadMenuItem runat="server" Text="Dinner" Value="5"></telerik:RadMenuItem>
                <telerik:RadMenuItem runat="server" Text="Evening Snack" Value="6"></telerik:RadMenuItem>
            </Items>
        </telerik:RadMenuItem>
    </Items>
</telerik:RadMenu>
John
Top achievements
Rank 1
 answered on 25 Apr 2011
1 answer
29 views
hi

Based on your example http://demos.telerik.com/aspnet-ajax/scheduler/examples/resourceavailability/defaultcs.aspx

My users are login based on username and password, and their username is assign to a session variable.

How do i use this session variable in the resourcetype instead of using DataSourceID? Thanks

 <ResourceTypes>
             <telerik:ResourceType KeyField="ID" Name="User" TextField="UserName" ForeignKeyField="UserID"
                 DataSourceID="UsersDataSource" />
</ResourceTypes>
Peter
Telerik team
 answered on 25 Apr 2011
1 answer
93 views
Hi,
I want to make my dialogs (link manager ,....) right to left as is here:
http://demos.telerik.com/aspnet-ajax/editor/examples/righttoleft/defaultcs.aspx

It says refer to "RTL/RadEditor_Dialogs_RTL.css" and it doesn't share this file.
How can I get and use it?
I haven't installed telerik, I  just refer to it's dll, so it's not on my computer
Rumen
Telerik team
 answered on 25 Apr 2011
1 answer
118 views
Hi,
How can I localize rad Editor dialog windows (Hyper-link Manager and Find & Replace)?
I want to change labels (Target, Text, URL, Find, Next ...) to Persian.
Rumen
Telerik team
 answered on 25 Apr 2011
Narrow your results
Selected tags
Tags
+? more
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?