के अंदर केंडो-यूई ग्रिड इनपुट पर इनपुट फोकस कैसे सेट करें बूटस्ट्रैप मोडल के अंदर अपना केंडो-यूई ग्रिड ले जाने से पहले मैं एड पंक्ति पर क्लिक करूंगा और 3 इनपुट में से पहला चयन किया जाएगा। मैं फिर टैब को दूसरे, फिर तीसरे और फिर टैब को चेकबॉक्स बटन पर रखूंगा जहां मैं एंटर दबाता हूं और पंक्ति जोड़ दी जाएगी। फिर फोकस ऐड पंक्ति बटन पर वापस जायेगा जहां मैं फिर से प्रक्रिया शुरू करने के लिए एंटर दबा सकता हूं। ठीक है अब यह एक मोडल के अंदर है, मैंने टैबबिंग को छोड़कर सब कुछ खो दिया है। मुझे ऐसे समाधान मिल गए हैं जो फोकस लागू करने के लिए jquery का उपयोग करते हैं लेकिन मेरे पास पहले से ही मेरे ग्रिड नियंत्रक के अंदर है।बूटस्ट्रैप मोडल
केंडो-ui ग्रिड नियंत्रक
$scope.mainGridOptions = {
dataSource: dataSource,
pageable: false,
toolbar: [{ name: "create", text: "Add Product", }],
columns: [
{ field: "product", title: "Product", width: "95px", editor: productEditor },
{
field: "price", title: "Price", width: "95px", format: "{0:c2}", editor: priceEditor
},
{
field: "sqft", title: "Square Feet", width: "95px", editor: sqftEditor
},
{
command: [{ name: 'edit', text: { edit: '', update: '', cancel: '' }, width: '20px' }, { name: 'destroy', text: '' }], title: ' ', width: '80px'
}],
editable: 'inline'
};
function productEditor(container, options) {
$('<input id="product" name="product" data-bind="value:product" data-productvalidation-msg="Put the Product!" />')
.appendTo(container)
.kendoMaskedTextBox({});
$("#product").focus(function() {
var input = $(this);
setTimeout(function() {
input.select();
});
});
};
function priceEditor(container, options) {
$('<input id="price" name="price" data-bind="value:price" data-step="10000" style="" data-productvalidation-msg="Put the Price!"/>')
.appendTo(container)
.kendoNumericTextBox({ format: 'c0', min: 0 });
$("#price").focus(function() {
var input = $(this);
setTimeout(function() {
input.select();
});
});
}
function sqftEditor(container, options) {
$('<input id="sqft" name="sqft" data-bind="value:sqft" data-step="500" style="" data-productvalidation-msg="Put the Sqft!"/>')
.appendTo(container)
.kendoNumericTextBox({ format: '0', min: 0 });
$("#sqft").focus(function() {
var input = $(this);
setTimeout(function() {
input.select();
});
});
};
मोडल
<!-- Grid Modal -->
<div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
<div class="modal-dialog modal-lg" role="document">
<div class="modal-content">
<div class="modal-header">
<div style="width:100%"><span class="modal-label">My Product Data</span><button style="float:right" class="btn btn-custom waves-effect" data-dismiss="modal"><i class="zmdi zmdi-close"></i></button></div>
</div>
<div class="modal-body">
<div kendo-grid id="grid" options="mainGridOptions"></div>
</div>
</div>
</div>
</div><!--End Grid Modal -->
समारोह को खोलने के लिए मोडल
$scope.openGrid = function() {
$('#myModal').modal('show');
};
कोशिश सहायक मार्कअप विशेषता ['role = document'] (http://www.w3.org/TR/wai-aria/roles#document) को हटाने के लिए यह देखने के लिए कि क्या वह है इस मुद्दे पर है। [ 'भूमिका = application'] (http: //www.w3।संगठन/टीआर/वाई-एरिया/भूमिका # आवेदन) अधिक प्रासंगिक हो सकता है। – Andrew