This is a migrated thread and some comments may be shown as answers.

Bug? RadGrid with GridDropDownColumn

2 Answers 36 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Michael
Top achievements
Rank 1
Michael asked on 19 Nov 2014, 04:48 PM
Hello,

I'm using a RadGrid with EditForms. I find that when I use GridDropDownColumn, I get a js error generated by telerik's dynamic code when calling the grid edit form.
If I take GridDropDownColumns out of my grid, everything works fine. Even if I'm using a generic GridDropDownColumn with no datafield, I still get the error.

I can't figure out what's causing this, as it worked the day before and I haven't changed anything.

Here's the error message:

Line: 6
Error: Object doesn't support property or method 'toUpperCase'

Here's my grid:

<telerik:RadGrid runat="server" ID="gridMedications" OnItemDataBound="gridMedications_ItemDataBound" OnInsertCommand="gridMedications_InsertCommand" OnDeleteCommand="gridMedications_DeleteCommand" >
    <MasterTableView AutoGenerateColumns="false" NoMasterRecordsText="<i><b>None - Not taking any medications</b></i>"
        CommandItemDisplay="Bottom" EditMode="EditForms" >
        <CommandItemSettings AddNewRecordText="Add Medication" ShowAddNewRecordButton="true" ShowRefreshButton="false" />
        <EditFormSettings EditColumn-InsertText="Add" EditColumn-ButtonType="PushButton" />
        <Columns>
            <telerik:GridBoundColumn DataField="NameOfMed" HeaderText="Medication" UniqueName="NameOfMed" >
                <ColumnValidationSettings EnableRequiredFieldValidation="true">
                    <RequiredFieldValidator SetFocusOnError="true" Display="Dynamic" ForeColor="Red" Text=" *Required" />
                </ColumnValidationSettings>
            </telerik:GridBoundColumn>
            <telerik:GridBoundColumn DataField="ReasonForTaking" HeaderText="Reason for Taking" UniqueName="ReasonForTaking" DefaultInsertValue="" />
            <telerik:GridBoundColumn DataField="FormOfMed" HeaderText="Form Of Medication" UniqueName="FormOfMedCol" ReadOnly="true" />
            <telerik:GridBoundColumn DataField="Prescription" HeaderText="Rx or OTC" UniqueName="PrescriptionCol" ReadOnly="true" />
            <telerik:GridBoundColumn DataField="ForAllergies" HeaderText="For Allergies?" UniqueName="ForAllergiesCol" ReadOnly="true" />
            <telerik:GridDropDownColumn DataField="FormOfMed" HeaderText="Form Of Medication" UniqueName="FormOfMed" Visible="false" ReadOnly="false" />
            <telerik:GridDropDownColumn DataField="Prescription" HeaderText="Rx or OTC" UniqueName="Prescription" Visible="false" ReadOnly="false" />
            <telerik:GridDropDownColumn DataField="ForAllergies" HeaderText="For Allergies?" UniqueName="ForAllergies" Visible="false" ReadOnly="false" />
 
            <telerik:GridButtonColumn ButtonType="LinkButton" Text="Remove" CommandName="Delete" />
        </Columns>
    </MasterTableView>
</telerik:RadGrid>

2 Answers, 1 is accepted

Sort by
0
Michael
Top achievements
Rank 1
answered on 19 Nov 2014, 04:54 PM
Update:  I had the grid wrapped in an asp:UpdatePanel. Removing the UpdatePanel removes the error, however I prefer using the grid with ajax.
0
Maria Ilieva
Telerik team
answered on 24 Nov 2014, 11:54 AM
Hello Michael,

Can you please let us know if you are using AjaxControlToolkit references in your application and if yes, try removing them form the project and see how it works?
Also please try replacing the asp UpdatePanel with RadAjaxPanel and see if this makes any difference.

Regards,
Maria Ilieva
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
Tags
Grid
Asked by
Michael
Top achievements
Rank 1
Answers by
Michael
Top achievements
Rank 1
Maria Ilieva
Telerik team
Share this question
or