Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. ASP.NET
  4. Customizing DataGrid

Customizing DataGrid

Scheduled Pinned Locked Moved ASP.NET
question
4 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    moazzamahmed
    wrote on last edited by
    #1

    hi all, ok so I know you can link a DataGrid to a dataset and you get a table with all data columns & rows top down. Each of my data rows is event data with a date and title, for a month. How do I lay this in a calendar layout? Im sure I have to customize it but can I customize each row of a datagrid? thanks in advance. M

    R 1 Reply Last reply
    0
    • M moazzamahmed

      hi all, ok so I know you can link a DataGrid to a dataset and you get a table with all data columns & rows top down. Each of my data rows is event data with a date and title, for a month. How do I lay this in a calendar layout? Im sure I have to customize it but can I customize each row of a datagrid? thanks in advance. M

      R Offline
      R Offline
      Ritesh1234
      wrote on last edited by
      #2

      Hi, Why don't u try with Calender control.Capture the Day_Render event and add the lable control to show the EventData,Title etc in a day cell based on the date u fetch from database.. Regards, Ritesh

      M 1 Reply Last reply
      0
      • R Ritesh1234

        Hi, Why don't u try with Calender control.Capture the Day_Render event and add the lable control to show the EventData,Title etc in a day cell based on the date u fetch from database.. Regards, Ritesh

        M Offline
        M Offline
        moazzamahmed
        wrote on last edited by
        #3

        thanks for the idea Ritesh. its execellent. But Im trying it and the DayRender event doesnt fire. Am I missing something? page_load has this in it: calEvents.VisibleDate = DateTime.Today.Date; & then: protected void calEvents_DayRender(object sender, DayRenderEventArgs e) { if (e.Day.Date == DateTime.Today.Date) { e.Cell.BackColor = System.Drawing.Color.Pink; } } any ideas? thanks M

        M 1 Reply Last reply
        0
        • M moazzamahmed

          thanks for the idea Ritesh. its execellent. But Im trying it and the DayRender event doesnt fire. Am I missing something? page_load has this in it: calEvents.VisibleDate = DateTime.Today.Date; & then: protected void calEvents_DayRender(object sender, DayRenderEventArgs e) { if (e.Day.Date == DateTime.Today.Date) { e.Cell.BackColor = System.Drawing.Color.Pink; } } any ideas? thanks M

          M Offline
          M Offline
          moazzamahmed
          wrote on last edited by
          #4

          hmm, I got it to work. I had to add OnDayRender="calEvents_DayRender"> to the calendar control on the aspx design page. Why is that? I thought .net 2.0 didnt need that? M

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups