I have a Sharepoint List which is sorted by a Report Date.
Within a Visual Webpart I have created an html report which references the ListItems. One of the options on this Webpart is to change the date. If the user changes the date I need to be able to retrieve the ListItem corresponding to that Date from the List. Using c#, how can I get a handle on the Item in this way?
Thanks
I think you have your answer here
http://snahta.blogspot.com/2009/04/getting-list-item-updated-in-past-few.html
Few more good tips # http://snahta.blogspot.com/2009/07/spquery-few-important-things.html
Related
I am attempting to populate a listbox with the contents of a directory. I have it populating but I need the creation date/time included in the list.
This is what I have so far:
var filter = Path.GetFileName(GlobalVariables.EbillFile);
listBox_Restore.DataSource = Directory.GetFiles(GlobalVariables.EbillBackupDirectory, $"{filter}.*", SearchOption.TopDirectoryOnly);
It gives me this:
ListBox Contents
How do I go about adding the date to this list? Should I be using a different control?
You should use DirectoryInfo.GetFiles() to get more information about each file - for instance created date, last used date, size etc.
And then use a ListView to show the result.
I have CalendarView on two pages.
First page is used to add records to calendar by assigning the selected date to the database record.
Second page is used to show all records assigned to the selected date.
Now, when on the first page I assign date to the product by clicking the date manually, on the second page product is shown correctly when selected date that corresponds to the products date.
However, when on the first page I add dates to the products programmatically, on the second page, these products are shown one day before than they should.
I have no idea what is happening. I will post code if you want to check something.
THe problem is strange, becaue on one calendar these automatically added dates are shown for example on 5th April, but on the second calendar they are listed under 4th April.
Is that the globalization of two calendars problem?
Locale(globalization ) would be a potential problem. But having code would help us to provide you more info.
I have managed to resolve the problem. It was in deed issue with DateTimeOffset/DateTime values.
I changed every instance of Date I found in the code by appending it with
.LocalDateTime
.
This way I got the correct local date of each DateTimeOffset object and data is added to/ pulled from the Calendar correctly.
I'm trying to do a sales report that lists each order with a little plus icon beside it, once clicked the order row should expand to show the order details. I'm using the reportviewer for the first time and having it working to show the basic order info.
What I'd like to have now is each row expand when clicked to show the order details. So row 1 might list the buyers name, address etc and when clicked you see what they bought.
Given that I'm totally new at this kind of reporting (never heard of Tablix before using this reportviewer) is there a relatively easy way of displaying this data?
did you check http://www.gotreportviewer.com/?
I am trying to list a list of client with cell for each employee. radcheduler type. If u click on each cell u can assign a new value at this date for this employee.
I though about place holder but someone says it is not efficient
any advice?
I was able to come up with something that works nicely and decide to work on it as a software for my own..Goood stuff !
I have an InfoPath form with custom C# code, and a Sharepoint list. I have a dropdownlist in the InfoPath form that I want to populate with a certain field from the Sharepoint list (I want the InfoPath dropdownlist to contain this field's value from every item in the Sharepoint list. I can successfully get the list of values I need from Sharepoint in my managed code, but I do not see how I can get these values into the dropdownlist (either bind to the list, or add each item in the list one by one). I thought I could modify the XML of the dropdownlist to insert my items, but the XML only contains the first item in the dropdownlist:
<my:RelatedRiskID xmlns:my="http://schemas.microsoft.com/office/infopath/2003/myXSD/2009-07-20T18:12:59">Option 1</my:RelatedRiskID>
I feel like this should be possible, but I can't find any resources on how to do it. Thanks in advance for the help.
If you plan to populate your dropdown list with a SharePoint list then you need to
create a data connection to the said SharePoint list
in the dropdown list Data tab, get the data externally and select the said data connection