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

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

accessing checkbox list from with in edit item template.

Posted By:      Posted Date: October 14, 2010    Points: 0   Category :ASP.Net

Protected Sub dsEmployeesByDepartments_Selecting(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.SqlDataSourceSelectingEventArgs) Handles SqlDataSource1.Selecting
        'Determine which checkboxes have been checked
        Dim selectedDepartmentIDs As New List(Of String)
        For Each li As ListItem In CategoryList.Items
            If li.Selected Then

View Complete Post

More Related Resource Links

listview 3.5 bind dropdownlists edit item template VB.NET


I am trying to do this with many issues of data binding doubling the amount and not setting selectedValue on dropdownlist. I have read some posts and they help but I am missing a crucial piece. My problem is that my dropdownlist is doubling the amount of records for the dropdownlist. Instead of "YES;NO;SELECT A VALUE", I am getting "YES;NO;SELECT A VALUE;YES;NO;YES;NO". My database is correct with the UPDATE part but the rebind after update is failing horribly.

Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
        If IsPostBack Then
            If Session("ACTIVETAB").ToString() = Session("SUBCONTRACTSATABNO").ToString() Then
            End If
        End If
    End Sub

    Public Function loadlookups(ByVal id As String, ByVal e As System.Web.UI.WebControls.ListViewItemEventArgs) As DataTable
        Select Case id
            Case "ddlCertReceived"
                dt = GetLookupTable("SubcontractsA", "Sub 1 Cert Received")
                Dim ddlCertReceived As DropDownList = _
                CType(e.Item.FindControl("ddlCertReceived"), DropDownList)
                ddlCertReceived.DataSource = dt
                ddlCertReceived.DataTextField = "lup_text"

Cannot enable Ribbon Edit Tab buttons and "connect" them to a list item in my custom webpart

I have one list with some custom fields and I want to develop a custom page. So, I created an ASPX page and added my custom webpart. This webpart has just a RichTextField, in edit mode, "linked" to one item of the list, like below: SPSite _SPSite = SPContext.Current.Site; SPWeb _SPWebProjects = _SPSite.OpenWeb("/Projects"); SPList _SPListProject = _SPWebProjects.GetList("/Projects/Lists/Project"); int _ID = Convert.ToInt32(this.Page.Request.QueryString["ID"]); RichTextField _RTF = new RichTextField(); _RTF.ID = "RTF"; _RTF.ControlMode = SPControlMode.Edit; _RTF.FieldName = "History"; _RTF.ItemContext = SPContext.GetContext(HttpContext.Current, _ID, _SPListProject.ID, _SPListProject.ParentWeb); _RTF.RenderContext = SPContext.GetContext(HttpContext.Current, _ID, _SPListProject.ID, _SPListProject.ParentWeb); this.Controls.Add(_RTF);   Then, I "turned on" the edit tab on the ribbon by doing the follow: protected override void OnPreRender(EventArgs e) { SPRibbon _CurrentRibbon = SPRibbon.GetCurrent(this.Page); _CurrentRibbon.TrimById("Ribbon.WebPartPage"); _CurrentRibbon.MakeTabAvailable("Ribbon.ListForm.Edit", string.Empty); _CurrentRibbon.MakeContextualGroupInitiallyVisible("Ribbon.ListForm.Edit", string.Empty); _CurrentRibbon.Minimized = false; _CurrentRi

Refresh Parent Page List after Edit Item Modal Dialog Save/Close

I am calling the Edit Item URL (EditForm.aspx?ID=x&IsDlg=1) via javascript code to bring up the Edit Item Modal Dialog. This works fine and dandy. But what callbackfunction should I invoke after the Save so that the parent list is refreshed? Is there a better way to do it than call reload on the entire parent frame? It almost looks like there should be a way to refresh just the list. Any help appreciated. Thanks, Jake.

Edit item title in a list on a mobile page

hello, can i edit an item title for a list on a mobile page in MOSS 2010 ? e.g i want my list items to appear as "New task StartDate:current EndDate:current" that includes three things the list title,startdate and enddate for the item. thanks

Dropdown select message in item template gridview dropdwon list ???

Hi ....I have used gridview item template , which has two dropdown list .The first dropdown list is binded from database to the dropdown list I have using the below code , to show the select message in dropdown list before selecting any item from dropdown list.In first row its show me --Select-- message and my vaues.. if i select some value form dropdownlist and click add new button it will create a new row dynamic then in previous row again it come back --Select-- message... on going to second row....I need to remain first row user selected value on going to next row.The New row will show --select-- message..Please go to my code and let me know what to do<asp:DropDownList id="DropDonList2" tabIndex=11 runat="server"          OnSelectedIndexChanged="DropDonList2_SelectedIndexChanged" AutoPostBack="True"          DataTextField="SizeRange" DataValueField="SizeRange"          OnDataBound="DropDonList2_DataBound" __designer:wfdid="w10"          AppendDataBoundItems="True">  <asp:ListItem Value="-1">Select</asp:ListItem> </asp:DropDownList><asp:DropDownList id="DropDonList2" tabIndex=11 runat="server" 

Access Denied Error While trying edit sharepoint list item


 I have a sharepoint site (2007) with two subsites . while I am trying to edit  list items in subsite its giving me Access denied error even though I have the Site collection Admin Rights. 

     Please help . 

How to make a sharepoint list column readonly or invisible while add/edit list item in sharepoint UI


 Hi Everybody,

I have created a list in sharepoint. In that list there is a field which I want to make read only or invisible when the user tries to add or edit a list item through sharepoint UI. I want this because that particular field gets populated through a webpart and direct data entry into that field is unnecessary. Is there any way to make a sharepoint column (for me its a picture column) read only or invisible in the sharepoint UI.

thank you,

Arun Dutt

Custom List Edit Item Form


If I change the default querystring variable from ID to CustomID then it doesn't show the relevant record from the list.

I did this to avoid an error

"No item exists at http://moss-server:18498/pagescollection/EditGroupMeetingPlannerForm.aspx?ID=88.  It may have been deleted or renamed by another user."

What should i do, to avoid this error. Plz help me.

Change "linked to item with edit menu" in a list.

In a custom list imported from spreadsheet can you change the "linked to item with edit menu" to another column othe rthan the defaut?

No title displayed in the "New" item creationfor a list based on a created list template.


Hello everybody,

I have a problem with a sharepoint list template. I created a custom list in MOSS2007 that I saved as template. The problem is that the new list based on that saved template doens't display the Title (changed on project's name) when I want to create a new item. So after creating new items, their Project's Name (Title) is set to (none) for all of them because I couldn't specify any Project's Name (Title).

I was back to my original list and when I create a new item, the Project's Name is displayed so I can fill it. I searched in the list settings and nothing was special.

The columns are required in both lists, there is no management of content types (maybe a hidden field but NO!), the list is a typical list with basic settings.

Has someone an idea?

I want to reuse this list and the Project's Name (Title) is very important (!).


Thank you.

Edit Item link pointing to wrong list

I made a list from a template. The Edit Item link in this new listlist is pointing to the wrong list (one that doesn't exist any longer - the one the template was made from) and so I get a 404 page error.  I have modified the list properties in Designer to point to the correct list/listfile. Then when I try the edit link I get "an unexpected error has occurred."  Is there a way to correct this or am going to have to recreate the list and not use a template.  What is the point of using a template if it points to the wrong list?
There are no mistakes; every result tells you something of value about what your are trying to accomplish.

how to customize the WSS3.0 List layout for new item and edit item.


is there a easy way to format the layout of items of a list, defaut is from top to bottowm:

Item1, value1

Item2, value2


Can I layout out like :

item1, value1; item 2, value2

Item3, value3

Item4, value4;item5, value5?


Open a list item edit form with workflow

I have a workflow that creates a new item in another list.  I need the workflow to open the new item on the Edit form.  Is this possible?  Any assistance would be greatly appreciated.  Thank you.

Edit List Item - Access Denied


There are supposed fixes for this but I cannot get a decent reply so i am posting a new thread. I am getting the same error as what was in this thread.


I want to run the script but cannot without getting an error.

Can I get step by step of how to run this script? Save the code into what? Run from what? On server or workstation?

I am a sharepoint admin, not a developer so I'm a bit clueless when it comes to code language...

using System;
using System.Collections.Generic;
using System.Text;
using Microsoft.SharePoint;
using System.Xml;

namespace CA_TestingHotfix
  class Program
    static void Main(string[] args)

    static void FixField(string[] args) 

New List Item Vs. Edit List Item


Okay, I have a WF that works on NEW created Items only, But, if the item gets Rejected and then the Creator goes back into the Request/list Item and fixes what he has wrong, it changes the Status back to Pending, which is fine, but it doens't go through the process again treating it like a New Request, kicking off the WF for NEWLY created items.

What do I do??
Trying to figure it out. Any help would be greatly appreciated..

Show confirmation dialog on list item edit

When users edit a  list item and click o.k.  How can I show a dialog box to confirm ( yes / no) the change. 

Editable Gridview with Textbox, CheckBox, Radio Button and DropDown List

This is an example of an editable gridview containing different ASP.NET controls. When user wants to edit values in gridview, she/he can use these controls to edit existing values in Gridview Edit Mode.

Using the Code
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