[CLOSED] gridpanel - component column ToolTip

  1. #1

    [CLOSED] gridpanel - component column ToolTip

    Hi,

    Mine is an asp.net MVC Razor View application.

    I have a gridpanel having component column. The component column has Combobox.
    Following is the markup of the ComponentColumn.

    Html.X().ComponentColumn()
                                                    .Editor(true)
                                                    .Sortable(false)
                                                    .DataIndex("cpt")
                                                    .Flex(1)
                                                    //.Listeners(ls => ls.Edit.Fn = "cmbCPTChange")
                                                    .Text("cpt")
                                                    .Component(Html.X().ComboBox()
                                                    .Editable(false)
                                                    .EmptyText("Select cpt")
                                                    .ValueField("cptCD")
                                                    .DisplayField("cptDESC")
                                                    .Listeners(ls => ls.Change.Fn = "SetDirty")
                                                    .Store(Html.X().Store()                                                            
                                                                .Model(Html.X().Model()
                                                                           .Fields(
                                                                                   new ModelField("cptCD", ModelFieldType.String),
                                                                                   new ModelField("cptDESC", ModelFieldType.String)
                                                                                  )
                                                                      )
                                                                .DataSource(Model.cptList)
                                                    )
    I have used below ToolTip control to show tooltips.

    @(Html.X().ToolTip().ID("ttpgrdPackPriceAttributes")
                .Target("={#{grdPackPriceAttributes}.getView().el}")
                .Delegate(".x-grid-cell")
                .TrackMouse(true)
                        .Listeners(ls => { ls.Show.Handler = "onShow(this, #{grdPackPriceAttributes});"; })
    )
    The issue am facing is on mouseover of the component column row cell in the tooltip it shows 'ValueField' value instead of 'DisplayField'

    Below is the snap of it.
    Attached Thumbnails Click image for larger version. 

Name:	tooltip show valuefield value.png 
Views:	44 
Size:	9.7 KB 
ID:	15461  
    Last edited by Daniil; Oct 09, 2014 at 7:10 PM. Reason: [CLOSED]
  2. #2
    Hi @PriceRightHTML5team,

    I guess it shows the cell's value according
    .DataIndex("cpt")
    as it is written in the onShow method.

    You should probably change the onShow method.
  3. #3
    Hi Daniil,
    Thanks for your reply.I updated the onshow() function and it worked.

    Further i need to add tooltip to the combobox list items. Thus, i added ID to the combobox.

    Html.X().ComponentColumn()
                                                    .Editor(true)
                                                    .ID(cmbEx_Factory)
                                                    .Sortable(false)
                                                    .DataIndex("cpt")
                                                    .Flex(1)
                                                    //.Listeners(ls => ls.Edit.Fn = "cmbCPTChange")
                                                    .Text("cpt")
                                                    .Component(Html.X().ComboBox()
                                                    .Editable(false)
                                                    .EmptyText("Select cpt")
                                                    .ValueField("cptCD")
                                                    .DisplayField("cptDESC")
                                                    .Listeners(ls => ls.Change.Fn = "SetDirty")
                                                    .Store(Html.X().Store()                                                           
                                                                .Model(Html.X().Model()
                                                                           .Fields(
                                                                                   new ModelField("cptCD", ModelFieldType.String),
                                                                                   new ModelField("cptDESC", ModelFieldType.String)
                                                                                  )
                                                                      )
                                                                .DataSource(Model.cptList)
                                                    )
    And added a new tooltip control.

    @(Html.X().ToolTip().ID("ttpcmbEx_Factory")
                .Target("={#{cmbEx_Factory}.list}")
                .Delegate(".x-combo-list-item")
                .TrackMouse(true)
                            .Listeners(ls => { ls.Show.Handler = "this.body.update(this.triggerElement.innerHTML);";  })
    )
    But tooltip is not getting shown.
  4. #4
    I think it is better to start a new forum thread.
    Last edited by Daniil; Oct 09, 2014 at 7:35 PM.

Similar Threads

  1. [CLOSED] Checkboxlist in gridpanel component column
    By PriceRightHTML5team in forum 2.x Legacy Premium Help
    Replies: 4
    Last Post: Sep 12, 2015, 12:26 PM
  2. Replies: 2
    Last Post: Aug 21, 2014, 8:55 AM
  3. [CLOSED] Gridpanel component Column in CodeBehind
    By ebeker in forum 2.x Legacy Premium Help
    Replies: 3
    Last Post: Nov 07, 2013, 9:39 PM
  4. Replies: 2
    Last Post: Jun 27, 2013, 10:18 PM
  5. [CLOSED] GridPanel Column Tooltip
    By sadaf in forum 1.x Legacy Premium Help
    Replies: 10
    Last Post: Feb 02, 2011, 10:34 AM

Tags for this Thread

Posting Permissions