jquery - 在kendo多个子网格配置中,名称不会受到严重影响
我有一个主要的Kendo网格和一个子网格的模板定义。子网格名称由主网格的ID组成,就像那样;
//
// ViewController.swift
// SOSapp
//
// Created by Max Segal on 7/22/15.
// Copyright (c) 2015 Max Segal. All rights reserved.
//
import UIKit
import CoreLocation
import MessageUI
class ViewController: UIViewController, CLLocationManagerDelegate, MFMailComposeViewControllerDelegate{
@IBOutlet var statusLabel: UILabel!
let locationManager=CLLocationManager()
var locationString=""
override func viewDidLoad() {
super.viewDidLoad()
if ( MFMailComposeViewController.canSendMail() == false){
var alert=UIAlertController(title: "No email account", message: "No email account - can't send SOS message. Be strong!", preferredStyle: UIAlertControllerStyle.Alert)
alert.addAction(UIAlertAction(title: "Ok", style: UIAlertActionStyle.Default, handler: nil))
self.presentViewController(alert, animated:true, completion:nil)
exit(0)
}
locationManager.delegate=self
locationManager.desiredAccuracy=kCLLocationAccuracyBest
locationManager.requestWhenInUseAuthorization()
locationManager.startUpdatingLocation()
}
override func didReceiveMemoryWarning() {
super.didReceiveMemoryWarning()
// Dispose of any resources that can be recreated.
}
@IBAction func sosButtonPressed(sender: UIButton) {
var emailTitle = "SOS message"
var messageBody = "Please help me out! I am here:\n\(locationString)"
var recipient=SosSender.emailAddress
var mc = MFMailComposeViewController()
mc.mailComposeDelegate=self
mc.setSubject(emailTitle)
mc.setMessageBody(messageBody, isHTML:true)
mc.setToRecipients([recipient])
self.presentViewController(mc, animated: true, completion: nil)
statusLabel.text="Sending SOS email to " SosSender.emailAddress "\nLocation: " locationString
}
func locationManager(manager: CLLocationManager!, didUpdateLocations locations: [AnyObject]!) {
CLGeocoder().reverseGeocodeLocation(manager.location, completionHandler: { (placemarks, error) -> Void in
if (error != nil) {
println("Error: " error.localizedDescription)
return
}
if (placemarks.count > 0) {
let pm = placemarks[0] as! CLPlacemark
self.locationString=self.locationInfoToString(pm)
println("Debug:" self.locationString)
}else{
println("Error with data")
}
})
}
func locationInfoToString(placemark: CLPlacemark) -> String
{
self.locationManager.stopUpdatingLocation()
return placemark.locality "\n" placemark.administrativeArea "\n" placemark.country;
}
func locationManager(manager: CLLocationManager!, didFailWithError error: NSError!) {
println("Error: " error.localizedDescription)
}
//Email delegate
func mailComposeController(controller: MFMailComposeViewController!, didFinishWithResult result: MFMailComposeResult, error: NSError!) {
switch result.value {
case MFMailComposeResultCancelled.value:
println("Mail Cancelled")
case MFMailComposeResultSaved.value:
println("Mail Saved")
case MFMailComposeResultSent.value:
println("Mail Sent")
case MFMailComposeResultFailed.value:
println("Mail Failed")
default:
break
}
self.dismissViewControllerAnimated(false, completion: nil)
}
}
我尝试访问子网格whith jquery:
.Name("Orders_#=EmployeeID#")
变量网格未定义。似乎子网格的Name属性" Orders _#= EmployeeID#"没有得到很好的解释。查看网页源代码,我找不到网格的组合名称,但找不到错误的解释ID"订单_#= EmployeeID#"。
这是一个已知的错误吗?
最佳答案:
1 个答案:
答案 0 :(得分:0)
我对我的回答并不十分肯定,但我认为这可能会对你有所帮助
尝试转义EmployeeID decleration中的哈希标记,如下所示
.Name("Orders_\#=EmployeeID\#")
本文经用户投稿或网站收集转载,如有侵权请联系本站。