Telerik Forums
UI for ASP.NET AJAX Forum
4 answers
390 views
I'm dynamically adding the RadAsyncUpload control in the code behind a master page during the page_load event.  I then try and set some properties about the RadAsyncUpload control in the code behind during the on_prerender event:

 private void Settings()
        {
            this.OnClientFileUploaded = ClientFileUploaded;
            this.OnClientFileDropped = ClientFileDropped;
            this.OnClientProgressUpdating = ClientProgressUpdated;
            this.HttpHandlerUrl = HttpHandler;
            this.DropZones = DropZoneList;
            this.MultipleFileSelection = Telerik.Web.UI.AsyncUpload.MultipleFileSelection.Automatic;
            this.TemporaryFolder = GetTemporaryFolder;
            this.Style.Add("display", "none");
        }

protected override void OnPreRender(EventArgs e)
        {
Settings();
base.OnPreRender(e);
}

The control doesn't seem to be registering the dropzones I specify (which are specified as string[] = {"#zone1", "#zone2"...}).  If  I set this list in the aspx page, it seems to work fine, but I'd like to do this in the code behind in a control which inherits from RadAsyncUpload.  Any ideas why these zones aren't being set?  
Hristo Valyavicharski
Telerik team
 answered on 07 Mar 2014
2 answers
103 views
Hi,

I'd like to be able to filter my grid using ajax while in a modal telerik window.  Each time I press enter in a filter field, the page posts back and the modal window is lost.  Is this possible?

If I remove the window, the grid filters perfectly using ajax without postback.

I've pasted my code below.

Thanks!
Stephen

01.<telerik:RadScriptManager ID="RadScriptManager1" runat="server">
02.        <Scripts>
03.            <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.Core.js">
04.            </asp:ScriptReference>
05.            <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.jQuery.js">
06.            </asp:ScriptReference>
07.            <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.jQueryInclude.js">
08.            </asp:ScriptReference>
09.        </Scripts>
10.    </telerik:RadScriptManager>
11.    <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
12.        <AjaxSettings>
13.        <telerik:AjaxSetting AjaxControlID="Panel1">
14.            <UpdatedControls>
15.                <telerik:AjaxUpdatedControl ControlID="Panel1" />
16.            </UpdatedControls>
17.        </telerik:AjaxSetting>
18.        <telerik:AjaxSetting AjaxControlID="RadGrid1">
19.            <UpdatedControls>
20.                <telerik:AjaxUpdatedControl ControlID="Panel1" />
21.                <telerik:AjaxUpdatedControl ControlID="txtNIGPCode" />
22.            </UpdatedControls>
23.        </telerik:AjaxSetting>
24.        <telerik:AjaxSetting AjaxControlID="RadGrid1">
25.            <UpdatedControls>
26.                <telerik:AjaxUpdatedControl ControlID="txtNIGPCode" />
27.            </UpdatedControls>
28.        </telerik:AjaxSetting>
29.    </AjaxSettings>
30.    </telerik:RadAjaxManager>
31.<telerik:RadAjaxLoadingPanel ID="nigpLoadingPanel" runat="server" Skin="Default"></telerik:RadAjaxLoadingPanel>
32.                       
33.                      <telerik:RadWindow ID="RadWindow1" runat="server" Modal="True" Behaviors="Close" IconUrl=" " Behavior="Close">
34. 
35.                          <ContentTemplate>
36. 
37.                              <asp:Panel ID="Panel1" runat="server">
38. 
39.                                  <telerik:RadGrid ID="RadGrid1" runat="server" AllowFilteringByColumn="True" AllowPaging="True" AutoGenerateColumns="False" DataSourceID="dsNIGP" OnSelectedIndexChanged="RadGrid1_SelectedIndexChanged" CellSpacing="0" GridLines="None">
40.                                      <GroupingSettings CaseSensitive="false" />
41.                                      <MasterTableView DataKeyNames="GT_NIGP_Code">
42.                                          <Columns>
43.                                              <telerik:GridButtonColumn Text="Select" CommandName="Select"></telerik:GridButtonColumn>
44.                                              <telerik:GridBoundColumn HeaderText="Code" ReadOnly="true" DataField="GT_NIGP_Code" SortExpression="GT_NIGP_Code" AutoPostBackOnFilter="true" ShowFilterIcon="false" CurrentFilterFunction="Contains" />
45.                                              <telerik:GridBoundColumn HeaderText="Description" ReadOnly="true" DataField="DESCR" SortExpression="DESCR" AutoPostBackOnFilter="true" ShowFilterIcon="false" CurrentFilterFunction="Contains" />
46.                                          </Columns>
47.                                      </MasterTableView>
48.                                  </telerik:RadGrid>
49.                                  <asp:EntityDataSource ID="dsNIGP" runat="server" ConnectionString="name=VendorProfileEntities" DefaultContainerName="VendorProfileEntities" EnableFlattening="False" EntitySetName="GT_NIGP" OrderBy="it.GT_NIGP_Code">
50.                                  </asp:EntityDataSource>
51. 
52.                              </asp:Panel>
53.                          </ContentTemplate>
54.                      </telerik:RadWindow>
55.                           
56.                      <telerik:RadScriptBlock ID="RadScriptBlock1" runat="server">
57.                          <script type="text/javascript">
58.                              /* Using radopen */
59.                              function ShowExisting1() {
60.                                  //Show an existing window
61.                                  var oWnd = $find("<%= RadWindow1.ClientID %>");
62.                              oWnd.show();
63.                              //First argument is the URL. Since no url is provided, the NavigateUrl property set on the server will be used.
64.                          }
65. 
66.                          </script>
67.                      </telerik:RadScriptBlock>     
68. 
69.                        NIGP Code:
70.                        <asp:TextBox ID="txtNIGPCode" runat="server"></asp:TextBox>
71.                        <button onclick="ShowExisting1();return false;" class="Button">Lookup</button>







Konstantin Dikov
Telerik team
 answered on 07 Mar 2014
2 answers
77 views
Greetings,

I'd like to have this addressed ASAP. This seems to be another bug.

Download

SkyDrive : file name is "RadFormDecoratorLightWeightRaid.zip"

Issue :

as observed on Line 56 in the code snippet below, the html my JavaScript code generates with some poor man's template-ing does work if I remove "select" controls being decorated by changing :

<telerik:RadFormDecorator ID="RadFormDecorator1" runat="server" Skin="Default" DecoratedControls="All" RenderMode="Lightweight" />


to

<telerik:RadFormDecorator ID="RadFormDecorator1" runat="server" Skin="Default" DecoratedControls="All" ControlsToSkip="Select" RenderMode="Lightweight" />

Plot :

I have a list of items that I bind from server side to asp.DropDownList control. At the time of doing this I also set certain attribute as shown in the code snippet below. (Lines 17,19 & 21)

01.using System.Web.UI.WebControls;
02. 
03.namespace RadFormDecoratorLightWeightRaid
04.{
05.    public partial class WebForm1 : System.Web.UI.Page
06.    {
07.        protected void Page_Load(object sender, EventArgs e)
08.        {
09.            ListItem item;
10.            itemTypes2.Items.Clear();
11.            for (int i = 1; i <= 40; i++)
12.            {
13.                item = new ListItem();
14.                item.Text = string.Format("rad form decorator bug {0}", i);
15.                item.Value = (i * 10).ToString();
16.                if (i < 25)
17.                    item.Attributes.Add("data-category", "A");
18.                else if (i == 35)
19.                    item.Attributes.Add("data-category", "A");
20.                else
21.                    item.Attributes.Add("data-category", "B");
22.                itemTypes2.Items.Add(item);
23.            }
24.        }
25.    }
26.}

Now I have another drop down (ID="itemTypes") from which I want to control the items being displayed in this drop down on client side JavaScript whose ID happens to be "itemTypes2".

the code snippet below is from the content page :

01.<table border="0" cellpadding="0" cellspacing="0">
02.        <tr>
03.            <td>
04.                <asp:DropDownList ID="itemTypes" runat="server" onchange="jsfun_itemTypeChanged();">
05.                    <asp:ListItem Text="Case Type A" Value="A"></asp:ListItem>
06.                    <asp:ListItem Text="Case Type B" Value="B"></asp:ListItem>
07.                </asp:DropDownList>
08.            </td>
09.            <td>
10.                <asp:DropDownList ID="itemTypes2" runat="server">
11.                </asp:DropDownList>
12.            </td>
13.        </tr>
14.    </table>
15.    <span id="optionstore" style="display: none;"></span>
16.    <telerik:RadScriptBlock runat="server">
17.        <script type="text/javascript">
18. 
19.            var
20.                ddItemTypes_ID = "<%=itemTypes.ClientID %>",
21.                ddItemTypes2_ID = "<%=itemTypes2.ClientID %>",
22.                allOptions = []
23.            ;
24. 
25.            window.onload = function () {
26.                jsfun_itemTypeChanged();
27.            };
28. 
29. 
30. 
31.            $(function () {
32.                $('#' + ddItemTypes2_ID + ' option').each(function () {
33.                    if ($(this).val() !== "") {
34.                        var caseTypeItem = {
35.                            tag: $(this).attr("data-category"),
36.                            txt: $(this).text(),
37.                            _val: $(this).val()
38.                        };
39.                        allOptions.push(caseTypeItem);
40.                    }
41.                });
42.            });
43. 
44.            function jsfun_itemTypeChanged() {
45.                var 
46.                    filter = $('#' + ddItemTypes_ID).val().toString(),
47.                    filteredItems,
48.                    optionsHtml = ""
49.                ;
50.                console.log('>>> Selected Value ' + filter);
51.                if (filter === 'A' || filter === 'B') {
52.                    filteredItems = allOptions.filter(function (o) { return o.tag === filter; });
53.                    $.each(filteredItems, function (i) {
54.                        optionsHtml += "<option value='" + $(this)[0]._val.toString() + "' data-category='" + $(this)[0].tag + "'>" + $(this)[0].txt + "</option>";
55.                    });
56.                    $('#' + ddItemTypes2_ID).empty().html(optionsHtml);
57.                    debugger;
58.                    console.log(optionsHtml);
59.                }
60.            }
61.        </script>
62.    </telerik:RadScriptBlock>


finally here is how my declaration of RadFormDecorator in master file looks like :

<telerik:RadFormDecorator ID="RadFormDecorator1" runat="server" Skin="Default" DecoratedControls="All" RenderMode="Lightweight" />

Like I mentioned earlier, the complete solution can be found from skydrive link below :

http://1drv.ms/1dxchAm


Thanks,
-Aarsh
Aarsh
Top achievements
Rank 1
 answered on 07 Mar 2014
1 answer
99 views
Hello,

Tabs width in chrome is not divided equally, It works fine in IE but not in chrome. Please see attached images 

<telerik:RadTabStrip ID="RadTabStrip1" runat="server" SelectedIndex="0" Width="100%"
                    AutoPostBack="true" MultiPageID="RadMultiPage1">
                    <Tabs>
                        <telerik:RadTab runat="server" Text="Upcoming" Width="33%" PageViewID="pvUpcoming"
                            SelectedIndex="0" Selected="True" Font-Bold="true" />
                        <telerik:RadTab runat="server" Text="Completed" Width="33%" PageViewID="pvCompleted"
                            Font-Bold="true" />
                        <telerik:RadTab runat="server" Text="Canceled" Width="33%" PageViewID="pvCancelled"
                            Font-Bold="true" />
                    </Tabs>
                </telerik:RadTabStrip>
Nencho
Telerik team
 answered on 07 Mar 2014
1 answer
127 views

I am using RadListView control to edit some data in Database. One column should contains Html content. When I am trying to submit Html it gives me the Ajax error below. I have set ValidateRequest="false" on the page but it was not helped. How to enable RadListView to submit Html content to the database?

Unhandled exception at line 15, column 16485 in http://localhost:8256/Telerik.Web.UI.WebResource.axd?_TSM_HiddenField_=RadScriptManager1_TSM&compress=1&_TSM_CombinedScripts_=;;System.Web.Extensions,+Version=4.0.0.0,+Culture=neutral,+PublicKeyToken=31bf3856ad364e35:en-US:fa6755fd-da1a-49d3-9eb4-1e473e780ecd:ea597d4b:b25378d2;Telerik.Web.UI,+Version=2013.3.1114.45,+Culture=neutral,+PublicKeyToken=121fae78165ba3d4:en-US:9d967110-0dc5-4d20-a086-c7556058bb3c:16e4e7cd:86526ba7:874f8ea2:ed16cbdc:f7645509:88144a7a:24ee1bba:e330518b:2003d0b8:1e771326:c8618e41:ddbfcb67

0x800a139e - JavaScript runtime error: 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 '             </td>

                </tr'.



Regards,
  Oleg

Maria Ilieva
Telerik team
 answered on 07 Mar 2014
5 answers
263 views
Hi,

In the AppointDataBound event I'm setting the colors of the border, background and text.
It works fine for background and text, but not for the border.

e.Appointment.BorderColor = System.Drawing.Color.FromName(borderColor);
e.Appointment.BackColor = System.Drawing.Color.FromName(backgroundColor);
e.Appointment.ForeColor = System.Drawing.Color.FromName(textColor);

I'm using the hex format for the color names. (#2d14eb)
How can I also set this for the border color?

When using these colors, the text displayed in the appointment will now be displayed outside the border if longer than the box itself.
(see attachment)
When not setting the colors myself, so using the standard style, text will not be displayed outside the box.

Thanks and best regards,
Egbert
Hristo Valyavicharski
Telerik team
 answered on 07 Mar 2014
6 answers
185 views

Not sure if anyone has encountered this so far, but here's the layout. I have a radgrid inside of a RadAjaxPanel with a referencing RadAjaxLoadingPanel. 

My problem is that the icon and css for the datetimecolumn filter is not there. When I remove the ajaxPanal and the LoadingPanel, all works well.

Is there a way around this? The RadAjaxPanel is awesome, since our apps need to refresh the grids after a radwindow close, but this bug (er whatever it is) makes the grid format look way off.


<telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" Skin="Vista">
            </telerik:RadAjaxLoadingPanel>
            <telerik:RadAjaxPanel ID="RadAjaxPanel1" runat="server" LoadingPanelID="RadAjaxLoadingPanel1"
                EnableEmbeddedScripts="true" Height="550px">
 
<telerik:RadGrid ID="RadGrid1" runat="server" Height="412px" Width="818px" AutoGenerateColumns="true"
                    AllowSorting="true" GroupingSettings-CaseSensitive="false" ClientSettings-Scrolling-AllowScroll="true"
                    AutoGenerateHierarchy="true" PageSize="20" Skin="WebBlue" PagerStyle-AlwaysVisible="true"
                    ClientSettings-ClientEvents-OnRowDblClick="RowDblClick" ClientSettings-Resizing-AllowColumnResize="true"
                    ClientSettings-Scrolling-UseStaticHeaders="false" ClientSettings-Selecting-AllowRowSelect="true"
                    ClientSettings-ClientEvents-OnRowClick="RadGrid1_RowSelected" ClientSettings-Scrolling-SaveScrollPosition="true"
                    AllowFilteringByColumn="true" AllowPaging="true" OnNeedDataSource="RadGrid1_NeedDataSource"
                    OnDetailTableDataBind="RadGrid1_DetailTableDataBind" OnColumnCreated="RadGrid1_ColumnCreated"
                    OnPreRender="RadGrid1_PreRender" OnItemDataBound="RadGrid1_ItemDataBound" OnItemCreated="RadGrid1_ItemCreated">
                    <MasterTableView AllowMultiColumnSorting="True" ClientDataKeyNames="rvlPropertyID"
                        DataKeyNames="rvlPropertyID" HierarchyLoadMode="Client" Name="Property" Width="100%">
                    </MasterTableView>
                    <HeaderStyle VerticalAlign="Top" Width="125px" />
                    <PagerStyle AlwaysVisible="True" />
                </telerik:RadGrid>
            </telerik:RadAjaxPanel>

Maria Ilieva
Telerik team
 answered on 07 Mar 2014
1 answer
97 views
I have rad grid which insert choices for a question so, it has a textbox edit column. In some cases I need to insert the ≤ ( &#8805) symbol. If i use the symbol it changes it to an equal sign. Normally I would use the html/ascii code to do it but, in this case I need the symbol to display properly when its pasted. Is there a way for the textbox to not change the greater than or equal to symbol?
Viktor Tachev
Telerik team
 answered on 07 Mar 2014
1 answer
327 views
Hi,
I would like to disable the save changes button in the client side and enable it only if some changes has been made in the Rad Grid. I am using the Rad Grid in batch edit mode. How can we do this?
Thanks
Sambath
Eyup
Telerik team
 answered on 07 Mar 2014
2 answers
215 views
Hi,

I would like to use a CompareValidator on a RadNumericTextbox control (2012.2.904.40).

Everything is setup fine.

But it doesn't works as excepted, while debugging I see that there is a problem in the telerik JS method : ValidatorGetValue(val.controltovalidate).

This method contains :
ValidatorGetValue=function(a){
      var b=document.getElementById(a);
      if(typeof(b.RadInputValidationValue)=="string"){
           return b.RadInputValidationValue;
      }
      else{
           return ValidatorGetValue_Original(a);
      }
}

In my case b.RadInputValidationValue is always an empty string even if there is some value inside, so typeof(b.RadInputValidationValue)=="string" is always true but always return and empty string, if I try in debugging ValidatorGetValue_Original(a) it returns me the right value ! 
Viktor Tachev
Telerik team
 answered on 07 Mar 2014
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?