English 中文(简体)
JQuery Flexigrid改动一栏标题案文?
原标题:change column header text on a JQuery Flexigrid?

我有一个支离破碎的弹性网,使我能动态变化,从而显示不同的表格数据。 我希望,随着数据来源的改变(通过Im成功进行的旋律),修改表栏标题,但能够说明如何这样做。 因此,例如,我想有一个弹性格表格显示雇员,然后如果用户点击链接,则用同样的弹性电网显示采购。 当用户作出这一改动时,一栏标题的案文需要反映采购栏标题,以便与JSON数据I miping匹配。 我再说一遍,除了标题案文外,没有任何问题需要做任何工作。 在用户选择采购表格时,我可以说明如何改变标题案文,以便在弹性电网上查看。

这一职位说明如何做些微调,我试图将其用作显示自己,但很快登上失败的船: flexigrid()

最佳回答

这样做可能有更好的办法,但行之有效。

   $( #test ).click(function() {
   var new_headers =new Array("Saab","Volvo","BMW");
    $("#flex").parent(".bDiv").siblings(".hDiv").find("table tr th div").each(function(x){
      $(this).text(new_headers[x]);
    });
  });

这里是被控告的 he。

 <div id="flexgrid">
    <table id="flex"></table>
  </div>

确保在装满或重载弹性电网后做到这一点。

  <input type="button" id="test" />
问题回答

暂无回答




相关问题
JQuery/MVC Search Issue

I have inherited a piece of work where the entry screen shows a summary of 20 calculated variables. E.g. Var A (250), Var B (79). Clicking on any of these links takes the user to a view with a ...

jQuery quicksearch plug-in tinkering with JSON

I ve implemented the quicksearch plugin by Rik Lomas and I love it for an application in a custom CMS I m building. I was wondering though, since I m going to have a bizillion items in the table if ...

JSON with classes?

Is there a standardized way to store classes in JSON, and then converting them back into classes again from a string? For example, I might have an array of objects of type Questions. I d like to ...

PHP json_decode question

i m trying to use json_decode to combine a few json objects and then re-encode it. my json looks like: { "core": { "segment": [ { "id": 7, "...

Converting JSON data to Java object

I want to be able to access properties from a JSON string within my Java action method. The string is available by simply saying myJsonString = object.getJson(). Below is an example of what the string ...

热门标签