Forms Data Controls :: Multiple Items In Gridview Or Datalist?
Jan 30, 2010
I have a webform that functions as a kind of a timesheet. The way it works now is that a user selects a project from a dropdownlist, the enters a date and the amount of hours worked. After that the user selects the link button "register" and the worked hours are registered and the result will be shown in a datalist (for each project a new one). Is there some possible way to show a user in advance all the projects he is authorized for in a datalist or so, so he can fill out the hours for all the projects at once? Now the selection for a project from the dropdownlist is a problem for some users cause they have a lot if projects and it is quit a workload on the manor now.
I would like to display students and their grades with a GridView and LinqToSQL like this:
I found this topic but it doesn't answer my question: http://forums.asp.net/t/1557987.aspx
I have a many-to-many relationship between students and assignments called "grades".The grade for the assignment is stored in that table in a "gradeNumber" column.The many-to-many relationship seems to be a problem.I tried adding a TemplateField to my grid:
It doesn't work: ...student does not contain a property with the name grade.
It does work when I use class.name however to get a student's class he is in.In code students .grade.something works however My LINQ entities are extended with custom code to allow me to retrieve studentx.Assignments or assignmentx.Students.(I would also like to specify which assignments should be displayed in the grid.)
I have a requirement to show the GoogleMap in DataList/Repeater for each row. I have the Latitude and longitude, address for each row in table. Below code works fine. but i am not able to show the map with each row of DataList.
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="GoogleMap.aspx.cs" Inherits="GoogleMap" %> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
i want to use a Datalist to list products from sqldatasource. When i select the Product i would like to retrieve the associate Product value in the code behind page so that i may use it to display data in Grid.
i have div control.... inside i am having datalist control .but i want to make all datalist items with same size and spacing between items should be the same. whatever width of the div tag .but no. of items should be adjusted in that area i have repeatcolumns =3 but it could be any no. so it should get adjusted. i have list of images to be display in datalist.
Sql select statement returns: customer_name, month, and count. There is one row per month as follows:
name-1, 01, count1
name-1, 02, count2
name-1, 03, count3
name-2, 01, count4
I want to be able to display as follows:
There will be some customer that don't have a month record. The display can show all 12 months.
My questions are: 1) Is datalist or gridview the best? 2) Where can I find examples of how to do this? 3) Also, an example of "no data" for a month. I'm a beginner, have been trying to research, but can't seem to get headed in the right direction.
I have two ListBoxes. I can move items from one list box to the other. I have an Insertcommand for inserting added values from the "ActivePrograms" list box to a db.
my problem is that it inserts only one item when sometimes the user added multiple items.
how do I insert all existing items from "ActivePrograms" list box?:
second issue: how do I make sure the insert command go through the list of items in the listbox and makes sure these rows does mot already exsited in the db? in other words insert only NEW values for that 'Id' value
I am trying to hide 2 buttons depending on the value in the dropdownlist. It works when the page is initially loaded but chokes when returning to the page sometimes. I have some pretty simple code in the Page_Load event within an If Not Page.IsPostBack statement