Telerik Forums
UI for ASP.NET AJAX Forum
4 answers
243 views
Hi,

I have a radupload control on the form. Currently if i want to upload multiple files, I have to use the Add button which creates a new file Input control.  What I want to implement is similar to what you have for attaching files in the forums.


Is it possible with RadUpload control?

thanks

Alaa Majzoub
Top achievements
Rank 2
 answered on 24 Oct 2009
5 answers
851 views
Hi,

During a penetration testing of our application, there has been a critical issue that has been identified. This issue is related to the RadScriptManager that is used in some pages. RadScriptManager uses a HIDDENFIELD to do all its Ajax Callbacks which has been identified as a potential Cross Site Scripting issue.

Can someone suggest how do we overcome this issue.

Here is the sample
Attack Request: POST /Test/Pages/SelectSSRSReports.aspx HTTP/1.1
Accept: */*
Accept-Language: en-gb
Referer: https://yahooi.co.uk/Test/Pages/SelectSSRSReports.aspx
x-microsoftajax: Delta=true
Content-Type: application/x-www-form-urlencoded
Cache-Control: no-cache
UA-CPU: x86
Accept-Encoding: gzip, deflate
User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322)
Host: yahooi
Content-Length: 84361
Pragma: no-cache
Memo: 16:Auditor.SendAsyncronousRequest:Attack(CID:(null):AS:2,EID:1354e211-9d7d-4cc1-80e6-
4de3fd128002,ST:AuditAttack,AT:PostSubParamInjection,APD:ctl00_ContentPlaceHolder1_SelectSSRSR
eportsUC_RadScriptManager1_HiddenField,I:
(1,2),R:False,SM:2,SID:6D5FE98086FFBD5B9C4EAC6B578D3355,PSID:805159012103CD6481F7371358
8F96DC)
Connection: Keep-Alive
Cookie: ASP.NET_SessionId=hv3lku55kgc3xrr2dwuhhovm;CustomCookie=cookie46767ZX6C1A0EE8F4EC44189A5FD7BEA43E8944YC48D;
ASPSESSIONIDSQDTCBCS=AINPNDJDB
BHAHLAPMDIOHALB
ctl00$ContentPlaceHolder1$SelectSSRSReportsUC$RadScriptManager1=ctl00$ContentPlaceHolder1
$SelectSSRSReportsUC$ctl00$ContentPlaceHolder1$SelectSSRSReportsUC$treReportsPanel|ctl00
$ContentPlaceHolder1
$SelectSSRSReportsUC$treReports&ctl00_ContentPlaceHolder1_SelectSSRSReportsUC_RadScriptManag
er1_HiddenField=%3b%3bSystem.Web.Extensions%2c%20Version%3d1.0.61025.0%2c%20Culture%
3dneutral%3csCrIpT%3ealert(46781)%3c%2fsCrIpT%3e%2c%20PublicKeyToken%
3d31bf3856ad364e35%3aen-US%3a1f0f78f9-0731-4ae9-b308-56936732ccb8%3aea597d4b%
3ab25378d2%3bTelerik.Web.UI%2c%20Version%3d2009.1.402.20%2c%20Culture%3dneutral%2c%
20PublicKeyToken%3d121fae78165ba3d4%3aen-US%3ab30853f2-6f9f-496e-85c8-cca8f7f2e17c%
3a16e4e7cd%3a86526ba7%3af7645509%3a24ee1bba%3ae330518b%3a1e771326%3ac8618e41%
3aed16cbdc%3ae524c98b%3a58366029%3aaa288e2d%3ae4f8f289&__EVENTTARGET=ctl00%
24ContentPlaceHolder1%24SelectSSRSReportsUC%24treReports&__EVENTARGUMENT=%7b%
22sourceNodesIndices%22%3a%5b%220%3a0%3a0%22%5d%2c%22commandName%22%3a%
22NodeDropOnHtmlElement%22%2c%22htmlElementId%22%3a%
22ctl00_ContentPlaceHolder1_SelectSSRSReportsUC_txtTabularReportURL%22%7d&__VIEWSTATE=%
2FwEPDwUKMTk3MzYyNTQ2NQ9kFgJmD2QWAgIDD2QWBgIBDw8WAh4XRW5hYmxlQWpheFNraW5SZ
W5kZXJpbmdoZGQCAw9kFgICAQ8UKwACFCsAAg8WCh4JQmFja0NvbG9yCTMAmf8eBEZsb3cLKXBUZWx
lcmlrLldlYi5VSS5JdGVtRmxvdywgVGVsZXJpay5XZWIuVUksIFZlcnNpb249MjAwOS4xLjQwMi4yMCwgQ3Vs
dHVyZT1uZXV0cmFsLCBQdWJsaWNLZXlUb2tlbj0xMjFmYWU3ODE2NWJhM2Q0AR4JRm9udF9TaXplKCoi
U3lzdGVtLldlYi5VSS5XZWJDb250cm9scy5Gb250VW5pdAVTbWFsbB8AaB4EXyF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9QYWdlcy9Q
cml2aWxlZGdlU2NyZWVuLmFzcHhkZAIDDw8WBB8GBQ9VU0VSIE1BTkFHRU1FTlQfBwUdfi9QYWdlcy9TZ
WxlY3RQcmltZVVzZXJzLmFzcHhkZAIEDw8WBB8GBRBHUk9VUCBNQU5BR0VNRU5UHwcFHn4vUGFnZXM
vU2VsZWN0UHJpbWVHcm91cHMuYXNweGRkAgUPDxYEHwYFEVJFUE9SVCBNQU5BR0VNRU5UHwcFHn4
vUGFnZXMvU2VsZWN0U1NSU1JlcG9ydHMuYXNweGRkAgUPZBYCAgEPZBYIAgMPDxYCHwBoZGQCCQ8U
KwACFCsAAhQrAAIPFgIfAGhkEBYBZhYBFCsAAg8WBh8GBQ1QUklNRSBSZXBvcnRzHglBbGxvd0Ryb3BoH
glBbGxvd0RyYWdoZBAWAmYCARYCFCsAAg8WAh8GBRpOYXRpb25hbCBJbmRpY2F0b3IgUmVwb3J0c2Q
QFjpmAgECAgIDAgQCBQIGAgcCCAIJAgoCCwIMAg0CDgIPAhACEQISAhMCFAIVAhYCFwIYAhkCGgIbAhw
CHQIeAh8CIAIhAiICIwIkAiUCJgInAigCKQIqAisCLAItAi4CLwIwAjECMgIzAjQCNQI2AjcCOAI5FjoUKwACDx
YIH
Attack Response: HTTP/1.1 200 OK
Cache-Control: private
Content-Length: 148
Content-Type: text/html; charset=utf-8
Date: Sat, 10 Oct 2009 14:56:00 GMT
133|error|500|The name 'neutral<sCrIpT>alert(46781)</sCrIpT>' contains characters that are not
valid for a Culture or Region.
Parameter name: name|
T. Tsonev
Telerik team
 answered on 24 Oct 2009
4 answers
105 views
Hi,

 Am using radschedular.i have provided the right click options for radschedular.When i click the context menu, i am opening the raddock window.It is working well  in IE .but the raddock are not opening while clicking context menus  in FF and chrome.It is just loading on.

Sometimes it takes more time to opening the window. most of the times, it is loading only, not shown.

How to reduce the loading time in the browsers like chrome and FF?

Thanks for any points

sabarishbabu
Top achievements
Rank 1
 answered on 24 Oct 2009
2 answers
120 views
Hi,

I have a multilevel radgrid in my web page. When a user drills in and clicks on a button inside the radgrid, he is taken to a different page, where he can see further details and make changes. On this page, I have a back button, enabling the user to go back to the page with the original grid. I want to restore the radgrid to the state it was in when the button was clicked so the user knows what items he already visited. How do I do this ?

I see I can get the selectedindexes as a gridindexcollection but how do I apply this gridindexcollection to the radgrid when the page is revisited?

Thanks,
Pavan.
Schlurk
Top achievements
Rank 2
 answered on 23 Oct 2009
1 answer
154 views
Hi Telerik,

I applied the Vista skin in my RadGrid, but I am unable to get the same Rich look and fill of RadGrid that was present in your demo site. Can you please tell me what was the problem.

I copy all your code and paste inside my application also, but still I am unable to get same look and fill.

So please suggest me.

This is very urgent.

Thanks,
Monalisa
Schlurk
Top achievements
Rank 2
 answered on 23 Oct 2009
1 answer
399 views
I have a RadGrid that I am using to get a couple of values from a stored procedure. There are always either no rows returned or one row returned. I need to get the values of those 2 cells IF there was a row returned and use them in a server-side C# method that was kicked off by another control. I have tried a bunch of different constructs and none of them works. The RadGrid is UserInfo and the 2 columns are UType and UKey. Both of the values are strings. Oh, the RadGrid is NOT visible. So how do I get the values back from the client side?
Alternately if I could find an example of how to call a stored proc from server side or client side and get the returned values I could do away with the RadGrid but I can't seem to get that to work either.

Thanks,

Joe B
Schlurk
Top achievements
Rank 2
 answered on 23 Oct 2009
2 answers
118 views
hi,

we are using rad grid in our application.We tested in firefox.we found that the grid is not rendering any records in mozilla.but it shows the number of records in the footer of the grid.
we need compatability in both mozilla and IE.

We found that applying css class to radgrid did not apply the required style completely.

So we took the css classes from telerik folder and overrided them in our css file like this

.RadGrid_ourCustomSkin,

.RadGrid_ourCustomSkin .rgMasterTable,

.RadGrid_ourCustomSkin .rgDetailTable,

.RadGrid_ourCustomSkin .rgGroupPanel table,

.RadGrid_ourCustomSkin .rgCommandRow table,

.RadGrid_ourCustomSkin .rgEditForm table,

.GridToolTip_ourCustomSkin

{

    font:12px/16px "segoe ui",arial,sans-serif;

}

please refer the attachment.
need help.

Regards,
Bharathwajan
Greg
Top achievements
Rank 2
 answered on 23 Oct 2009
7 answers
341 views

In my szenario i have a table. Inside this table there is an RadToolBar with two RadComboBoxes.

My problem is the handling of the Related ComboBoxes, after a postback. After the postback the second RadComboBox lost there

Datasource. What I try to do is to set second RadComboBox clientside in the pageLoad Function.

Depending of the value in the first RadComboBox (that i got in the pageLoad function) i try to refresh the datasource for the second RadComboBox.

Here is my code snippet:

    <script type="text/javascript">         
        //global variables for the countries and cities comboboxes  
        var RadGrid1;  
        var WTypesCombo;  
        var CDecisonCombo;  
        
        //------------------------------------------------------------------------  
        function GetGridObject(sender, eventArgs) {  
            RadGrid1 = sender;  
        }  
 
        //------------------------------------------------------------------------  
        function pageLoad() {  
            // initialize the global variables  
            // in this event all client objects   
            // are already created and initialized  
            WTypesCombo                 = $find('<%=rdtbWl.FindItemByText("rtbWTypes").FindControl("rcbWTypes").ClientID %>');  
            CDecisonCombo               = $find('<%=rdtbWl.FindItemByText("rtbCDecision").FindControl("rcbCDecision").ClientID %>');  
         
            //Get the selected type  
            //this will only triggert if a submit event exists  
            var SelectedIndex = document.getElementById("<%= SelectedWType.ClientID %>").value;  
              
            if (SelectedIndex != "0") {  
                //HERE REFRESH THE SECOND RADCOMBOBOX  
                CDecisonCombo.requestItems(SelectedIndex.get_text(), false);  
            }  
 
        }  
        //------------------------------------------------------------------------  
        function OnClientSelectedIndexChanged(sender, eventArgs) {  
              
            var item = eventArgs.get_item();  
            //the first item is always the item to show all rows  
            //we can not use a value because all values are identical. Only text are unique  
            if (item.get_index() == "0") {  
                //Set worklist type in hidden field to store in session, when the submit event is fired  
                document.getElementById("<%= SelectedWType.ClientID %>").value = item.get_index();  
            }  
            else {  
                //Set worklist type in hidden field to store in session, when the submit event is fired  
                document.getElementById("<%= SelectedWType.ClientID %>").value = item.get_text();  
            }  
              
            CDecisonCombo.set_text("Loading...");  
              
            // if a Worklisttyp is selected  
            if (item.get_index() > 0) {  
                // this will fire the ItemsRequested event of the  
                // combobox passing the WtypID as a parameter  
                CDecisonCombo.requestItems(item.get_text(), false);  
            }  
            else {  
                // the -Select a continent- item was chosen  
                CDecisonCombo.set_text(" ");  
                CDecisonCombo.clearItems();  
            }  
        }  
 
        //------------------------------------------------------------------------  
        function ItemsLoaded(combo, eventArqs) {  
              
            if (combo.get_items().get_count() > 0) {  
                // pre-select the first item  
                combo.set_text(combo.get_items().getItem(0).get_text());  
                combo.get_items().getItem(0).highlight();  
            }  
        }  
        //------------------------------------------------------------------------  
 
    </script> 
 
</telerik:RadCodeBlock> 
 
<table cellpadding="0" cellspacing="0" border="0" width="100%">  
    <tr> 
        <td> 
            <telerik:RadToolBar ID="rdtbWl" runat="server"   
                Style="display: block; float: none" Visible="true" 
                Width="100%" OnClientButtonClicked="OnClientButtonClicking"   
                OnButtonClick="rdtbWl_ButtonClick" 
                OnClientMouseOver="clientMouseOver" 
                OnClientMouseOut="clientMouseOut" 
                meta:resourcekey="rdtbWlResource1">  
                <CollapseAnimation Type="OutQuint" Duration="200"></CollapseAnimation> 
                <Items> 
                    <telerik:RadToolBarButton Value="rtbWTypes" Text="rtbWTypes">  
                        <ItemTemplate> 
                            <telerik:RadComboBox ID="rcbWTypes"   
                                                    runat="server"   
                                                    CssClass="DefaultText" 
                                                    OnClientSelectedIndexChanged="OnClientSelectedIndexChanged" 
                                                    DataTextField="Shorttext" 
                                                    DataValueField="Shorttext" 
                                                    HighlightTemplatedItems="True">  
                                <CollapseAnimation Duration="200" Type="OutQuint" /> 
                            </telerik:RadComboBox> 
                        </ItemTemplate> 
                    </telerik:RadToolBarButton> 
                    <telerik:RadToolBarButton Value="rtbCDecision" Text="rtbCDecision">  
                        <ItemTemplate> 
                            <telerik:RadComboBox ID="rcbCDecision"   
                                                    runat="server"   
                                                    CssClass="DefaultText"   
                                                    OnClientItemsRequested="ItemsLoaded" 
                                                    OnItemsRequested="rcbCDecision_ItemsRequested">  
                                <CollapseAnimation Duration="200" Type="OutQuint" /> 
                            </telerik:RadComboBox> 
                        </ItemTemplate>      
                    </telerik:RadToolBarButton> 
                    <telerik:RadToolBarButton Text="rtbColumnSetDecision"   
                        Value="rtbColumnSetDecision"   
                        runat="server" PostBack="false"   
                        meta:resourcekey="RadToolBarButtonResource4" > 
                    </telerik:RadToolBarButton> 
                    <telerik:RadToolBarButton Text="rtbCDecisionExecute" 
                        Value="rtbCDecisionExecute"   
                        runat="server" PostBack="true">  
                    </telerik:RadToolBarButton> 
                </Items> 
            </telerik:RadToolBar> 
        </td> 
    </tr> 
</table> 
 
<%--store the selected Type--%> 
 <asp:HiddenField ID="SelectedWType" runat="server" Value="0"/>  
 
 

The same example we find in the telerik demos: [Related ComboBoxes]
http://demos.telerik.com/aspnet-ajax/combobox/examples/functionality/multiplecomboboxes/defaultcs.aspx

Thanks for any help
Echarbeneau
Top achievements
Rank 1
 answered on 23 Oct 2009
2 answers
112 views
Hello,

Is anyone aware of a (pre-existing) way to get rad controls' script objects from a collection of DOM objects (all of this on the client-side)?

I'll explain (this is a simplistic example, and other solutions apply for this example, but it will illustrate the scenario):
Imagine I want to get a collection of objects on the page, like all rad textboxes that had "Company" in their ID, and I want to clear them.

Outside of rad, I'd use jQuery, something like:
$(":text[id*=Company]").val("");


But say I'd like to use the .clear() function on the script object (the javascript object that is returned by $find(), instead of $get()) -- is there a way to get an array of the script objects if I have a jQuery collection of the DOM objects?

I know that this isn't a strong usage scenario (the .clear() on the script object may be the same as the setting the HTML object's value to empty string), but other scenarios could exist, like setting up events in bulk, changing the selected item on a RadComboBox in bulk, dynamically modifying an object such that you need to use .trackChange() and .commit(), etc.

I also know converting a bunch of DOM objects to a bunch of script objects isn't difficult -- it would essentially be looping over each DOM object in a collection, either examining a property on the DOM object as a filter (to see if represents a Telerik control) before calling $find on the DOM object's ID, or calling $find on all DOM object IDs and checking a property on the script object (if it isn't null; to see if it represented a Telerik control).

I'm asking if some functionality (like a jQuery plugin) had been developed, or is maintained by Telerik, so that you guys can optimize it (maybe there is a way to get the script objects without a loop), or any member of the community, so the effort isn't duplicated.

Anyone aware of a pre-existing methodology or library call to achieve this functionality?

Thanks,

Matthew





Matthew
Top achievements
Rank 1
 answered on 23 Oct 2009
2 answers
157 views
Hi

Can you give me some help on this... I am struggling.

I have a column on which the column sort does not work,
<telerik:GridTemplateColumn DataField="PricePerBottle"   
DataType="System.Decimal" HeaderText="£/Bottle"   
SortExpression="PricePerBottle" UniqueName="PricePerBottle">  
    <ItemTemplate> 
        <asp:Label ID="PricePerBottleLabel" runat="server"   
        Text='<%# ConstClass.getCurrencyPrice(Eval("PricePerBottle"))%'>  
        </asp:Label> 
    </ItemTemplate> 
    <HeaderStyle HorizontalAlign="Right" Width="70px" /> 
    <ItemStyle HorizontalAlign="Right" /> 
</telerik:GridTemplateColumn> 
It all looks OK to me but maybe the code behind is interfering, because I change the HeaderText in the ItemDataBound event.
Could that be an issue?  Can I get round it?
Thanks for your help!

Clive

Clive Hoggar
Top achievements
Rank 1
 answered on 23 Oct 2009
Narrow your results
Selected tags
Tags
+? more
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?