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

[Solved] Combox in GridEditMode PopUp

7 Answers 78 Views
ComboBox
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
James
Top achievements
Rank 1
James asked on 05 Nov 2010, 04:28 PM
Ok, my combox works fine on the index.aspx.

Error: Microsoft JScript runtime error: Object doesn't support this property or method.
Fails at line:

 

 

 

 

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> 

 

 


When I put it in the editor I use for the Grid it fails.

 

<%= Html.Telerik().ComboBox() 
.Name("AjaxComboBox") 
.AutoFill(true) 
.DataBinding(binding => binding.Ajax().Select("_GetFARPart","home")) 
.Filterable(filtering =>
 {
 filtering.FilterMode(
 AutoCompleteFilterMode.StartsWith); 
 })
.HtmlAttributes(new { style = "width:350px" }) 
.HighlightFirstMatch(true) 
%>

7 Answers, 1 is accepted

Sort by
0
Atanas Korchev
Telerik team
answered on 05 Nov 2010, 05:06 PM
Hi James,

 There was a known bug which was causing similar behavior. Please download the service pack from this forum thread and give it a try.

Regards,
Atanas Korchev
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
James
Top achievements
Rank 1
answered on 23 Nov 2010, 05:36 PM
I downloaded the newest MVC controls and tried to implement a drop in a the GridEditMode popup.

I now get this error/ text.

%3cform action="/" id="form0" method="post"%3e%3cdiv class="validation-summary-valid" id="validationSummary"%3e%3cul%3e%3cli style="display:none"%3e%3c/li%3e %3c/ul%3e%3c/div%3e %3cinput id="ASAPAirworthinessDirectiveID" name="ASAPAirworthinessDirectiveID" type="hidden" value="" /%3e %3cinput id="ASAPAirworthinessDirectiveProductID" name="ASAPAirworthinessDirectiveProductID" type="hidden" value="" /%3e %3cinput id="FARPartId" name="FARPartId" type="hidden" value="" /%3e %3cinput id="ProductTypeId" name="ProductTypeId" type="hidden" value="" /%3e %3cinput id="WingTypeId" name="WingTypeId" type="hidden" value="" /%3e %3cdiv class="editor-label"%3e %3clabel for="FARPart"%3eFAR Part%3c/label%3e %3c/div%3e %3cdiv class="editor-field"%3e %3cinput id="FARPart" name="FARPart" type="text" value="" /%3e %3cspan class="field-validation-valid" id="FARPart_validationMessage"%3e%3c/span%3e %3c/div%3e %3cdiv class="editor-label"%3e %3clabel for="FARPartDescription"%3eFAR Part Description%3c/label%3e %3c/div%3e %3cdiv class="editor-field"%3e %3cinput id="FARPartDescription" name="FARPartDescription" type="text" value="" /%3e %3cspan class="field-validation-valid" id="FARPartDescription_validationMessage"%3e%3c/span%3e %3cdiv class="t-widget t-combobox t-header" id="ComboBox" style="width:500px"%3e%3cdiv class="t-dropdown-wrap t-state-default"%3e%3cinput class="t-input" id="ComboBox-input" name="ComboBox-input" type="text" /%3e%3cspan class="t-select t-header"%3e%3cspan class="t-icon t-arrow-down"%3eselect%3c/span%3e%3c/span%3e%3c/div%3e%3cinput id="ComboBox-value" name="ComboBox" style="display:none" type="text" /%3e%3c/div%3e%3cscript type="text/javascript"%3e jQuery('#ComboBox').tComboBox({autoFill:false, highlightFirst:false, ajax:{"selectUrl":"/home/_GetFARPart"}}); %3c/script%3e %3c/div%3e %3cdiv class="editor-label"%3e %3clabel for="Make"%3eMake%3c/label%3e %3c/div%3e %3cdiv class="editor-field"%3e %3cinput id="Make" name="Make" type="text" value="" /%3e %3cspan class="field-validation-valid" id="Make_validationMessage"%3e%3c/span%3e %3c/div%3e %3cdiv class="editor-label"%3e %3clabel for="MakeModel"%3eMake/Model%3c/label%3e %3c/div%3e %3cdiv class="editor-field"%3e %3cinput id="MakeModel" name="MakeModel" type="text" value="" /%3e %3cspan class="field-validation-valid" id="MakeModel_validationMessage"%3e%3c/span%3e %3c/div%3e %3cdiv class="editor-label"%3e %3clabel for="ProductType"%3eProduct Type%3c/label%3e %3c/div%3e %3cdiv class="editor-field"%3e %3cinput id="ProductType" name="ProductType" type="text" value="" /%3e %3cspan class="field-validation-valid" id="ProductType_validationMessage"%3e%3c/span%3e %3c/div%3e %3cdiv class="editor-label"%3e %3clabel for="WingType"%3eWing Type%3c/label%3e %3c/div%3e %3cdiv class="editor-field"%3e %3cinput id="WingType" name="WingType" type="text" value="" /%3e %3cspan class="field-validation-valid" id="WingType_validationMessage"%3e%3c/span%3e %3c/div%3e %3cdiv class="editor-label"%3e %3clabel for="WingTypeDescription"%3eWing Type Description%3c/label%3e %3c/div%3e %3cdiv class="editor-field"%3e %3cinput id="WingTypeDescription" name="WingTypeDescription" type="text" value="" /%3e %3cspan class="field-validation-valid" id="WingTypeDescription_validationMessage"%3e%3c/span%3e %3c/div%3e %3cbr /%3e %3cinput type="submit" value="Save" /%3e %3c/form%3e%3cscript type="text/javascript"%3e //%3c![CDATA[ if (!window.mvcClientValidationMetadata) { window.mvcClientValidationMetadata = []; } window.mvcClientValidationMetadata.push({"Fields":[{"FieldName":"FARPart","ReplaceValidationMessageContents":true,"ValidationMessageId":"FARPart_validationMessage","ValidationRules":[]},{"FieldName":"FARPartDescription","ReplaceValidationMessageContents":true,"ValidationMessageId":"FARPartDescription_validationMessage","ValidationRules":[]},{"FieldName":"Make","ReplaceValidationMessageContents":true,"ValidationMessageId":"Make_validationMessage","ValidationRules":[]},{"FieldName":"MakeModel","ReplaceValidationMessageContents":true,"ValidationMessageId":"MakeModel_validationMessage","ValidationRules":[]},{"FieldName":"ProductType","ReplaceValidationMessageContents":true,"ValidationMessageId":"ProductType_validationMessage","ValidationRules":[]},{"FieldName":"WingType","ReplaceValidationMessageContents":true,"ValidationMessageId":"WingType_validationMessage","ValidationRules":[]},{"FieldName":"WingTypeDescription","ReplaceValidationMessageContents":true,"ValidationMessageId":"WingTypeDescription_validationMessage","ValidationRules":[]}],"FormId":"form0","ReplaceValidationSummary":false,"ValidationSummaryId":"validationSummary"}); //]]%3e %3c/script%3e
0
Atanas Korchev
Telerik team
answered on 23 Nov 2010, 05:41 PM
Hi James,

 This looks like some output generated by the grid and not like an error. Could you please attach a sample showing the error which you are getting?

Regards,
Atanas Korchev
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
James
Top achievements
Rank 1
answered on 23 Nov 2010, 05:55 PM
Here is my partial view: I've also included my screenshot.

<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<Models.EditableProduct>" %>
  
    <% using (Html.BeginForm()) {%>
        <%: Html.ValidationSummary(true) %>
          
        <%: Html.HiddenFor(model => model.ASAPAirworthinessDirectiveID)%>
        <%: Html.HiddenFor(model => model.ASAPAirworthinessDirectiveProductID)%>
        <%: Html.HiddenFor(model => model.FARPartId)%>
        <%: Html.HiddenFor(model => model.ProductTypeId)%>
        <%: Html.HiddenFor(model => model.WingTypeId)%>
             
        <div class="editor-label">
            <%: Html.LabelFor(model => model.FARPart) %>
        </div>
        <div class="editor-field">
            <%: Html.TextBoxFor(model => model.FARPart) %>                
            <%: Html.ValidationMessageFor(model => model.FARPart) %>
        </div>
              
        <div class="editor-label">
            <%: Html.LabelFor(model => model.FARPartDescription) %>
        </div>
        <div class="editor-field">
            <%= Html.Telerik().ComboBox()
            .Name("ComboBox")
            .DataBinding(binding => binding.Ajax().Select("_GetFARPart", "home"))
            .HtmlAttributes(new { style = "width:500px" })%>
        </div>
              
        <div class="editor-label">
            <%: Html.LabelFor(model => model.Make) %>
        </div>
        <div class="editor-field">
            <%: Html.TextBoxFor(model => model.Make) %>
            <%: Html.ValidationMessageFor(model => model.Make) %>
        </div>
              
        <div class="editor-label">
            <%: Html.LabelFor(model => model.MakeModel) %>
        </div>
        <div class="editor-field">
            <%: Html.TextBoxFor(model => model.MakeModel) %>
            <%: Html.ValidationMessageFor(model => model.MakeModel) %>
        </div>
              
        <div class="editor-label">
            <%: Html.LabelFor(model => model.ProductType) %>
        </div>
        <div class="editor-field">
            <%: Html.TextBoxFor(model => model.ProductType) %>
            <%: Html.ValidationMessageFor(model => model.ProductType) %>
        </div>
              
        <div class="editor-label">
            <%: Html.LabelFor(model => model.WingType) %>
        </div>
        <div class="editor-field">
            <%: Html.TextBoxFor(model => model.WingType) %>
            <%: Html.ValidationMessageFor(model => model.WingType) %>
        </div>
              
        <div class="editor-label">
            <%: Html.LabelFor(model => model.WingTypeDescription) %>
        </div>
        <div class="editor-field">
            <%: Html.TextBoxFor(model => model.WingTypeDescription) %>
            <%: Html.ValidationMessageFor(model => model.WingTypeDescription) %>
        </div>
              
        <br />
        <input type="submit" value="Save" />
    <% } %>
0
Atanas Korchev
Telerik team
answered on 23 Nov 2010, 06:16 PM
Hi James,

Perhaps this is caused by another issue which is not addressed by the build you have downloaded. I am attaching a more recent build which you can try.

Regards,
Atanas Korchev
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
James
Top achievements
Rank 1
answered on 23 Nov 2010, 08:03 PM
I now get a javascript error, see screenshot.

0
Atanas Korchev
Telerik team
answered on 24 Nov 2010, 08:33 AM
Hi James,

 I am not sure what is causing this JavaScript error. Please attach a sample project which reproduces the error. I will investigate it and see what needs to be done.

Regards,
Atanas Korchev
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Tags
ComboBox
Asked by
James
Top achievements
Rank 1
Answers by
Atanas Korchev
Telerik team
James
Top achievements
Rank 1
Share this question
or