I'm using a gridview to extract a set of records. I need to add another field to the gridview, which can calculate the difference between a date associated with each record and the current date. Ideas?
View Complete Post
I need a form that displays three columns drawn directly from a database (no problems here) as well as two fields that require some complex calculations. Not only am I lost as to how to incorporate the calculations into the control, I don't know exactly how to write the calculations. I am working in Visual Web Developer 2008 with Vb.NET.
The first of the two fields should take the sum of all payments made by a given customer and divide it by a DailyMembershipRate, returning a DaysPaid variable. It should take this variable and a CustomerSince field for that particular customer and calculate a PaidThrough field.
The second of the two columns similarly requires the DaysPaid variable described above. It should subtract the CustomerSince field from the current date and return the value in days, giving a MembershipDays variable. Finally, it should subtract MembershipDays from the DaysPaid variable, again returning a value in days, and then multiply this by the DailyRate value for a Credit/Deficit field.
I realize this is a lot, but I haven't been able to find any documentation either online or in VWD or ASP.NET texts on this topic. I could really use some fellow user input. I would really appreciate any help or general direction you're willing to offer. Thanks a
I am currently in the process of writing a facebook type 'activity feed' for a site. Currently I am binding the last 10 items to a repeater control, which contains a usercontrol representing each item. This works fine but there are a couple of requiremnts that are giving me problems and wondered if the the good people of the forum could make some suggestions.
The requirement is that when a user clicks a refresh button any new events are added to the top of the list, the previous items drop down and the equivalent number of old items drop off the bottom, all with nice slider transitions.
I have put the repeater inside of an update control and are able to handle the transitions by using RegisterStartup script to drop jquery calls onto the page for the slider. However I cannot find a way to dynamically add or remove new datarows to the repeater. I need the old items to stay in the repeater and be pushed down by the new items, so completely refreshing the datasource seems like a bad idea.
I was thinking about maybe storing the datasource in the viewstate and adding rows to that, maybe with an extra column on the end which stores what transition is needed on the databind for my jquery, but there will be a 'View more items' link at the bottom of the page, so I am worried that the list could get pretty large and there
I have a vb.net Sub that is successfully adding 'records' to my XML file:
Private Sub btnSubmit_Click(ByVal sender As System.Object, _ ByVal e As System.EventArgs) Handles btnSubmit.Click 'for adding an XML 'record' Using ds As New DataSet() ds.ReadXml(Server.MapPath("History1.xml")) Dim dr As DataRow = ds.Tables(0).NewRow() dr("subject") = txtNewEvent.Text dr("year") = DateTime.Now.ToString("MM/dd/yy") ds.Tables(0).Rows.Add(dr) ds.WriteXml(Server.MapPath("history1.xml")) bind() txtNewEvent.Text = "" E
This problem just started happening in my entire site collection. Anytime I associate a workflow to any list or doc lib the Workflow column that shows the status and links to the history is not beind added to the list or any views and is nowhere to
be found. Here's exactly what I'm doing:
1. Go the List settings -> workflow settings -> add a workflow (for this example the OOB approval workflow)
2. After adding I go to the List, the workflow column doesn't exist.
3. I go to "modify view", and the workflow column is not listed in the available columns.
Any help is greatly appreciated.
I would like to know how can we build a custom field control in sharepoint. Following is the scenario i am looking into it:
1. Textbox control with browse button
2. When we click on browse button, need to display a popup (like business data dialog box) where i can search for project id from oracle datasource and then select the project id(s) from the search results. Selected project id(s) must be concatenated with
colon or semi colon and display back to original text box.
I guess requirement is very clear. Please help me how to do this type of things in sharepoint. I have never done these type of requests earilier. Thank you very much for you help.
my goal is to create a custom field control based on a custom field, to be part of a custom content type which derives from a publishing page. Also I want the custom field control to be part of a custom page layout which is associated with my custom content type.
I followed the steps from Patrick Tisseghems book 'Inside MOSS2007', which includes the following instructions:
I did of all the above plus IÃÂ created a page layout in SharePoint Designer which contains an instance of my CustomFieldControl.
When IÃÂ create an instance ofÃÂ CustomPage (derived content type from Publishing Page, with extra field of type CustomField) with my custom page layout and add it to the Pages library of my Publishing site, everything seems to go fine. When i edit properties of the pageÃÂ with /Pages/Forms/EditForm.aspx I can even edit the custom field value trough the interface using mu custom field control! Everything seems to work perfectly!