Details View #15

 Hi there. I have the following situation:

I have a item template in the detail view which I'm using that to bind data from the data base, retrieving informationn like Semester Period.

So in the detail view, I would have many pages of events that had participated by a student. Usually events dates are different. 


How can I try to allow the methods to take into consideration the dates that the event is and pull out the specified semester period?

I tried to use a FOR LOOP. but it didnt work:

  For i = 0 To dtEventRec.Rows.Count - 1
                    str = dtEventRec.Rows.Item(i).Item("ENDDATE").ToString
                    str2 = WebService.GetYear(str)
                    CType(dtvEvent.FindControl("lblSem"), Label).Text = str2
5/5/2009 3:56:58 AM 72751 articles. 3 followers. Follow

1 Replies

Similar Articles

[PageSpeed] 40
Get it on Google Play
Get it on Apple App Store


I'm not sure if I follow, but if you are trying to access a control with a TemplateField of the DetailsView then you can do something like this:

For Each dvRow As DetailsViewRow In DetailsView1.Rows
    If dvRow.RowState = DataControlRowState.Normal Then
        Dim lbl As Label = DirectCast(dvRow.FindControl("Label1"), Label)
        If lbl IsNot Nothing Then
            'do something
        End If
    End If

"Code, Beer and Music" that's my way of being a programmer!

How to get your Forum Question Answered | Blog | CodeASP.NET
5/5/2009 5:09:42 AM

Similar Artilces:

Linking a Details View control to a Gridview Control
Can anyone tell me how to connect a details view control to a gridview control?  I'm trying to display certain fields in a details view, when a user clicks Select in the Gridview.   Thanks Hello, do you want to go to a new page or do you want to have it displayed inside of the gridview? or maybe under the gridview control?Still in search of the far side.--------------------------------A code snippet may help you, but a reference to the doc will teach you something for later...Don't just try to solve somebody's problem with a snippet, teach him how to solve it. U...

Control design details and Collection items keep disappearing from VS.Net 2003 design view
This is a major nuisance. I don't know for how long, but for quite some time, I have experienced most (sometimes all) design work in certain controls like Farpoint Spread View, Component Arts Suite, DotnetCharting and possibly others simply vanish from VS.Net 2003. It seems to happen when switching between html and desing view, and/or when closing/reopening projects.I have contacted the different Component vendors, but according to them, this behaviour cannot be reproduced. Does it have something to do with a previous install of Whidbey Beta 1? Only yesterday I tried to reinstall VS.Net...

grid view and detail view with drop down box in the detail view.
I have grid view control and detail view control.  When the grid view control select edit, the detail view drop down list will have the current value. Also it have have selection .  dropdow list will have F, M. See the code below.  Thanks.     <body> <form id="form1" runat="server"> <TABLE style="FONT-FAMILY: arial" cellSpacing=0 cellPadding=0 width=100% align=left border=0> <TR align=center ><TD style="HEIGHT: 20px" borderColor=#000080 align=center width=960 bgColor=green colSpan=3...

details view within a details view?
hi i was wondering how to bind data to a details view that is already inside a details view? btw i am using code behind datasource you can use the outer detailsview pre_render event, and there by using findcontrl() method you can find the inner detailsview. then assign the datasource to it. and bind the data to it.protected void DetailsView1_PreRender(object sender, EventArgs e) { DetailsView dvInner = (DetailsView)DetailsView1.FindControl("dvInner");  // here dvinner is the id of the innerdetailview specified in itemtemplate of the outer detailsview dvInner.DataSource =...

Master/Detail Form using Gridview and Details View controls
There are useful codes in the following page: Introducing the ASP.NET 2.0 GridView and DetailsView Controls used code under Listing 12. Creating a Master/Detail Form and everything worked fine. But when I clicked the master record to view the details I am getting a server error message "Cannot find column [@EmployeeID]" Where did I go wrong? Can anybody clarify?...

How to make the width of Detail View control consisten when updating, viewing or inserting data?
I have a DetailsView control on my website, and I notice when I edit, insert or simply displaying a record, the width of the fields vary. To make them consisten, I converted all of the fields to templateField, and had to change the 'width' property for each field within each template (ItemTemplate, EditTemplate, InsertTemplate). Is this the best or most efficient way of standardizing the DetailsView field widths? Perhaps there is a way to simply state the width once and all fields within DetailsView will inherit that value?Thanks, for more granular control over your detailview layo...

can't get records to update using grid view control or details control
Hi  I am using Visual Studio Web Developer 2005 Express and have set up a web page with a Grid View.  Everything works great, but when I click the EDIT link and make a change to a field, and then click UPDATE, it returns to the normal grid view form, but the change has not been made ??  I have the same proble using the details view object.  I do not get any errors, but the changes just do not seem to be made to the SQL table data. Any help would be greatly appreciated !   Thanks Chuck Hi Chuck, Can you verify you have DataKeyNames set in your GridView...

Master Details in two seperate GridView Controls
I am simply trying to have a list of people in the top grid control (works fine), then when selected have the second Grid Control show details for that person(not working). Here is what I am trying from the load event: Sub BindData() Dim myConnection As New MySql.Data.MySqlClient.MySqlConnection(System.Configuration.ConfigurationManager.AppSettings("ConnectionSql")) Dim strPersonSQL, strActSQL As String strPersonSQL = "select row_id, first_name, last_name, middle_initial, dsi_id, created, created_by, program_of_study, email from tbl_person" Dim myPerCommand As New MySqlClient.MySqlComm...

Group controllers and view in folders under the /Controllers and /Views folders
I'm working on an application that has a few different parts, so I want to have urls like this:/PartA/controller/action/PartB/controller/actionI would like create folders named PartA and PartB under the Controllers and Views folders. I also want them to be in their own namespaces. What kind of routes should I add for this so they are found with the above urls?Thanks! Hi random0xff, You can put your Controller classes in any folders or namespaces you like. When looking for the controller "Blah", the framework will scan all your referenced assemblies for a class called BlahCon...

Details View: How to grab an ID from a button in Details View
I have a gridview that lists all the battles(records) and displays the details of a selected record using a Details View.  I want to have a button inside the detail view and once the user clicks it , I need to display a seperate form and it has a selected ID with it. So how do I get the ID from the details view and process it accordingly? I'm pasting my code below Thanks <html> <head id="Head1" runat="server"> <title>GridView DetailsView Master-Details (1 Page)</title> </head> <body> <form id="fo...

Data presentation control in another Data presentation control
 Hello,I want to make a menu with datalist or gridview control.Basically,the menu will be like this,Categories     Sub Categories.For example, for COMPUTING category there will be NOTEBOOKS DESKTOPS etc.There will be a image for CATEGORIES and linkbuttons with Subcategories.If I put a datalist inside a datalist and a link button inside the second datalist visually it satisfies my need.However,CommandArguments come from database to linkbutton.Andwhen one of these command buttons is cliked it must go to proper page.I dont know how to wrie an event_handler ,specifically, for...

Problem with view control redirecting to another view control
I have a module with an ascx view control and a second ascx view control with key MakeTest When the user  clicks in a hyperlink i'm using this in order to redirect him to the other view control: Response.Redirect(Globals.NavigateURL(TabId, "MakeTest", "mid=" + ModuleId)); This works, but when you're on the second view control (MakeTest) the other modules from the same tab dissapears as when you're in edit mode Can't this be avoided somehow? I have a banners module at the top in all pages, but it's very sad to see it dissapear when i'm still in view mode. Please help me,Thanks BT...

Can't drag any control INTO a view control... places new control at top right of design view.
VS 2005 created new web site.On default.aspx design view I added a Multiview control. I then added a View control within that.Here's the problem.  I can't place any controls inside of the view control.  If I drag a new button from the toolbox into the view control that I have in place, the button ends up in the top left of the design view. If I then Cut and paste the button into the View control, the button still ends up outside of the view control in the top left corner of the design view. What's causing this?  I have seen this done in many of the w...

navigate from Edit control back to the view control when the view control needs parameter in the url ( ver 2.1.2)
Hi, I am writing a module for 2.1.2. The view control is loaded based on a "&itemId=" parameter appended to the url. The module has Edit and Add controls. I use the same ascx page for both (register the same page twice as Add and Edit). Navigation to the Edit is done by using EditUrl("itemId", itemId, "Edit") and navigation to the Add is done by using EditUrl("itemId", -1, "Add"). This goes well. The problem is going back from both Edit and Add to the view, when clicking update, delete or cancel. I've tried EditUrl("itemId",itemId, "") going back from the Edit, but I get the "mid=...

Web resources about - Details View #15 -

File:Government-Vedder-Highsmith-detail-1.jpeg - Wikipedia, the free encyclopedia
English: Detail from Government . Mural by Elihu Vedder. Lobby to Main Reading Room, Library of Congress Thomas Jefferson Building, Washington, ...

Facebook Files 10-Q With SEC, Details Mobile Users, Zynga, Lawsuits, Other Issues
Following its second-quarter earnings call last Thursday, Facebook filed its 10-Q quarterly document with the Securities and Exchange Commission ...

Details on Social Reporting - Facebook
Facebook Safety hat eine Notiz mit dem Titel Details on Social Reporting geschrieben. Du kannst den vollständigen Text hier lesen.

More Details on “Facebook Questions” — Plenty of Notifications, No Privacy Controls
Questions is a new in-house Facebook application we examined on Monday that allows users to post questions, tag them with topics, and vote on ...

Hackers seek shoppers personal details over bank accounts, new study finds
Hackers hoping to steal people's financial details are moving away from targeting banks and are instead focusing on the big online stores.

Walmart announces details surrounding its big Cyber Monday sale
Walmart’s massive Black Friday event will be followed by an equally impressive Cyber Monday sales bonanza, but with a huge twist. This year, ...

U.S. reveals new details on shootdown of Russian plane
Latest details come as Putin takes action in response to Turkey shooting down warplane

First on CNN: New U.S. intel bulletin provides details of Paris attack plans
The bulletin, which was described to CNN and confirmed by other U.S. officials, advises local law enforcement to go over active shooter scenarios ...

Motorola Details Upcoming Cyber Monday Deals, 25% Off Moto X
Motorola is gearing up Cyber Monday, like everyone else on the Interwebz, detailing the deals you can expect to see on its website. Right now, ...

Troublesome details arise about 'Clock Kid' Ahmed's arrest
The attorney for Ahmed Mohamed revealed new details about the September events in Texas in a letter sent to both school and city officials in ...

Resources last updated: 11/29/2015 4:54:02 PM