lKinder_Bueno

Untitled

Jul 22nd, 2019
20
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. @page "/"
  2. <EjsGrid DataSource="@gridData" Height="100%" Width="100%" AllowSelection="true" AllowPaging="true">
  3.  
  4. <GridPageSettings PageSize="2"></GridPageSettings>
  5.  
  6.  
  7.  
  8. <GridColumns>
  9. <GridColumn Field=@nameof(Channel.Image) HeaderText="foto" Width="120">
  10. <Template>
  11. @{
  12. var ch = context as Channel;
  13. <img src="@ch.Image" alt="" />
  14. }
  15. </Template>
  16.  
  17. </GridColumn>
  18. <GridColumn Field=@nameof(Channel.Name) HeaderText="Name" Width="120"></GridColumn>
  19. <GridColumn Field=@nameof(Channel.Group) HeaderText="Group" Width="150"></GridColumn>
  20. </GridColumns>
  21. </EjsGrid>
  22.  
  23. @code{
  24. public List<Channel> gridData { get; set; }
  25. protected override void OnInit()
  26. {
  27.  
  28. List<Channel> order = new List<Channel>();
  29. order.Add(new Channel { Name = "test1", Group = "Group A", Image = "Not avaible" });
  30. order.Add(new Channel { Name = "test2", Group = "Group B", Image = "https://png.pngtree.com/template/20190529/ourmid/pngtree-logo-chat-tv-image_206663.jpg" });
  31. order.Add(new Channel { Name = "test3", Group = "Group A", Image = "https://upload.wikimedia.org/wikipedia/commons/thumb/e/ed/HD-TV_Logo.svg/800px-HD-TV_Logo.svg.png" });
  32.  
  33. gridData = order;
  34. }
  35. }
RAW Paste Data

Adblocker detected! Please consider disabling it...

We've detected AdBlock Plus or some other adblocking software preventing Pastebin.com from fully loading.

We don't have any obnoxious sound, or popup ads, we actively block these annoying types of ads!

Please add Pastebin.com to your ad blocker whitelist or disable your adblocking software.

×