Can assign/bind URL to C1LightBox item inside the C1GridView ItemTemplate?

Originally Posted 21 May 2013, 7:26 am EST

  • Originally Posted 21 May 2013, 7:26 am EST

    I have added a C1LightBox and a C1LightBoxItem inside a ItemTemplate of a C1GridView.

    When I try to bind the URL column to the C1LightBoxItem, it says:

    Error Creating Control - C1Tabs1Databinding expressions are only supported on objects that have a DataBinding event. C1.Web.Wijmo.Controls.C1LightBox.C1LightBoxItem does not have a DataBinding event.


    Can I dynamic assign the URL according to the column data of the grid?
  • Reply

    HI,

    Can you tell me the way you did so, as I tried this on my end, by creating a template column in grid and then binding it to the lightbox items.

    <wijmo:C1GridView ID="C1GridView1" runat="server" AutogenerateColumns ="True" >
    <Columns>
    <wijmo:C1TemplateField HeaderText="Item Template" >
    <ItemTemplate>
    <wijmo:C1LightBox ID="C1LightBox1" runat="server">
    <Items >
    <wijmo:C1LightBoxItem ID="LightBoxItem1" Title="Sport1" Text="Sport1"
    ImageUrl="http://lorempixum.com/120/90/sports/1"
    LinkUrl="http://lorempixum.com/600/400/sports/1" />
    </Items>
    </wijmo:C1LightBox>
    </ItemTemplate>
    </wijmo:C1TemplateField>
    <wijmo:C1HyperLinkField HeaderText="HyperLink" NavigateUrl="http://www.google.com">
    </wijmo:C1HyperLinkField>
    </Columns>
    </wijmo:C1GridView>
  • Reply

    For instance, the ImageURL of C1LightBoxItem cannot bind to the same datasource which is used by the C1GridView:












  • Reply

    Try to post the code in the C1LightBoxItem again:

    ImageUrl=''[lt][pct][sharp]Bind["Image"][pct][gt]'
Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels