Customizing DataGrid
-
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
-
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
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
-
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
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
-
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
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