Good day All, I need your help, I want to generate Position from a list of record for a particular user
- //I have a table Named Mark
- MarkID UserId SubjectName TotalScore
- 1 20 English 60.00
- 2 21 English 70.00
- 3 20 Maths 80.00
- 4 21 Maths 80.00
- // From the Table above i want to automatically generate Subject position for each each user in a gridview like this
- MarkID UserId SubjectName TotalScore Postition
- 1 20 English 60.00 2
- 3 20 Maths 80.00 1
- How do i automatically generate the subject position on it
- Normally this is what i have tried so far to get the list of a particular record
- var acc = from c in cdc.Marks where c.userId = "20" select c).tolist();
- gridview1.datasource = acc;
- gridview.datindind();
- //The above code only generate the student records and displays it on a gridview but automatically generating Position without is what i am looking for.. Please your help is really needed..
- Thanks in advance
Vinay SinghPosted Jul 5, 2016, 6:35 AM
Postition =i,
t.MarkID,
t.UserId ,
t.SubjectName,
t.TotalScore
});
Nitin SontakkePosted Jul 5, 2016, 6:31 AM
pius joshuaPosted Jul 4, 2016, 8:47 AM
Nitin SontakkePosted Jul 4, 2016, 8:31 AM