Telerik Forums
UI for ASP.NET AJAX Forum
2 answers
231 views
I have a radgrid that has two "edit" columns for input.  when the user clicks "imageButton2" the export works fine, but the two template columns don't show up.


<asp:ImageButton ID="ImageButton2" runat="server" ImageUrl="Excel_ExcelML.png"  OnClick="ImageButton_Click" AlternateText="ExcelML" />
  
<telerik:RadGrid ID="RadGrid1" runat="server" CellSpacing="0" AutoGenerateColumns="False"   OnItemCommand="RadGrid1_ItemCommand" OnNeedDataSource="RadGrid1_NeedDataSource" GridLines="None" ShowGroupPanel="True" Skin="Metro">
            <GroupingSettings GroupItemsWrapperTableCaption="Sales Planning Model" />
            <ClientSettings AllowDragToGroup="True">
            </ClientSettings>
            <ExportSettings ExportOnlyData="true">           </ExportSettings>
            <MasterTableView AutoGenerateColumns="false"  CommandItemDisplay="Bottom" GroupsDefaultExpanded="False" ShowGroupFooter="True" >
                <Columns>
                    <telerik:GridTemplateColumn FilterControlAltText="Filter TemplateColumn column" HeaderText="Forecast" UniqueName="TemplateColumn">
                    </telerik:GridTemplateColumn>
                    <telerik:GridBoundColumn DataField="typedesc" FilterControlAltText="Filter typedesc column" HeaderText="typedesc" UniqueName="typedesc">
                        <ColumnValidationSettings>
                            <ModelErrorMessage Text="" />
                        </ColumnValidationSettings>
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="bill_to_name" FilterControlAltText="Filter bill_to_name column" HeaderText="Bill To Name" UniqueName="bill_to_name">
                        <ColumnValidationSettings>
                            <ModelErrorMessage Text="" />
                        </ColumnValidationSettings>
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="jan"  Aggregate="Sum" FilterControlAltText="Filter jan column" DataFormatString="{0:###,##0.0}" HeaderText="Jan" UniqueName="jan">
                        <ColumnValidationSettings>
                            <ModelErrorMessage Text="" />
                        </ColumnValidationSettings>
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="feb" Aggregate="Sum" FilterControlAltText="Filter feb column" DataFormatString="{0:###,##0.0}" HeaderText="Feb" UniqueName="feb">
                        <ColumnValidationSettings>
                            <ModelErrorMessage Text="" />
                        </ColumnValidationSettings>
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="Mar"  Aggregate="Sum" FilterControlAltText="Filter Mar column" DataFormatString="{0:###,##0.0}" HeaderText="Mar" UniqueName="Mar">
                        <ColumnValidationSettings>
                            <ModelErrorMessage Text="" />
                        </ColumnValidationSettings>
                    </telerik:GridBoundColumn>
                       <telerik:GridBoundColumn DataField="month3Avg" Aggregate="Sum" FilterControlAltText="Filter month3Avg column" DataFormatString="{0:###,##0.0}" HeaderText="3 month Avg" UniqueName="month3Avg">
                        <ColumnValidationSettings>
                            <ModelErrorMessage Text="" />
                        </ColumnValidationSettings>
                    </telerik:GridBoundColumn>
                    <telerik:GridTemplateColumn HeaderText="Forecast (Increment)" UniqueName="colForecast">
                        <ItemTemplate>
                            <telerik:RadNumericTextBox ID="RadForecast" uniqueName="RadForecast" Width="80px" DataFormatString="{0:###,##0.0}" Value="0.0" runat="server"></telerik:RadNumericTextBox>
                        </ItemTemplate>
                    </telerik:GridTemplateColumn>
                      <telerik:GridTemplateColumn HeaderText="Notes" UniqueName="colNotes">
                        <ItemTemplate>
                            <asp:TextBox ID="txtNotes" uniqueName="txtNotes" runat="server" Columns="30" MaxLength="30"></asp:TextBox>
                        </ItemTemplate>                    </telerik:GridTemplateColumn>
                </Columns>
                <GroupByExpressions>
                    <telerik:GridGroupByExpression>
                        <SelectFields>
                            <telerik:GridGroupByField FieldAlias="typeDesc" FieldName="typeDesc" FormatString="" HeaderText="By Type Description" />
                        </SelectFields>
                        <GroupByFields>
                            <telerik:GridGroupByField FieldAlias="typeDesc" FieldName="typeDesc" FormatString="" HeaderText="" />
                        </GroupByFields>
                    </telerik:GridGroupByExpression>
                </GroupByExpressions>            </MasterTableView>
        </telerik:RadGrid>

My code-behind

​Protected Sub ImageButton_Click(sender As Object, e As ImageClickEventArgs)
For Each item As GridDataItem In RadGrid1.MasterTableView.Items
Dim _forecast As RadNumericTextBox = TryCast(item("colForecast").FindControl("RadForecast"), RadNumericTextBox)
item("colForecast").Text = _forecast.Text
Dim _notes As TextBox = TryCast(item("colNotes").FindControl("txtNotes"), TextBox)
item("colNotes").Text = _notes.Text

Next
RadGrid1.MasterTableView.ExportToCSV()
End Sub

doug
Top achievements
Rank 2
 answered on 07 Mar 2014
1 answer
696 views
I'm getting the following error when I post back with the RadEditor

A potentially dangerous Request.Form value was detected from the client (step1RadEditor$ctl00="...asdf a sdf<br>").Description: Request Validation has detected a potentially dangerous client input value, and processing of the request has been aborted. This value may indicate an attempt to compromise the security of your application, such as a cross-site scripting attack. You can disable request validation by setting validateRequest=false in the Page directive or in the configuration section. However, it is strongly recommended that your application explicitly check all inputs in this case. <br>

This issue has already been discussed in this Post 5 years ago but I'm not satisfied with its solution (ie: setting ValidateRequest to false). Why can't  RadEditor just HTML encode its value(s) before POSTing it to the server so it wont trigger ASP.NET's alarm? 

Is there a better work around?
Vasil
Telerik team
 answered on 07 Mar 2014
3 answers
63 views
I have implemented the following code as it is mimics the functionality that I am looking for, however need it changed slightly.  The PanelBar may have certain items hidden based upon permissions.  ie. Admin may see all menu items; where a guest will only see few; employee will see most.  Using this code when clicking on "CU Tracking" it will not display any information because it is looking to show the information for RadPageView2 instead of RadPageView3.  Clicking on "Reporting Tools" will show RadPageView3. 

I plan on using code behind to limit the items visible within the PanelBar based upon permissions.  But I would like it only to display appropriate RadPageView first.   

Any suggestions?
       <telerik:RadSplitter ID="RadSplitter1" runat="server" Height="100%" Width="100%">
            <telerik:RadPane runat="server" ID="leftpane" Width="250">
                <telerik:RadMultiPage ID="RadMultiPage1" runat="server" SelectedIndex="0" Height="70%" Width="235" BackColor="White" BorderColor="#6593cf" BorderStyle="Solid" BorderWidth="1px">
                <telerik:RadPageView ID="RadPageView1" runat="server">
                    <h2>Home</h2>
               </telerik:RadPageView>
                <telerik:RadPageView ID="RadPageView2" runat="server" Visible="false" Enabled="false">
                    <h2>Financial Statements</h2>
                    <ul class="qsfexOtherItems">
                         <li>
                            <span class="qsfexLinkImage"><asp:Image ID="Image1" runat="server" ImageUrl="images/fs_XML-icon.png" AlternateText="Data Entry"></asp:Image></span>
                            <asp:HyperLink ID="HyperLink1" runat="server" NavigateUrl="#">Data Entry</asp:HyperLink>
                         </li>
                         <li>
                             <span class="qsfexLinkImage"><asp:Image ID="Image2" runat="server" ImageUrl="images/fs_Data-Upload-icon.png" AlternateText="Data Entry"></asp:Image></span>
                             <asp:HyperLink ID="HyperLink2" runat="server" NavigateUrl="#">Data Upload</asp:HyperLink>
                         </li>
                    </ul>
               </telerik:RadPageView>
                <telerik:RadPageView ID="RadPageView3" runat="server">
                    <h2>CU Tracking</h2>
                    <ul class="qsfexOtherItems">
                        <li>
                            <span class="qsfexLinkImage"><asp:Image ID="Image3" runat="server" ImageUrl="images/CT_ContactMgr-icon.png" AlternateText="Contact Manager"></asp:Image></span>
                            <asp:HyperLink ID="HyperLink3" runat="server" NavigateUrl="CUTracking/ContactManager">Contact Manager</asp:HyperLink>
                        </li>
                        <li><asp:HyperLink ID="HyperLink4" runat="server" NavigateUrl="#">Policy Information</asp:HyperLink></li>
                        <li><asp:HyperLink ID="HyperLink11" runat="server" NavigateUrl="#">Auditing</asp:HyperLink></li>
                        <li><asp:HyperLink ID="HyperLink12" runat="server" NavigateUrl="#">Excess Tracking</asp:HyperLink></li>
                        <li><asp:HyperLink ID="HyperLink13" runat="server" NavigateUrl="#">Misc Information</asp:HyperLink></li>
                        <li>
                            <span class="qsfexLinkImage"><asp:Image ID="Image10" runat="server" ImageUrl="images/notesItems.gif" AlternateText="Notes"></asp:Image></span>
                            <asp:HyperLink ID="HyperLink14" runat="server" NavigateUrl="#">Notes</asp:HyperLink></li>
                        <li><asp:HyperLink ID="HyperLink15" runat="server" NavigateUrl="#">Board Reporting</asp:HyperLink></li>
                    </ul>
               </telerik:RadPageView>
                <telerik:RadPageView ID="RadPageView4" runat="server">
                    <h2>Reporting Tools</h2>
                    <ul class="qsfexOtherItems">
                        <li><asp:HyperLink ID="HyperLink5" runat="server" NavigateUrl="#">Static Reports</asp:HyperLink></li>
                        <li><asp:HyperLink ID="HyperLink6" runat="server" NavigateUrl="#">Policy Letters</asp:HyperLink></li>
                        <li><asp:HyperLink ID="HyperLink16" runat="server" NavigateUrl="#">CU Data Bank</asp:HyperLink></li>
                        <li><asp:HyperLink ID="HyperLink17" runat="server" NavigateUrl="#">Labels</asp:HyperLink></li>
                    </ul>
               </telerik:RadPageView>
                <telerik:RadPageView ID="RadPageView5" runat="server" Visible="false">
                    <h2>Check Mate</h2>
                    <ul class="qsfexOtherItems">
                        <li><asp:HyperLink ID="HyperLink7" runat="server" NavigateUrl="#">Admin Tools</asp:HyperLink></li>
                        <li><asp:HyperLink ID="HyperLink8" runat="server" NavigateUrl="#">Contact Manager</asp:HyperLink></li>
                        <li><asp:HyperLink ID="HyperLink18" runat="server" NavigateUrl="#">Contact Processing</asp:HyperLink></li>
                        <li>
                            <span class="qsfexLinkImage"><asp:Image ID="Image20" runat="server" ImageUrl="images/notesItems.gif" AlternateText="My Contacts">
                            </asp:Image></span><asp:HyperLink ID="HyperLink19" runat="server" NavigateUrl="#">Notes</asp:HyperLink>
                        </li>
                        <li><asp:HyperLink ID="HyperLink20" runat="server" NavigateUrl="#">Reports</asp:HyperLink></li>
                    </ul>
               </telerik:RadPageView>
                <telerik:RadPageView ID="RadPageView6" runat="server" Visible="false">
                    <h2>Administration</h2>
                    <ul class="qsfexOtherItems">
                        <li><asp:HyperLink ID="HyperLink9" runat="server" NavigateUrl="#">User Administration</asp:HyperLink></li>
                    </ul>
               </telerik:RadPageView>
          </telerik:RadMultiPage>
                <hr class="separator" />
                <telerik:RadPanelBar runat="server" ID="RadPanelBar1" ExpandMode="SingleExpandedItem" OnClientItemClicking="OnClientItemClicking" OnClientMouseOver="panelMouseOver" Width="235px">
                    <Items>
                        <telerik:RadPanelItem Text="Home" Expanded="True" ImageUrl="images/home-icon.png" />
                        <telerik:RadPanelItem Text="Financial Statements" Expanded="True" ImageUrl="images/dollar-sign-icon.png" Visible="false" />
                        <telerik:RadPanelItem Text="CU Tracking" Expanded="True" ImageUrl="images/CUTracking-icon.png" />
                        <telerik:RadPanelItem Text="Reporting Tools" Expanded="True" ImageUrl="images/Reporting-icon.png" />
                        <telerik:RadPanelItem Text="Check Mate" Expanded="True" ImageUrl="images/check-mate-icon.png" Visible="false" />
                        <telerik:RadPanelItem Text="Administration" Expanded="True" ImageUrl="images/Administration-icon.png" Visible="false" />
                    </Items>
                    <ExpandAnimation Type="OutQuart" />
                    <CollapseAnimation Type="OutQuart" />
                </telerik:RadPanelBar>
            </telerik:RadPane>
 
</telerik:RadSplitter>
     <telerik:RadScriptBlock ID="RadScriptBlock1" runat="server">
          <script type="text/javascript">
              //<![CDATA[
              var blnDragging = false;
              function OnClientItemClicking(sender, eventArgs) {
                  var multipage = $find("<%= RadMultiPage1.ClientID %>");
                   multipage.set_selectedIndex(eventArgs.get_item().get_index());
              }
              function panelMouseOver(sender, eventArgs) {
                  if (eventArgs.get_item().get_text().indexOf("Folders") != -1 && blnDragging) {
                      var multipage = $find("<%= RadMultiPage1.ClientID %>");
                        multipage.set_selectedIndex(eventArgs.get_item().get_index());
                    }
                }
              //]]>
          </script>
     </telerik:RadScriptBlock>
Hristo Valyavicharski
Telerik team
 answered on 07 Mar 2014
2 answers
37 views
Hello, 

Tabs width in chrome is not divided equally, It looks good 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>
Veer
Top achievements
Rank 1
 answered on 07 Mar 2014
1 answer
77 views
I'm struggling to see how I would be able to localise strings for my HeaderTemplate. How can I achieve this correctly?

Usually I would perform localisation like so:

 <asp:Literal ID="Literal132" runat="server" Text="<%$ Resources:Common, EMAIL_SUBJECT %>" />

But when I attempt this in the HeaderTemplate the ASPX page does not load correctly.

I have read the localization section of your documentation but this seems like it would only apply to your inbuilt text, such as the text in the MoreResultsBox.

Here is how my control is marked up.

<telerik:RadComboBox
    ID="cmbEmailContacts"
    runat="server"
    EnableLoadOnDemand="false"
    HighlightTemplatedItems="true"
    ShowMoreResultsBox="false"
    MarkFirstMatch="true"
    AutoPostBack="false"
    CheckBoxes="true"
    DropDownWidth="450px"
    DataSourceID="SqlDataSource1"
    DataTextField="UserName"
    DataValueField="UserKey"
    EnableVirtualScrolling="true"
    AllowCustonText="false"
    EmptyMessage="Select Contacts..."
    Filter="None"
    CssClass="textbox">
    <HeaderTemplate>
        <ul>
            <li class="col1h">Select</li>
            <li class="col2h">Username</li>
            <li class="col3h">Email Address</li>
        </ul>
    </HeaderTemplate>    
    <ItemTemplate>
        <ul>
            <li class="col2"><%# Eval("UserName") %> </li>
            <li class="col3"><%# Eval("EmailAddress") %> </li>
        </ul>
    </ItemTemplate>
</telerik:RadComboBox>

Alex
Top achievements
Rank 1
 answered on 07 Mar 2014
4 answers
347 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
81 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
52 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
57 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
103 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
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
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
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?