I could use a little help if you can. I am new to Telerik and a relatively new programmer, so please bear with me as I try to explain my goal.
Essentially what I am trying to do is pivot records from a "View" in my database to produce a full year calendar using a radGridView as the container for the output. The radGridView is bound to a seperate SQL Server table. There are 12 records in the table and 33 columns.This table is only used as a template for the radGridView so all fields are null except for the two where I have set the month name and month #. The radGridView is to be used for visualization only and is not meant to allow for direct editing of records. The table I am using for the template has;
* 12 rows
- One row for each month ( RowIndex + 1 = month of the year)
* 33 Columns
- One column for the name of the month ( .ColumnIndex 0)
- One column for each possible day of the month ( .ColumnIndex 1 - 31). The day columns are named 1, 2, ..... ,31
- The last column in the grid ( .ColumnIndex 32) has the month number. Used for sorting only.
What I am trying to do is;
- Loop through each cell where the column index is between 1 and 31;
- Query a view in my database (There is a date field in the View where I have parted the day, month and year from the date into seperate columns)
- Return a record, if it exists, where
- day = .ColumnIndex
- month = Rowindex + 1
- Year = Textbox2.Text
- GPID = Textbox1.Text
- Set the Cell value to the string returned from the database
The "View" I am querying has 6 columns; GPID, AttDate, aDay, aMonth, aYear, Incidents
The following code works except that it sets each cell value in the columns to the first matching record it finds in the database.
What would I change to loop through each cell one at the time and set the value to the value returned from GetEntry?
Thanks for the help. Let me know if I have totally confused you and need to clarify myself.