2014-07-21 70 views
0

Kendo網格中的一列是「Notes列」(至少有3000個字符)。Kendo ui網格(web)行高,固定單元格高度

現在我面臨的問題是網格單元格(與該行一起)展開爲單元格中字符的大小。這使我的手機變得龐大。

我想使網格單元格具有固定數量的字符,並在單元格上有工具提示。

我不知道我是否可以實現它。

請讓我知道上述情況的可能解決方案。

嘗試過的一些CSS的變化:在列(注)

.k-grid tbody tr{height:38px;} //Not working 

樣本數據的單元: 17/11/2010 - Not received many enquiries, uses Extra Sure and Holmans. Finds our Medical Screening too lengthy. Took her through system and printed off Mes Screen questions, will use us more than N J Heritage. She will aim to use us for new enquiries.
16/02/11 - L/M - R/C.
08/03/2011 - JCO - Spoke to Matthew Salmon, not finding us competitive been using ExtraSure who are a lot cheaper. Advised our USP's and our benefits. Will use us for next travel enquiry.
16/06/11
- Jane spoke to Richard and will be taking him through the system, SunWorld Plus.
12/10/11-I Have spoken to Richard, I have emailed across details of Sunworld Extra & medical screening along with Username & Password. MP
01/11/2011- JCO spoke to Richard, Richard issuing a quotation today, likes that we don't have any age limits and restricted to 85 on AMT policies.  First time to use us, usually use Citybond, likes the look of our product. JCO advised to contact me if requires detailed explanation of system. 
25/05/12 - MW - Spoke to Richard, he is very nice, I thanked them for their continued support in using SunWorld and I am sending him the email with the Special Features and the SunWorld Extra info.. He said he rates SunWorld 8 and a half out of ten because he would like to see the option to increase the single article limit and also the rates have gone up quite a bit recently.. He said they don't really do that much travel but they are going to be pushing it over the next year because he said he thinks people are getting fed up of going on the internet to get insurance and realising they aren't actually covered for anything... He is generally happy with everything.
08/08/12 - MW - Spoke to Luke, I asked why they hadn't used us since June and he said it was just because of a slow down in enquiries.  Travel is not something they push, they just offer it to accommodate their existing clients.  He said the only use us and one other provider so any enquiries they do get they always quote with us, he has done some quotes this week but they haven't come back.  They are very happy with everything.  No problems etc.  I am sending him the Special Features for 2012 and also SunWorld Extra info,
16/08/12 - MW - Spoke to Richard, asked if they would be interested in having a poster, he said it would not really be of any use to them as they are not a high street broker, they are in an office and not customer facing, he said they don't really do much travel, they are mainly a commercial broker but they are happy with any travel business they can do, what they would like is a flyer as opposed to a poster so they can email it out to their customers.  He said he thinks the product is great, likes the age limits and limits etc,

14/11/12 - MW - Spoke to Luke, told him about Snowman Cover and Broker Survey.

04/12/12 - MW - Spoke to Luke, he said they are really quiet at the moment.  Only using SunWorld but just not getting the enquiries.  he is happy with SunWorld though and I have told him about the Changes for 2013.

08/02/13 - MW - I can see that they said back in August that they would like some leaflets so I am sending them some out.

28/02/13 - MW - Luke has sent this email  - "Sorry, not sure if you are still doing this but can we havesome leaflets to send with our renewals to try and offer your services J thanks" , So I am sending them out some more leaflets.

01/05/13 - MW - Spoke to Richard, he said the main person who does the travel, Luke, is on holiday in Turkey for the rest of the week and will be back on Tuesday.  I have made a note in my diary to give him a call back on Wednesday.

08/05/13 - MW - Spoke to Luke, he said SunWorld are their main travel provider, they have not really had many enquiries for travel lately.  He said our rates are competitive for annual but people can get travel insurance so cheap online now that he thinks they have just been doing that.  I said we will reduce the rates for him and he said that would be good.  They are also set up to use us via the AXA route which he said is fine to be deactivated and they will carry on using this one as they have been.  He said he would like some leaflets as he never received the last lot so I have checked his address and I am sending out 20 more.  I told him about the new product and I am sending him the email with the Underwriting Changes and Special Features for 2013. RATES REDUCED

01/07/13 - MW - Spoke to Luke, he said they are only using SunWorld so they must have not had any enquiries and that's why they haven't used us in the last month.  He said they only really offer travel insurance to accommodate their existing clients, they don't really push for it.  He said they have got the leaflets and they will be sending them out with renewals etc.  As soon as they get the enquiries, we will be getting the business.

13/09/13 - MW - Spoke to Richard, told him about the new product going live on the 1st October.  I am sending him the email with the Underwriting Changes and Special Features for 2013.  He said they would like some leaflets so I have confirmed their address and I am sending out 20.

01/11/13  - MW - Spoke to Richard, he said they are very quiet at the moment, their customers are not going away and that's why they haven't issued anything. Luke is the main person who deals with this and he will be our contact going forward because he is the one who deals with it most of the time.  I told Richard about the video tutorial and he is going to tell Luke and he will let us know if he has any queries.  I am sending the email with the New Special Features and further information on the changes we have made to the website. [email protected]

02/01/14 - MW - Spoke to Luke, I have confirmed all the contact information is correct and I have added his email address to the spreadsheet for the 2014 mailer and then he will forward it around to all the others.  He said they only use SunWorld and it is the easiest to use, they just haven't had any enquiries for travel.  I am sending him the email with the New Special Features and information about the changes we have made to the system.  He said he has asked for some leaflets before but he has not received them.  He really wants some to send out with all his renewals so I am sending him out 60 leaflets.

回答

3

除了限制行的高度,你不得不說,文字中的多餘部分應該隱藏起來。

嘗試添加以下樣式:

.k-grid tbody tr td { 
    overflow: hidden; 
    text-overflow: ellipsis; 
    white-space: nowrap; 
} 

見這裏:http://jsfiddle.net/OnaBai/8U6rg/1/

爲了顯示你需要使用包括CELL既作爲titlecontent值的模板tooltip。一個字段列定義的例子叫做name

{ 
    field: "name", 
    title: "Name", 
    template: "<span title='${name}'>${name}</span>" 
} 

見這裏:http://jsfiddle.net/OnaBai/8U6rg/3

編輯:如果你想顯示工具提示的HTML格式的文本,則無法使用標準工具提示和你將不得不使用KendoUI工具提示。

要做到這一點,你必須做的:

  • 爲了顯示該小區作爲HTML的內容,你應該添加選項encoded設置爲false,是這樣的:

    { 
        field: "name", 
        title: "Name", 
        encoded: false 
    } 
    
  • 接下來,要爲此使用KendoUI工具提示,我們要做的是爲每個單元創建一個KendoUI工具提示窗口小部件。你應該這樣做,一旦電網被渲染,所以我這樣做是在電網的dataBound處理程序:

    數據綁定:函數(){ $( 「#電網」)kendoTooltip({ ...。 }); }

  • 要限制什麼提示我要紀念與CSS類onabai細胞,所以現在我的專欄的定義是:

    { 
        field: "name", 
        title: "Name", 
        encoded: false, 
        template: "<span class='onabai'>#=name#</span>" 
    } 
    

而且在工具提示dataBound是:

dataBound: function() { 
    $("#grid").kendoTooltip({ 
     filter: ".onabai", 
     position : "left", 
     width: 200, 
     ... 
    }); 
} 

但是,我們仍然不得不說要怎麼樣的內容ltip。爲此,我們必須定義一個content屬性並定義一個返回網格中單元格內容的函數。我們這樣做是使用e.target.html()

dataBound: function() { 
    $("#grid").kendoTooltip({ 
     filter: ".onabai", 
     position : "left", 
     width: 200, 
     content: function(e) { 
      return e.target.html(); 
     } 
    }); 

你可以看到這個運行位置:http://jsfiddle.net/OnaBai/8U6rg/8/

+0

隊友謝謝你的提示。它將部分工作。由於我的數據是HTML格式,因此單元格大小會擴大。我不能解決任何問題。現在我關閉了該列的編碼屬性並應用了上述修復。它的工作。事實上,我想修復與HTML內容。 – Binny

+0

不是列中的數據是HTML格式的.... – Binny

+0

http://www.image-maps.com/m/private/0/2vnb8dqo5hd0t69nsve3ep4gb7_kendo_issue.png – Binny