Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
89 views
Hey,

I put RadAjaxManager and RadAjaxLoadingPanel in Master page and try to call AddAjaxSetting in content page. The NullReferenceException thew out.

here is code in content page

 

protected void Page_Load(object sender, EventArgs e)

 

{


Button
searchButton = (Button)this.SearchCriteria.FindControl("btnSearch");

 

 

RadAjaxManager AjaxManager = (RadAjaxManager)this.Master.FindControl("RadAjaxManager1");

 

AjaxManager.AjaxSettings.AddAjaxSetting(searchButton,

this.radGrid, null);

 

 

if (!IsPostBack)

 

{

// BuildGrid();

}

}

Here is code in master page

 

 

<telerik:RadAjaxManager ID="RadAjaxManager1" runat="server" DefaultLoadingPanelID="RadAjaxLoadingPanel1">

 

 

 

 

 

</telerik:RadAjaxManager>

 

 

 

 

 

<telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" Height="75px"

 

 

 

 

 

Width="75px">

 

 

 

 

 

<img alt="Loading..." src='<%= RadAjaxLoadingPanel.GetWebResourceUrl(Page, "Telerik.Web.UI.Skins.Default.Ajax.loading.gif") %>'

 

 

 

 

 

style="border: 0px;" />

 

 

 

 

 

</telerik:RadAjaxLoadingPanel>

 

Iana Tsolova
Telerik team
 answered on 23 Feb 2010
6 answers
286 views
Hi,

I have a page with a modal popup (extender) on it. When opening the modal popup I dynamically load a usercontrol in the popup which has three radsliders on it. The only problem is that they don't work, they do not render correctly as well. I fixed the faulty rendering with the redraw function but i still cannot move the sliders.

Any help is apreciated.
Chris Marisic
Top achievements
Rank 1
 answered on 23 Feb 2010
1 answer
277 views
I have Master Page and a Content page and I am trying to ajaxify content page. I am using RadAjaxManager to do that.

AS soon as I drop a RadCombobox on the content page  with AutoPostback=True and use it with the RadAjaxManager as the control that updates other controls, I get error :
 

The Controls collection cannot be modified because the control contains code blocks (i.e. <% ... %>).

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.Web.HttpException: The Controls collection cannot be modified because the control contains code blocks (i.e. <% ... %>).

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Stack Trace:

[HttpException (0x80004005): The Controls collection cannot be modified because the control contains code blocks (i.e. <% ... %>).]
   System.Web.UI.ControlCollection.AddAt(Int32 index, Control child) +8668018
   Telerik.Web.UI.RadAjaxControl.MoveUpdatePanel(Control initiator, Control updated) +133

[HttpException (0x80004005): Please, see whether wrapping the code block, generating the exception, within RadCodeBlock resolves the error.]
   Telerik.Web.UI.RadAjaxControl.MoveUpdatePanel(Control initiator, Control updated) +181
   Telerik.Web.UI.RadAjaxControl.PerformRender() +375
   Telerik.Web.UI.RadAjaxControl.OnPageRender(HtmlTextWriter writer, Control page) +1222
   Telerik.Web.UI.RadAjaxControl.RenderPageInAjaxMode(HtmlTextWriter writer, Control page) +95
   System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +256
   System.Web.UI.Control.RenderChildren(HtmlTextWriter writer) +19
   System.Web.UI.Page.Render(HtmlTextWriter writer) +29
   System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +27
   System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) +99
   System.Web.UI.Control.RenderControl(HtmlTextWriter writer) +25
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1266


Version Information: Microsoft .NET Framework Version:2.0.50727.3082; ASP.NET Version:2.0.50727.3082 
 

Here is my ContentPage:

<%

@ Page Title="" Language="C#" MasterPageFile="~/Fac_MasterPage.master" AutoEventWireup="true" CodeBehind="CreateReferral.aspx.cs" Inherits="PatientPlacement.WebLayer.RMS.complete.referrals.CreateReferral" %>

 

<%

@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>

 

<

 

asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">

 

 

<telerik:RadAjaxManagerProxy ID="ramCreateReferral" runat="server">

 

 

<AjaxSettings>

 

 

<telerik:AjaxSetting AjaxControlID="rcbReferralLocation" EventName="SelectedIndexChanged">

 

 

<UpdatedControls>

 

 

<telerik:AjaxUpdatedControl ControlID="rcbReferralLocation" />

 

 

</UpdatedControls>

 

 

</telerik:AjaxSetting>

 

 

</AjaxSettings>

 

 

</telerik:RadAjaxManagerProxy>

 

 

 

<telerik:RadCodeBlock ID="RadCodeBlock1" runat="server">

 

 

<script language="javascript" type="text/javascript">

 

 

function SetDate(datePicker)

 

{

datePicker.SetDate(

new Date());

 

}

 

 

function SetCalendarDate(n)

 

{

 

var calendar;

 

 

switch (n)

 

{

 

case "Document Date":

 

calendar = $find(

"<%=rdpDocumentDate.ClientID %>");

 

 

break;

 

}

calendar.set_selectedDate(

new Date());

 

}

 

 

function DropDownClosed(sender, eventArgs)

 

{

 

var item = eventArgs.get_item();

 

 

var picker = $find("<%= rdpDocumentDate.ClientID %>");

 

 

CreateDocumentName(item.get_text().toString(), picker.get_selectedDate().format(

"d").toString());

 

}

 

 

function DateSelected(sender, eventArgs)

 

{

 

var comboBox = $find("<%= rcbDocumentType.ClientID %>");

 

CreateDocumentName(comboBox.get_text().toString(), eventArgs.get_newValue().toString());

}

 

function CreateDocumentName(type, date)

 

{

 

var textBox = $find("<%= rtbDocumentName.ClientID %>");

 

textBox.set_value(type.toString() +

'-' + date.toString());

 

}

 

function KeyPressed(sender, args) {

 

 

if (args.get_domEvent().rawEvent.keyCode == 13) // ENTER key pressed

 

{

args.get_domEvent().preventDefault();

args.get_domEvent().stopPropagation();

}

 

if (args.get_domEvent().rawEvent.keyCode == 27) // ESC key pressed

 

{

args.get_domEvent().preventDefault();

args.get_domEvent().stopPropagation();

}

}

 

</script>

 

 

</telerik:RadCodeBlock>

 

 

<table border="1" cellpadding="0" cellspacing="0" style="width:100%;">

 

 

<tr>

 

 

<td>

 

Document Type

 

</td>

 

 

<td>

 

 

<telerik:RadComboBox ID="rcbDocumentType" runat="server"

 

 

Skin="Office2007"

 

 

MaxHeight="125px"

 

 

OnClientSelectedIndexChanged="DropDownClosed">

 

 

<Items>

 

 

<telerik:RadComboBoxItem Text="" />

 

 

<telerik:RadComboBoxItem Text="Assessment" />

 

 

<telerik:RadComboBoxItem Text="Chest X-Ray" />

 

 

<telerik:RadComboBoxItem Text="Client Update" />

 

 

<telerik:RadComboBoxItem Text="Consultation" />

 

 

<telerik:RadComboBoxItem Text="Dietary Notes" />

 

 

<telerik:RadComboBoxItem Text="Discharge Planning Record" />

 

 

<telerik:RadComboBoxItem Text="Discharge Summary" />

 

 

<telerik:RadComboBoxItem Text="DME Orders" />

 

 

<telerik:RadComboBoxItem Text="Face Sheet" />

 

 

<telerik:RadComboBoxItem Text="Graphic I &amp; O" />

 

 

<telerik:RadComboBoxItem Text="H &amp; P" />

 

 

<telerik:RadComboBoxItem Text="Home Health Orders" />

 

 

<telerik:RadComboBoxItem Text="Insurance Certification" />

 

 

<telerik:RadComboBoxItem Text="Labs" />

 

 

<telerik:RadComboBoxItem Text="Level 1" />

 

 

<telerik:RadComboBoxItem Text="Level 1 Letter of Determination" />

 

 

<telerik:RadComboBoxItem Text="Medical Necessity" />

 

 

<telerik:RadComboBoxItem Text="Medicare IM/CMS-R-193" />

 

 

<telerik:RadComboBoxItem Text="Medicare IM/Discharge Appeal Rights Form " />

 

 

<telerik:RadComboBoxItem Text="Medication Administration Record (MAR)" />

 

 

<telerik:RadComboBoxItem Text="Medical Documents" />

 

 

<telerik:RadComboBoxItem Text="MMSE" />

 

 

<telerik:RadComboBoxItem Text="Nursing Home Orders" />

 

 

<telerik:RadComboBoxItem Text="Patient Choice Form" />

 

 

<telerik:RadComboBoxItem Text="Progress Notes" />

 

 

<telerik:RadComboBoxItem Text="PT Notes" />

 

 

<telerik:RadComboBoxItem Text="Speech Therapy Notes" />

 

 

<telerik:RadComboBoxItem Text="Therapy Evaluation and Progress Notes" />

 

 

</Items>

 

 

</telerik:RadComboBox>

 

 

</td>

 

 

<td>

 

Document Date

 

</td>

 

 

<td>

 

 

<telerik:RadDatePicker ID="rdpDocumentDate" runat="server"

 

 

Skin="Office2007"

 

 

Width="90px">

 

 

<Calendar ID="calDocumentDate" runat="server"

 

 

ShowRowHeaders="false"></Calendar>

 

 

<ClientEvents OnDateSelected="DateSelected" />

 

 

</telerik:RadDatePicker>&nbsp;

 

 

<asp:LinkButton ID="lnkSetDocumentDate" runat="server"

 

 

OnClientClick="SetCalendarDate('Document Date'); return false;"

 

 

CausesValidation="false">Today</asp:LinkButton>

 

 

</td>

 

 

<td>

 

Document Name

 

</td>

 

 

<td>

 

 

<telerik:RadTextBox ID="rtbDocumentName" runat="server"

 

 

MaxLength="50"

 

 

TextMode="SingleLine"

 

 

Width="200px">

 

 

</telerik:RadTextBox>

 

 

<asp:RequiredFieldValidator ID="rfvDocumentName" runat="server"

 

 

ControlToValidate="rtbDocumentName"

 

 

ErrorMessage="Referral owner is required."

 

 

SetFocusOnError="true">* Required

 

 

</asp:RequiredFieldValidator>

 

 

</td>

 

 

</tr>

 

 

</table>

 

 

<table width="430px" cellpadding="2" cellspacing="1" class="table-display">

 

 

<tr class="tr-header">

 

 

<td colspan="6">

 

 

<img src='<%= ResolveUrl("~/images/bullet_action_sm.gif") %>' />

 

PATIENT DATA

 

</td>

 

 

</tr>

 

 

<tr>

 

 

<td>

 

First Name

 

</td>

 

 

<td>

 

 

<telerik:RadTextBox ID="txtFirstName" runat="server"

 

 

MaxLength="50"

 

 

TextMode="SingleLine"

 

 

AutoCompleteType="FirstName"

 

 

ClientEvents-OnKeyPress="KeyPressed">

 

 

</telerik:RadTextBox>

 

 

<asp:RequiredFieldValidator ID="rfvFirstName" runat="server"

 

 

ControlToValidate="txtFirstName"

 

 

ErrorMessage="First name is required."

 

 

SetFocusOnError="true"

 

 

ValidationGroup="vgpCreateReferral">* Required

 

 

</asp:RequiredFieldValidator>

 

 

</td>

 

 

<td>

 

Middle Initial

 

</td>

 

 

<td>

 

 

<telerik:RadTextBox ID="txtMiddleInitial" runat="server"

 

 

MaxLength="1"

 

 

TextMode="SingleLine">

 

 

</telerik:RadTextBox>

 

 

</td>

 

 

<td>

 

Last Name

 

</td>

 

 

<td>

 

 

<telerik:RadTextBox ID="txtLastName" runat="server"

 

 

MaxLength="50"

 

 

TextMode="SingleLine"

 

 

AutoCompleteType="FirstName"

 

 

ClientEvents-OnKeyPress="KeyPressed">

 

 

</telerik:RadTextBox>

 

 

<asp:RequiredFieldValidator ID="rfvLastName" runat="server"

 

 

ControlToValidate="txtLastName"

 

 

ErrorMessage="Last name is required."

 

 

SetFocusOnError="true"

 

 

ValidationGroup="vgpCreateReferral">* Required

 

 

</asp:RequiredFieldValidator>

 

 

</td>

 

 

</tr>

 

 

<tr>

 

 

<td>Gender</td>

 

 

<td>

 

 

<asp:RadioButtonList ID="rblGender" runat="server"

 

 

RepeatColumns="3"

 

 

RepeatDirection="Horizontal">

 

 

<asp:ListItem Value="F" Text="Female"></asp:ListItem>

 

 

<asp:ListItem Value="M" Text="Male"></asp:ListItem>

 

 

<asp:ListItem Value="U" Text="Unknown"></asp:ListItem>

 

 

</asp:RadioButtonList>

 

 

</td>

 

 

<td>DOB</td>

 

 

<td>

 

 

<telerik:RadDateInput ID="rdpDateOfBirth" runat="server" Width="90px" Skin="Office2007" ClientEvents-OnKeyPress="KeyPressed">

 

 

</telerik:RadDateInput>

 

 

</td>

 

 

<td>SSN</td>

 

 

<td>

 

 

<telerik:RadMaskedTextBox ID="txtSSN" runat="server"

 

 

Mask="###-##-####"

 

 

ClientEvents-OnKeyPress="KeyPressed">

 

 

</telerik:RadMaskedTextBox>

 

 

<asp:RegularExpressionValidator ID="revSSN" runat="server"

 

 

ControlToValidate="txtSSN"

 

 

ErrorMessage="Enter SSN in XXX-XX-XXXX format"

 

 

SetFocusOnError="true"

 

 

Display="Dynamic"

 

 

ValidationExpression="\d{3}-\d{2}-\d{4}"

 

 

ValidationGroup="vgpCreateReferral" >* Invalid

 

 

</asp:RegularExpressionValidator>

 

 

</td>

 

 

</tr>

 

 

<tr>

 

 

<td>Address<br /><br />City State Zip</td>

 

 

<td>

 

 

<telerik:RadTextBox ID="txtAddress1" runat="server"

 

 

MaxLength="50"

 

 

ClientEvents-OnKeyPress="KeyPressed">

 

 

</telerik:RadTextBox><br />

 

 

<telerik:RadTextBox ID="txtAddress2" runat="server"

 

 

MaxLength="50"

 

 

ClientEvents-OnKeyPress="KeyPressed">

 

 

</telerik:RadTextBox><br />

 

 

<telerik:RadTextBox ID="txtCity" runat="server"

 

 

MaxLength="50"

 

 

ClientEvents-OnKeyPress="KeyPressed">

 

 

</telerik:RadTextBox>

 

 

<telerik:RadComboBox ID="rcbState" runat="server"

 

 

DataSourceID="odsStates"

 

 

DataTextField="Description"

 

 

DataValueField="StateID"

 

 

AppendDataBoundItems="True"

 

 

MarkFirstMatch="True"

 

 

Skin="Office2007"

 

 

MaxHeight="125px">

 

 

<Items>

 

 

<telerik:RadComboBoxItem ID="RadComboBoxItem14" runat="server"

 

 

Selected="True"

 

 

Text="- Select a state -"

 

 

Value="0">

 

 

</telerik:RadComboBoxItem>

 

 

</Items>

 

 

</telerik:RadComboBox>

 

 

<asp:ObjectDataSource ID="odsStates" runat="server"

 

 

SelectMethod="GetStatesDataView"

 

 

TypeName="PPS_LIB.Utilities.Tools">

 

 

</asp:ObjectDataSource>

 

 

<telerik:RadMaskedTextBox ID="txtZIPCode" runat="server"

 

 

Mask="#####-####"

 

 

Style="TEXT-ALIGN:left"

 

 

ClientEvents-OnKeyPress="KeyPressed">

 

 

</telerik:RadMaskedTextBox>

 

 

<asp:RegularExpressionValidator ID="revZIPCode" runat="server"

 

 

ControlToValidate="txtZIPCode"

 

 

ErrorMessage="Enter ZIP in 99999 or 99999-9999 format."

 

 

SetFocusOnError="true"

 

 

Display="Dynamic"

 

 

ValidationExpression="(^\d{5}-$)|(^\d{5}-\d{4}$)"

 

 

ValidationGroup="vgpCreateReferral" >* Invalid

 

 

</asp:RegularExpressionValidator>

 

 

</td>

 

 

<td>Phone<br />Mobile<br />Fax</td>

 

 

<td>

 

 

<telerik:RadMaskedTextBox ID="txtPhone" runat="server"

 

 

Mask="###-###-####"

 

 

MaxLength="14"

 

 

ClientEvents-OnKeyPress="KeyPressed">

 

 

</telerik:RadMaskedTextBox>

 

 

<asp:RegularExpressionValidator ID="revPhone" runat="server"

 

 

ControlToValidate="txtPhone"

 

 

ErrorMessage="Enter phone number in 999-999-9999 format."

 

 

SetFocusOnError="true"

 

 

Display="Dynamic"

 

 

ValidationExpression="^\d{3}-\d{3}-\d{4}$"

 

 

ValidationGroup="vgpCreateReferral" >* Invalid

 

 

</asp:RegularExpressionValidator><br />

 

 

<telerik:RadMaskedTextBox ID="txtMobilePhone" runat="server"

 

 

Mask="###-###-####"

 

 

MaxLength="14"

 

 

ClientEvents-OnKeyPress="KeyPressed">

 

 

</telerik:RadMaskedTextBox>

 

 

<asp:RegularExpressionValidator ID="revMobilePhone" runat="server"

 

 

ControlToValidate="txtMobilePhone"

 

 

ErrorMessage="Enter mobile phone number in 999-999-9999 format."

 

 

SetFocusOnError="true"

 

 

Display="Dynamic"

 

 

ValidationExpression="^\d{3}-\d{3}-\d{4}$"

 

 

ValidationGroup="vgpCreateReferral" >* Invalid

 

 

</asp:RegularExpressionValidator><br />

 

 

<telerik:RadMaskedTextBox ID="txtFax" runat="server"

 

 

Mask="###-###-####"

 

 

MaxLength="14"

 

 

ClientEvents-OnKeyPress="KeyPressed">

 

 

</telerik:RadMaskedTextBox>

 

 

<asp:RegularExpressionValidator ID="revFax" runat="server"

 

 

ControlToValidate="txtFax"

 

 

ErrorMessage="Enter fax number in 999-999-9999 format."

 

 

SetFocusOnError="true"

 

 

Display="Dynamic"

 

 

ValidationExpression="^\d{3}-\d{3}-\d{4}$"

 

 

ValidationGroup="vgpCreateReferral" >* Invalid

 

 

</asp:RegularExpressionValidator>

 

 

</td>

 

 

<td>E-mail</td>

 

 

<td>

 

 

<telerik:RadTextBox ID="txtEmail" runat="server"

 

 

MaxLength="100"

 

 

ClientEvents-OnKeyPress="KeyPressed">

 

 

</telerik:RadTextBox>

 

 

<asp:RegularExpressionValidator ID="revEmail" runat="server"

 

 

ControlToValidate="txtEmail"

 

 

ErrorMessage="Enter email in name@organization.com format."

 

 

SetFocusOnError="true"

 

 

Display="Dynamic"

 

 

ValidationExpression="\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*"

 

 

ValidationGroup="vgpCreateReferral">* Invalid

 

 

</asp:RegularExpressionValidator>

 

 

</td>

 

 

</tr>

 

 

<tr>

 

 

<td>

 

Organization

 

</td>

 

 

<td colspan="5">

 

 

<telerik:RadComboBox ID="rcbReferralLocation" runat="server" AutoPostBack="True"

 

 

DataTextField="Name" DataValueField="FacilityID"

 

 

NoWrap="True"

 

 

Width="255px" MaxHeight="125px"

 

 

MarkFirstMatch="True"

 

 

Skin="Office2007"

 

 

OnDataBound="rcbReferralLocation_DataBound">

 

 

</telerik:RadComboBox>

 

 

<asp:RequiredFieldValidator ID="rfvReferralLocation" runat="server"

 

 

ControlToValidate="rcbReferralLocation"

 

 

ErrorMessage="Organization is required."

 

 

InitialValue="- Select an organization -"

 

 

ValidationGroup="vgpCreateReferral">* Required

 

 

</asp:RequiredFieldValidator>

 

 

<asp:ObjectDataSource ID="odsReferralLocations" runat="server"

 

 

SelectMethod="GetAvailableFacilitiesByUser"

 

 

TypeName="PPS_LIB.Facility.Facility">

 

 

<SelectParameters>

 

 

<asp:SessionParameter DefaultValue="0" SessionField="USERID" Name="UserID" Type="Int64" />

 

 

</SelectParameters>

 

 

</asp:ObjectDataSource>

 

 

</td>

 

 

</tr>

 

 

</table>

 

</

 

asp:Content>

As you can see my script code is inside the RadCodeBlock and I have very simple master page. Also, I have noticed that if I used and other standard ASP.NET control that causes the postback and I use it RadAjaxManager, I don't get the error mentioned above. I would appreciate if you would let me know a workaround to this problem. This is very urget and a quick response will be appreciated.

I am using RadControls for ASP.NET AJAX 2009 Q1.

Thanks,
Soor

 

Iana Tsolova
Telerik team
 answered on 23 Feb 2010
2 answers
153 views

Hi,

Do we have any way to export the editor content as doc/docx (Microsoft Word)?

Thanks in Advance

Regards,
Dwarka

Rumen
Telerik team
 answered on 23 Feb 2010
1 answer
97 views
Hi,

I'm trying to make a radtoolbarbutton's text bold in a dropdown when its clicked or checked. I've tried using checkcssclass but haven't been able to get it to work. I'm wondering what the code would be to do this client side.

Regards,

Peter
Yana
Telerik team
 answered on 23 Feb 2010
3 answers
227 views
Hi all,

I'm sure you understand my code beneath, but how could this be done better? Not really like this "selection-hack"...

GridTemplateColumn:
<telerik:GridTemplateColumn HeaderText="<%$ Resources:LanguageWeb, OrderLine_Paragraph %>" 
    UniqueName="ParagraphId" HeaderStyle-Width="200px">
    <ItemTemplate>  
        <telerik:RadComboBox runat="server" ID="CbParagraph" OnInit="CbParagraph_Init" ToolTip='<%# Bind("Paragraph.id") %>' /> 
    </ItemTemplate>  
</telerik:GridTemplateColumn> 

The combobox items is loaded in the OnInit event, and selection done in the ItemDataBound on the RadGrid like this:
protected void RadGrid_ItemDataBound(object sender, GridItemEventArgs e) 
    if (!(e.Item is GridDataItem)) return; 
    var gridItem = (GridDataItem)e.Item; 
 
    var cbParagraphControl = gridItem.FindControl("CbParagraph"); 
    if (cbParagraphControl is RadComboBox) 
    { 
        var cbParagraph = (RadComboBox) cbParagraphControl; 
        cbParagraphcbParagraph.SelectedValue = cbParagraph.ToolTip; 
        cbParagraph.ToolTip = ""
    } 

Any ideas?

Cheers, Ahrensberg

Iana Tsolova
Telerik team
 answered on 23 Feb 2010
4 answers
213 views
First, I think I have found a bug, a little glitch in fact.

http://demos.telerik.com/aspnet-ajax/combobox/examples/functionality/filteringcombo/defaultcs.aspx

Select the combobox, open the options, double esc it. Next time you open it, the list will be blank (you have to delete the text inside, usability fail). Something about the "emptytext" and the filtering action.

The same bug hapens here, but a little bad, the list dont open at all:

<telerik:RadComboBox ID="RadComboBox1" runat="server"
 AllowCustomText="False"
 Filter="Contains"
 EmptyMessage="Select one...">
 <Items>
  <telerik:RadComboBoxItem Text="" Value="None" />
  <telerik:RadComboBoxItem Text="test1" Value="0" />
  <telerik:RadComboBoxItem Text="test2" Value="1" />
  <telerik:RadComboBoxItem Text="test3" Value="2" />
 </Items>
</telerik:RadComboBox>

Second, im trying to build a very simple combobox, with some options inside, AllowCustomText setted to false, and contains filtering on. If the user enter some customtext, and click outside the combobox, or just press enter, I do expected the combo to come back to "emptytext" property, because customtext its not allowed. Do i miss understood the property, is it valid for filtered combos, or Im missing something?

Third, I do live in a country (Brazil) that uses accents, like french. Is there a property to ignore accents in the filter? If not, I think its a good idea for the future.


All the best,
André.

Yana
Telerik team
 answered on 23 Feb 2010
5 answers
120 views
Hi,

In my current web application I am extensively using export functionality of rad grid for excel file.
But when I click on "Open" button of "File Download" dialog fix the opened file shows up with junk charactes like % in its name even though the "File Download" dialog displays correct name.
e.g. file name - "%43%75%72%72%65%6e%74%20%4d%61%72%6b%65%74%20%4f%74%68%65%72%20%43%6f%6d%6d%6f%64%69%74%79%20%50%72%69%63%65 1 .xls"
I haven't changed the export code, just setting up default properties in ASPX for export.

I will appreciate the help at earliest.
Thanks,
Avi
Mark Galbreath
Top achievements
Rank 2
 answered on 23 Feb 2010
1 answer
142 views
Hi All,

I am using RadGrid, and i am using following functions to export grid data, all export method works fine except export to pdf, it will not display data properlly in pdf file

protected void BtnExcel_Click(object sender, EventArgs e)
        {
            SetExport();
            ViewState["ExportingPDF"] = null;

            switch ((sender as Button).ID)
            {
                case "Excel":
                    foreach (GridItem commandItem in this.rgAgenda.MasterTableView.GetItems(GridItemType.CommandItem))
                    {
                        commandItem.Visible = false;
                    }

                    rgAgenda.MasterTableView.ExportToExcel();
                    break;
                case "CSV":
                    rgAgenda.MasterTableView.ExportToCSV(); break;
                case "Word":
                    rgAgenda.MasterTableView.ExportToWord(); break;
                case "PDF":
                    rgAgenda.ExportSettings.OpenInNewWindow = true;
                    ViewState["ExportingPDF"] = "True";
                    ExportToPDF();
                    break;
            }
        }

        private void SetExport()
        {
            rgAgenda.ExportSettings.ExportOnlyData = true;
            rgAgenda.ExportSettings.IgnorePaging = true;
            rgAgenda.ExportSettings.OpenInNewWindow = false;
            rgAgenda.ExportSettings.FileName = "AppointmentsInGrid";

            // Removing command item from the exported document
            foreach (GridItem commandItem in this.rgAgenda.MasterTableView.GetItems(GridItemType.CommandItem))
            {
                commandItem.Visible = false;
            }
        }

        private void ExportToPDF()
        {
            if (ddlPaperSize.SelectedIndex > 0 && ddlPaperSize.SelectedIndex <= 5)
            {
                rgAgenda.ExportSettings.Pdf.AllowAdd = false;
                rgAgenda.ExportSettings.Pdf.AllowCopy = true;
                rgAgenda.ExportSettings.Pdf.AllowModify = true;
                rgAgenda.ExportSettings.Pdf.AllowPrinting = true;
                rgAgenda.ExportSettings.Pdf.Author = "Anonymous";

                rgAgenda.ExportSettings.Pdf.PageTitle = "Appointments Report";
                rgAgenda.ExportSettings.Pdf.Subject = "PDF Export";
                rgAgenda.ExportSettings.Pdf.Title = "PDF Export";

                rgAgenda.ExportSettings.Pdf.PaperSize = (GridPaperSize)Enum.Parse(typeof(GridPaperSize), ddlPaperSize.SelectedValue);
                rgAgenda.MasterTableView.ExportToPdf();
                ddlPaperSize.ClearSelection();
            }
        }


Thanks & Regards
Amit Prajapati





Daniel
Telerik team
 answered on 23 Feb 2010
1 answer
70 views
1. What's a green picker in the header (all browsers)?
2. IE7: I can't repair its apperance...
Peter
Telerik team
 answered on 23 Feb 2010
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?