Telerik Forums
UI for ASP.NET AJAX Forum
2 answers
208 views
I'm attaching a jpg of what I see.  I want the export to word and export to excel buttons to go away and for the row that contains them to go away.  Here's the code from my .aspx file:

<telerik:RadGrid ID="rgFields" runat="server" OnNeedDataSource="rgFields_NeedDataSource"
    AutoGenerateColumns="False" CellSpacing="0" GridLines="None" OnItemDataBound="rgFields_ItemDataBound"
    OnItemCreated="rgFields_ItemCreated" MasterTableView-CommandItemDisplay="None">
    <MasterTableView DataKeyNames="FieldID" AllowFilteringByColumn="false" AllowSorting="false" AllowPaging="false" PageSize="1000"
        CommandItemSettings-ShowExportToExcelButton="false" CommandItemSettings-ShowExportToWordButton="false"
        CommandItemSettings-ShowAddNewRecordButton="false" CommandItemSettings-ShowRefreshButton="false">
        <Columns>
            <telerik:GridBoundColumn AutoPostBackOnFilter="true" DataField="FieldName" HeaderText="Field" UniqueName="FieldName">
            </telerik:GridBoundColumn>
            <telerik:GridBoundColumn AutoPostBackOnFilter="true" DataField="FieldType.FieldTypeName" HeaderText="Type" UniqueName="FieldTypeName">
            </telerik:GridBoundColumn>
        </Columns>
    </MasterTableView>
</telerik:RadGrid>

The only other thing I have going on is I reference a skin in App_Themes that has the following code:

<telerik:RadGrid runat="server" AllowPaging="True" AllowSorting="True"
    AllowFilteringByColumn="true" GridLines="None" AutoGenerateColumns="False" Skin="Default"
    PagerStyle-AlwaysVisible="true" PagerStyle-PageSizeLabelText="Number of entries per page:">
    <MasterTableView CommandItemDisplay="top">
        <CommandItemSettings ShowExportToWordButton="True" ShowExportToExcelButton="True" />
        <RowIndicatorColumn FilterControlAltText="Filter RowIndicator column" Visible="True">
            <HeaderStyle Width="20px" />
        </RowIndicatorColumn>
        <ExpandCollapseColumn FilterControlAltText="Filter ExpandColumn column" Visible="True">
            <HeaderStyle Width="20px" />
        </ExpandCollapseColumn>
    </MasterTableView>
    <HeaderStyle Font-Bold="true" VerticalAlign="top" />
    <ExportSettings ExportOnlyData="True" IgnorePaging="True" OpenInNewWindow="True" />
    <GroupingSettings CaseSensitive="false" />
    <AlternatingItemStyle VerticalAlign="Top" />
    <ItemStyle VerticalAlign="Top" />
</telerik:RadGrid>

I'm guessing that this might be messing me up, but I can't figure out how/why.  I'd like to keep the skin, as it works well for 99% of my grids.

Any ideas would be much appreciated.

Thanks!

Laurie
Laurie
Top achievements
Rank 2
 answered on 05 Jul 2013
1 answer
37 views
I am getting this error below. I am using NO javascript or <%..%> code whatsoever. I have tried placing radcodeblock on the page around the <form></form> tags in case radchart is using javascript.

The Controls collection cannot be modified because the control contains code blocks 

(i.e. <% ... %>).


<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="DashBoard.aspx.cs" Inherits="YS.View.DashBoard.DashBoard" %>
 
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Charting" TagPrefix="telerik" %>
<%@ Register Assembly="Telerik.OpenAccess.Web.40" Namespace="Telerik.OpenAccess.Web"
  TagPrefix="telerik" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<head>
  <link href="../../Styles/Site.css" rel="stylesheet" type="text/css" />
  <title></title>
</head>
<body>
  <telerik:RadScriptManager ID="RadScriptManager" runat="server">
  </telerik:RadScriptManager>
  <telerik:RadWindowManager ID="RadWindowManager1" runat="server">
  </telerik:RadWindowManager>
  <telerik:RadAjaxPanel runat="server" ID="rapGrid" LoadingPanelID="RadAjaxLoadingPanel1">
    <telerik:RadCodeBlock ID="RadCodeBlock1" runat="server">
      <form id="form1" runat="server">
      <div>
        <div class="quota">
          <asp:Label ID="lblSales" runat="server">Sales Quota</asp:Label>
          <telerik:RadRadialGauge ID="quotaGauge" runat="server" BorderStyle="None" Height="220px"
            Width="220px">
            <Pointer Value="83">
            </Pointer>
            <Scale Min="0" Max="100" MajorUnit="20" MinorUnit="2">
              <Labels Format="{0}%" Position="Inside" />
              <Ranges>
                <telerik:GaugeRange Color="Red" From="0" To="30" />
                <telerik:GaugeRange Color="Orange" From="30" To="70" />
                <telerik:GaugeRange Color="Green" From="70" To="100" />
              </Ranges>
            </Scale>
          </telerik:RadRadialGauge>
        </div>
        <h1>
          <asp:Label ID="Label1" Text="Message Center" runat="server"></asp:Label><telerik:RadDatePicker
            ID="rdpMessageDate" runat="server" OnSelectedDateChanged="rdpMessageDate_SelectedDateChanged">
          </telerik:RadDatePicker>
          <h1>
          </h1>
          <telerik:RadGrid ID="rgMessages" runat="server" CellSpacing="0" GridLines="None"
            OnNeedDataSource="rgMessages_NeedDataSource" Width="350px">
            <MasterTableView AutoGenerateColumns="False">
              <CommandItemSettings ExportToPdfText="Export to PDF" />
              <RowIndicatorColumn FilterControlAltText="Filter RowIndicator column" Visible="True">
                <HeaderStyle Width="20px" />
              </RowIndicatorColumn>
              <ExpandCollapseColumn FilterControlAltText="Filter ExpandColumn column" Visible="True">
                <HeaderStyle Width="20px" />
              </ExpandCollapseColumn>
              <Columns>
                <telerik:GridDateTimeColumn DataField="date" DataFormatString="{0:dd/MM/yyyy}" FilterControlAltText="Filter date column"
                  HeaderText="Date" UniqueName="date">
                  <ItemStyle Width="50px" />
                </telerik:GridDateTimeColumn>
                <telerik:GridBoundColumn DataField="message" FilterControlAltText="messages" HeaderText="Message"
                  UniqueName="message">
                </telerik:GridBoundColumn>
              </Columns>
              <EditFormSettings>
                <EditColumn FilterControlAltText="Filter EditCommandColumn column">
                </EditColumn>
              </EditFormSettings>
              <PagerStyle PageSizeControlType="RadComboBox" />
            </MasterTableView>
            <PagerStyle PageSizeControlType="RadComboBox" />
            <FilterMenu EnableImageSprites="False">
            </FilterMenu>
          </telerik:RadGrid>
          <div>
            <asp:Label ID="lblDate" runat="server">Sales To Date</asp:Label>
            <telerik:RadChart ID="rcSales" runat="server" Width="800px">
            </telerik:RadChart>
            <br />
          </div>
        </h1>
      </div>
      </form>
    </telerik:RadCodeBlock>
  </telerik:RadAjaxPanel>
  <telerik:RadAjaxLoadingPanel runat="server" ID="RadAjaxLoadingPanel1">
  </telerik:RadAjaxLoadingPanel>
</body>
</html>

As i said I am NOT using anything like that. I didnt start getting the error until I placed a RadChart on the page.

any thoughts?

Thanks,
Richard
richard
Top achievements
Rank 1
 answered on 05 Jul 2013
2 answers
200 views
How to customize Target dropdown of RadEditor insert link?
I want only following options in Target dropdown. Please see attachment for more details.
Same Window
New Window
Parent Window
Browser Window


Thanks in advance.
Vinayak
Top achievements
Rank 1
 answered on 05 Jul 2013
4 answers
182 views
How to persist row in editable mode in radgrid, on page size change?
Scenario:- In my radgrid i have 10 records with page size of 5 records. I am on second page to edit 3rd record(4th index).
Now I change page size from 5 to 10 and the record in edit mode changes. It takes 3rd record among 10.
Ideally 9th row should remain in edit mode.
How to achive this?

Thanks in advance
Vinayak
Top achievements
Rank 1
 answered on 05 Jul 2013
2 answers
75 views
Hello,

I have a Application like Telerik webmail.
When I send Mail without attachment then it works fine. but when I attach document and then send then it throw error of PRM_server.
Screen shot of error is attached.

So plz reply ASAP.

Thanks.
Ajay
Top achievements
Rank 1
 answered on 05 Jul 2013
3 answers
128 views
I have an oddly behaving comboBox.

Here's my markup

 
<telerik:RadComboBox
                runat="server"
                id="rcbSite"
                width="210px"
                enableloadondemand="true"
                onclientitemsrequesting="rcbSite_OnClientItemsRequesting"
                showmoreresultsbox="True"
                enablevirtualscrolling="True" >   
            <WebServiceSettings Method="GetSitesComboBoxDataByCustomerId" Path="/Services/ClientSideDataService.asmx" />
            </telerik:RadComboBox>



Pretty reasonable, comboBox is tied to a webservice.

The onItemsRequesting function adds some extra data bits to the comboBox context that we need.

  
function rcbSite_OnClientItemsRequesting(sender, eventArgs) {
        //Get the selected customer
        var selectedCustomerId = $('#<%= CustomerDropDownId %> option:selected').attr('value');
 
        var context = eventArgs.get_context();
 
        //Set filter text
        context["FilterString"] = eventArgs.get_text();
        context["CustomerId"] = selectedCustomerId;
    }






In my codebehind I create and select an item if one was previously chosen.
if (siteId.HasValue)
{
     rcbSite.Items.Add(SiteManager.GetComboBoxItemBySiteId(siteId.Value));
     rcbSite.SelectedValue = siteId.Value.ToString();
}







And finally on document.ready I attach a selctedIndexChanged event to the comboBox

Sys.Application.add_load(function(){
             
            //If the combo box has items in it, select the first one
            //Selecting first item client side ensures that address fields are refreshed when binding individual item to combo box on initial page load
            var combo = $find("<%= rcbSite.ClientID %>");
            if (combo.get_items().getItem(0)) {
                combo.trackChanges();
                combo.get_items().getItem(0).select();
                combo.commitChanges();
            }
 
            $find("<%= rcbSite.ClientID %>").add_selectedIndexChanged(
            function (sender, eventArgs) {
                var item = eventArgs.get_item();
                 
                var addressFormFields = new InventoryAddressFields("<%= ddlAddressType.ClientID %>", "<%= txtAttenTo.ClientID %>", "<%= txtAddress1.ClientID %>",
                                                               "<%= txtAddress2.ClientID %>", "<%= txtCity.ClientID %>", "<%= ddlCountry.ClientID %>",
                                                           "<%= ddlState.ClientID %>", "<%= ddlCounty.ClientID %>", "<%= txtPostalCode.ClientID %>",
                                                           "<%= txtPostalCodePlus4.ClientID %>", "<%= txtPhone.ClientID %>", "<%= txtFax.ClientID %>",
                                                           "<%= ddlTimezone.ClientID %>", "<%= chkObserveDST.ClientID %>", "<%= ddlVerificationStatus.ClientID %>");
 
                if (item) {
                    var selectedSiteId = item.get_value();
                 
                    GetAddressBySiteId(addressFormFields, selectedSiteId);
                }
                else
                {
                    clearAddressFields(addressFormFields);
                }
    }
    );
    });



Here's my issue:

 1. Page loads with one item inserted into comboBox & selected
 3. Click into comboBox & hit backspace
 4. Click off the comboBox

Expected:
ComboBox fires a selectedIndexChanged event since we now have no item selected

Actual:
Item is removed without firing event


What's interesting is that if you click into the box and off without removing an item. Then click in and remove it, the event fires correctly.

Any ideas?

Andrew
Top achievements
Rank 1
 answered on 05 Jul 2013
2 answers
61 views
Hello everyone,

I am trying to embed a calendar control within the ItemTemplate of a RadListView. It works so far, but I have problems updating the controls using the AutoPostBack feature. Each of these calendars needs to change the background of certain cells based on underlying data thats specific to each calendar (availability of a product on certain dates). Doing this works as well, but for some reason updating one of the calendars updates all other calendar instances as well. How can I fix that?

The code for the template looks like this:

<ItemTemplate>
<
img src="<%= ControlPath%>product.jpg" alt="<%# Eval("Name")%>" />
<div>
      <h2><%# Eval("Name")%></h2>
       <p><%# Eval("Description") %></p>
</div>
<br class="clear" />
<telerik:RadCalendar ViewStateMode="Disabled" runat="server" TitleFormat="MMMM yyyy" AutoPostBack="true" PresentationType="Preview" EnableNavigation="true" EnableMonthYearFastNavigation="false" OnDayRender="Calendar_DayRender" OnDefaultViewChanged="Calendar_DefaultViewChanged" />
</ItemTemplate>


Regards,
Sebastian
Sebastian
Top achievements
Rank 1
 answered on 05 Jul 2013
3 answers
75 views
Hi !

I want to select a ribbonbutton via server side, is it possible? I did not see any property to make a button selection, only the tabs, and that i'm not being able to make it work.

      var selectedButtonCookie = Request.Cookies.Get("selectedButton");
            if (selectedButtonCookie != null)
            {
                var button = ribbonBar.FindButtonByValue(selectedButtonCookie.Value);

                if (button != null)
                {
                    ribbonBar.SelectedTabIndex = button.ParentWebControl.TabIndex;
                }
            }

Thanks in advance
Kate
Telerik team
 answered on 05 Jul 2013
5 answers
105 views
Hi Team,
I have a radgrid with ClientSelectColumn.
I select a row on first page of the grid, move to second page select 3 rows on second page.
When I come back to first page, my selection on the first page disappears. I mean the selection does not persist.
So I tried what has been said in this post. It works very well as far as visualisation is concerned. It does show that I have my rows selected from different pages.
But when on a button click (outside the grid) I try to loop through this collection, all I get is the records from current selected page and not all the rows selected from different pages.

foreach (GridDataItem item in RadGrid1.SelectedItems)
{
..// Code here
}

RadGrid1.SelectedItems  gives rows from the current selected page only and not the entire selection.

Will you please help me with this?
Any help appreciated.

Thanks,
Lok..
Lokesh
Top achievements
Rank 1
 answered on 05 Jul 2013
1 answer
146 views
Hi Team,

I am using the Rad Calendar control, to display in the arabic format calendar, if I set the culture property to "ar-SA". But It throws the exception.

Valid values are between 1318 and 1500, inclusive.
Parameter name: year

Sample Code
<telerik:RadCalendar ID="radCalendar" runat="server" CultureInfo="ar-SA">               
            </telerik:RadCalendar>

I want display the Hijiri calendar if the culture property is "ar-SA", not only calendar and date picker as well.
So here I just want to confirm that whether this issue has been resolved in new releases or not.
If the same exists, I need a work around to resolve the issue.

Any help would be appreciated.
Thanks,
Konstantin Dikov
Telerik team
 answered on 05 Jul 2013
Narrow your results
Selected tags
Tags
+? more
Top users last month
Ambisoft
Top achievements
Rank 2
Iron
Pascal
Top achievements
Rank 2
Iron
Matthew
Top achievements
Rank 1
Sergii
Top achievements
Rank 1
Iron
Iron
Andrey
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Ambisoft
Top achievements
Rank 2
Iron
Pascal
Top achievements
Rank 2
Iron
Matthew
Top achievements
Rank 1
Sergii
Top achievements
Rank 1
Iron
Iron
Andrey
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?