.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Register
 
Win Surprise Gifts!!!
Congratulations!!!


Top 5 Contributors of the Month
Sharon Maxwell
Post New Web Links

List and adding checkboxes

Posted By:      Posted Date: September 13, 2010    Points: 0   Category :Windows Application
 
Hello, I am using a TabControl on my Windows Form with several tabs. I have got checkboxes on each tab. When a user clicks on the button I will add selected checkboxes into a list control (List<CheckBoxes>). The problem is that the checkboxes are added into the list in very unusable order (e.g. the last (the lowest) checkbox on the tab is added before the first checkbox on the tab. How can I control the order the checkboxes are added into the list? Sorry for my English. Thanks.  


View Complete Post


More Related Resource Links

Way of adding items in Drop Down List or List Box using Javascript

  
The article Way of adding items in Drop Down List or List Box using Javascript was added by raja.s on Sunday, June 06, 2010.

Hi,script type="text/javascript"> function AddItem(Text,Value) { // Create an Option object var opt = document.createElement("option"); // Add an Option object to Drop Down/List Box document.getElementById("DropDownList"

Array List with unique id while adding student info

  
Hello Frds,

I'm having arraylist to add student info but i have to create unique id per record below is my class.

Student objStudent=new Student(123,"Nj");
statArray.Add(objStudent)

public class Student
{
  private string name;
private int RollId;
public string Name
{

    get { return name; }
set { name = value; }

  }
public int Id
{
    get { return RollId; }
set { RollId = value; }
   }
public Employee(string name, int id)
{

    {
this.name=name;
this.Id=id;
}
}





Workflow field not being added to list or views when adding a workflow

  

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.


Adding a list item that populates a particular part of a page

  
I am trying to create a list view in sharepoint designer that when you enter a list value it populates the right part of the page. Background - I am creating a list for a marketing newsletter that when you fill out the list form it will populate the marketing newsletter on page. its to save recreating it every month. the list has drop downs for addition and department and the data is inserted on the page. thanksSharepoint Customiser

How do you calculate a value in one list from the conditional adding of values in another list ?

  
I have a list (call it my first list) with a attribute of Initial Estimate (Hours) and a unique ID and want to conditionally search for that unique ID on another list (second list) and aggregate the Initial Estimate (Hours) on the second list to arrive at single value for my first list! Any ideas on how to do this?

Adding a custom form to List's FormCollection in code

  
Hello, In a site within a site collection, using SharePoint Designer 2010 we have created custom Display, Edit and View forms and assigned them to the Item content type of a custom list as it's default forms. When looking at the Forms property of the list, I can see all six forms listed: the three original forms (DispForm.aspx, EditForm.aspx, NewForm.aspx) and the three custom forms (displayifs.aspx, editifs.aspx, newifs.aspx). Each site in the site collection has this custom list and I want to add these three custom forms to the custom list in each site in the collection as the default forms for items. In code I have tried copying the files from the Item subfolder of the first custom list to the Item subfolder in each list in each site, and then setting the properties for the Item content type's default forms to point to these new files (e.g DisplayFormUrl = "~list/Item/displayifs.aspx"; EditFormUrl = "~list/Item/editifs.aspx"; NewFormUrl = "~list/Item/newifs.aspx";) and I have also copied the fourth file template.asxn to this folder in each list. However, I have not found how to add these new files to the Forms property of the list iteself, as this property is read-only. It still only contains the three default forms. Is this possible to do in code? When I try to open the Display form or Edit form in

Feature Upgrade Functionality - Adding a new Content Type and List Instance

  
I've successfully used the upgrade functionality in SP 2010 to upgrade my list structures as needed. So far, these updates have been adding new fields to existing content types. Now, I have some new fields, content types and list instances to add, and am having trouble getting this accomplished. The scenario is this: - A new content type with a single custom field (also new), and a list instance for this new content type - A new field that is a lookup back to the new list instance defined above. This new field is added as an existing content type. - In my feature.xml, I have the Element Manifest specified with both new fields and an AddContentTypeField element for the new field being added to an existing content type:   <ApplyElementManifests> <ElementManifest Location="V1_04\Elements.xml"/> </ApplyElementManifests> <AddContentTypeField ContentTypeId="0x0100..." FieldId="{8028A1C8-1147-4DF7-B5C3-8A1F84A30360}" PushDown="TRUE"/> The result of running the update on this feature is: - My new field that is part of an existing content type is added - My new field that is part of a new content type/instance is added - My new content type and list instance is NOT created, therefore my lookup is broken Any idea why my new Content Type and List Instance is not being created? Do I need to specify there

HELP - Problems with programatically adding checkboxes

  
Here is the setup. I programatically add a Canvas, a Grid, and within that grid are two columns of checkboxes. I have the Canvas there for querying purposes (makes it easier). The problem is that after the method executes that does all this and the form is displayed the canvas is visible, but the checkboxes aren't. When I set a breakpoint at the end of the method and check to make sure that all the Children are where they are supposed to be, they are all in their correct places. For what it's worth here is the code for the method. I cannot, for the life of me, figure out why they are not being rendered. They are there there when breaking down the items children for each of the controls. private void AddItemsToQuestion(Canvas pQuestionCanvas, XElement pQuestion) { List<XElement> pItems = (from c in pQuestion.Elements("Item") select c).ToList(); if (pItems.Count <= 0) return; int iNumberOfRows = (int)Math.Ceiling((double)pItems.Count / 2); //get the question canvas name Dictionary<string, object> pQuestionTag = ((Dictionary<string, object>)pQuestionCanvas.Tag); string sQuestionName = pQuestionTag["Name"].ToString(); Canvas pItemsCanvas = new Canvas(); pItemsCanvas.Width = pQuestionCanvas.Width; pItemsCanvas.Height = iNumberOfRows * 25; Thickness pThick

Feature Upgrade Functionality - Adding a new Content Type and List Instance

  
I've successfully used the upgrade functionality in SP 2010 to upgrade my list structures as needed. So far, these updates have been adding new fields to existing content types. Now, I have some new fields, content types and list instances to add, and am having trouble getting this accomplished. The scenario is this: - A new content type with a single custom field (also new), and a list instance for this new content type - A new field that is a lookup back to the new list instance defined above. This new field is added as an existing content type. - In my feature.xml, I have the Element Manifest specified with both new fields and an AddContentTypeField element for the new field being added to an existing content type:   <ApplyElementManifests> <ElementManifest Location="V1_04\Elements.xml"/> </ApplyElementManifests> <AddContentTypeField ContentTypeId="0x0100..." FieldId="{8028A1C8-1147-4DF7-B5C3-8A1F84A30360}" PushDown="TRUE"/> The result of running the update on this feature is: - My new field that is part of an existing content type is added - My new field that is part of a new content type/instance is added - My new content type and list instance is NOT created, therefore my lookup is broken Any idea why my new Content Type and List Instance is not being created? Do I need to specify there

Adding a column from another List to a Dataview? Must I link sources or can I just add a new data so

  
Using Designer, I added a dataview to a webpart page and dragged in a single list source. It works as expected. I now want a column from another list in my view. Must I link in another datasource, or can i just insert the data source for the second list into my datasources? The new datasource is there in the code and I see the caml select for it. but my XSL still does not find data: <xsl:value-of select="/dsQueryResponse/Master/Rows/Row[@ID = current()/@Key]/@Lastname" /> I noticed my new columns are not in the <datafields> tag, I tried adding them but it did not help. If Master is my lookup list , @Key is the dataview I will match with and @ID is the column in Master, and @Lastname column I want to return, is the above syntax correct? Many Thanks.    

Issue Adding a new Lookup Field to an existing List Instance

  
I have a code base that houses all of the column, content types, template, and list instance definitions. Am using the Update functionlaity a lot from version to version. Has been working well to this point. I just added two new columns (fields), one a Lookup and the other a Multi-Lookup. The fields are added fine on the update, columns look correct and the content type to which these were added also look fine. I can create a new List instance from the content type, and the new lookup columns are fine. The problem is this. Any existing list instances that were created from this same content type, now blow up when I try and access list items via the SP GUI. Something about a valid GUID, I dont't have the exect error anymore, but will repost it when I recreate the issue for the tenth time. I tried deleting the new lookup fields from this new list instance, thinking that I might be able to re-add them to fix the problem, but I get a new stack trace when I try and re-add them. Any hints on where I can start digging would be appreciated. I think I'll start with comparing the list instance schemas between an existing list and a newly created one.  

IE9, Site Specific Browsers, and adding your own Jump List Items to Pinned Tabs

  
Site Specific Browsers aren't a really new idea. In 2005 there was an app called Bubbles I ran for a while that would let you run a website with minimal "browser chrome." Mozilla Prism (né WebRunner) is a Firefox add-in that does a similar thing. Google Chrome includes the idea of Application Shortcuts. The idea of all this is that some web apps are really applications and you think about them as applications. For me, I think of Gmail and Facebook and Twitter and Basecamp as applications not necessarily as browser tabs. The notion of Site-Specific Browsers is definitely arriving. Internet Explorer 9 Beta (IE9) is out now and includes a featured called " Site Pinning " which is a effectively Site Specific Browsers. It's...(read more)

Adding Multiple hyperlinks to form connected to SharePoint 2010 list

  

I have a SharePoint 2010 list and am using an InfoPath 2010 form to create items. I am trying to allow users to reference other list items by inserting a hyperlink to other items in the same list. I have created a column in the list containing each items URL. I then created a drop down list in the InfoPath form that queries this column, so that it contains all the items URL’s. I also created a button and a hyperlink field in the InfoPath form. I would like the user to be able to choose an item from the drop down list, click the button and have the hyperlink inserted into the form. Then be able to choose another item from the drop down list, click the button and have another hyperlink inserted. I added a rule on the button that when clicked, sets the value of the hyperlink field to the value of the drop down item picked. This works, however, only allows for one hyperlink to be inserted.

I have also tried to use the multiple selection list box, by querying the URL column as the choices. This allows for multiple selections, however it shows up as text a

Adding folders to the List Template Gallery

  

The List Template Gallery in its initial form does not allow the user to add folders.

How would I go about modifying the List Template Gallery to allow folders to be created for organizing the list templates?

 

I tried looking in the 12\TEMPLATE\FEATURES for an item that matched the List Template Gallery but did not find one there.

 

Any ideas on where to look for this?

 


Adding Multiple hyperlinks to form connected to SharePoint 2010 list

  

I have a SharePoint 2010 list and am using an InfoPath 2010 form to create items. I am trying to allow users to reference other list items by inserting a hyperlink to other items in the same list. I have created a column in the list containing each items URL. I then created a drop down list in the InfoPath form that queries this column, so that it contains all the items URL’s. I also created a button and a hyperlink field in the InfoPath form. I would like the user to be able to choose an item from the drop down list, click the button and have the hyperlink inserted into the form. Then be able to choose another item from the drop down list, click the button and have another hyperlink inserted. I added a rule on the button that when clicked, sets the value of the hyperlink field to the value of the drop down item picked. This works, however, only allows for one hyperlink to be inserted.

I have also tried to use the multiple selection list box, by querying the URL column as the choices. This allows for multiple selections, however it shows up as text a

Adding Items to existing list using CAML

  
Does anyone know how to add list items (not files) to a SharePoint list using CAML?  I know how to do this in code but I was curious if it was possible in CAML. We can add files using the Module element quite easily and so I thought, why not list items?  It is possible to add list items to a new list using the Data element, but I am trying to add items to a list created earlier by another feature.
http://jcapka.blogspot.com

need help on programmatically adding .pdf file type to File Type list in Search Admin

  

This is easily done in the GUI but how do I program this?

I looked here - http://msdn.microsoft.com/en-us/library/ms562090(v=office.12).aspx and they just say - Extensions are grouped within an ExtensionCollection object. Use the Create method to specify a new file name extension.

Great but how do I do that - I'm not a coder and I need some pointers

I loaded the sharepoint assemblies:

[System.Reflection.Assembly]::Load("Microsoft.Office.Server.Search, Version=12.0.0.0, Culture=neutral,
PublicKeyToken=71e9bce111e9429c")

[System.Reflection.Assembly]::Load("Microsoft.Sharepoint, Version=12.0.0.0, Culture=neutral,
PublicKeyToken=71e9bce111e9429c")

[System.Reflection.Assembly]::Load("Microsoft.Office.Server, Version=12.0.0.0, Culture=neutral,
PublicKeyToken=71e9bce111e9429c")

Where do I go from here?

Cheers

 

Jonj


Categories: 
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend