How to add a tip for Gridpanel's Columns ?

  1. #1

    How to add a tip for Gridpanel's Columns ?



    Hi everyone ,

    I have a Gridpanel with some Columns . Now one of its Column is name ,and its words is too long . So I want to add a tip for it when moving my mouse on it .That can show the all message for this Column .
    How can I realize this function?
    hope your help . Thanks!
  2. #2

    RE: How to add a tip for Gridpanel's Columns ?

    Hi,

    Try the following column renderers
    http://www.extjs.com/learn/Ext_FAQ_G...oolTip_or_Qtip
  3. #3

    RE: How to add a tip for Gridpanel's Columns ?



    Hi vladimir ,
    Thanks very much . And how can I use it ? Where can I use it when moving my mouse on it ?
    I have tried the code like this:
    <script type="text/javascript">
        ShowAll = function(data, metadata, record, rowIndex, columnIndex, store) {
            var qtip = '>';
            if (data >= 5) {
                qtip = " qtip='yeah'/>";
                return '";
                return '
    Then how can I call this function in my Gridpanel ? Thanks ....
  4. #4

    RE: How to add a tip for Gridpanel's Columns ?

    Hi,

    It is column renderer
    [code
    <ext:Column ....>
    <Renderer Fn="ShowAll"/>
    </ext:Column>
    ][/CODE]
  5. #5

    RE: How to add a tip for Gridpanel's Columns ?



    Yes , I have tried that first . But it has nothing ?
     <ext:Column Header="CustomerName" Sortable="true" DataIndex="CustomerName" Width="100" Align="Center">
         <Renderer Fn="ShowAll" />
    </ext:Column>
    That is all ? Thanks . J
  6. #6

    RE: How to add a tip for Gridpanel's Columns ?

    If you apply it to the CustomerName then how you can compare customer name with 5, it is nonesense
    if(data > 5){   // data is customer name value

    Please change that renderer to work with your data
  7. #7

    RE: How to add a tip for Gridpanel's Columns ?



    Yes . Thanks.If you mean the data is my CustomerName ? I have tried this:
    <script type="text/javascript">
        ShowAll = function(CustomerName, metadata, record, rowIndex, columnIndex, store) {
            var qtip = '>';
            if (CustomerName >= 5) {
                qtip = " qtip='yeah'/>";
                return '";
                return '
    But it says I am wrong again... I am a new learner .Hope your help.
    Thanks .
  8. #8

    RE: How to add a tip for Gridpanel's Columns ?

    Hi,

    No, I meant another thing.
    'data' contains your customer name, for example 'John'


    Why do you compare 'John' with 5


    in your renderer
    if(data >= 5){....

    it is equal the following
    if ('John' >= 5)

    As you understand you cannot compare string with number because result always is false
  9. #9

    RE: How to add a tip for Gridpanel's Columns ?



    Oh yes ! This time I really understand! Thanks very much!
    I have solved it with your help. ?

Similar Threads

  1. 2 different command columns in gridpanel
    By abelvn in forum 1.x Help
    Replies: 2
    Last Post: Aug 15, 2011, 4:59 PM
  2. [CLOSED] GridPanel with many columns
    By jmcantrell in forum 1.x Legacy Premium Help
    Replies: 1
    Last Post: Aug 04, 2011, 9:39 PM
  3. Can we merge columns in gridpanel
    By Satyanarayana murthy in forum 1.x Help
    Replies: 2
    Last Post: Feb 26, 2010, 9:51 AM
  4. gridpanel columns and rows
    By gpcontreras in forum 1.x Help
    Replies: 1
    Last Post: Feb 02, 2010, 10:26 PM
  5. GridPanel Frozen columns
    By fabiomarcos in forum Feature Requests
    Replies: 6
    Last Post: Aug 06, 2009, 9:45 AM

Posting Permissions