我创建了新类来从xml文件中读取数据.
我已宣布上课了
public class Validations
{
public string id { get; set; }
public List<string> lhsList { get; set; }
public List<string> rhsList { get; set; }
}
Run Code Online (Sandbox Code Playgroud)
XML 我想读的是
<root>
<Validation id="val3">
<lhs id='Estimated' />
<lhs id='Newqurter' />
<rhs id='Current' />
<rhs id='FirstQuarter' />
</Validation>
.
.
.
</root>
Run Code Online (Sandbox Code Playgroud)
代码我写的是读取xml的
List<Validations> vList = new List<Validations>();
vList = (from XElement xele in xdoc.Root.Elements()
select new Validations
{
id = xele.Attribute("id").Value.ToString(),
// lhsList = ((xele.Elements().FirstOrDefault(p => p.Name == "lhs").FirstAttribute.Value
// rhsList …Run Code Online (Sandbox Code Playgroud) 知道如何使用columnDefs如下属性
var table = $('#myTable').DataTable( {
columnDefs: [
{ targets: [> 0], visible: true}
]
} );
Run Code Online (Sandbox Code Playgroud)
我可以这样做吗?
我需要定位除第一列之外的所有列。