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


Top 5 Contributors of the Month
satyapriyanayak
Subhransu Sekhar Jena
abhays
SP
DotnetUser
Post New Web Links

drop down list in form view

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

hi all..


i have create a simple form using form view...

in my form i have use DropDownList..(Id = DropDownList1)

when am trying use that dropdownlist in my cs page i can't get id..

what is the problem actually..




View Complete Post


More Related Resource Links

Change order for list view drop down

  
I may be overlooking something obvious, but I have not been able to find an easy way to sort the views available in the view drop down for lists.  We're migrating to 2010 from WSS 3.0 and currently, the view drop down is sorted alphabetically.   Help?

Form View: Filtering Drop down on insert using objectdatasource

  

Hi,

I have a grid view which display different phone types with insert,edit and delete options.

During insert in the modal formview I have dropdown for different phone types which is bound to an
object datasource. The object datasource displays all the available phone types including the ones
displayed in the gridview

How do I display only the values that is not in the gridview. I tried setting the object datasource to a different one
and it does not work ( in Item created event). It display no values in the dropdown when I know there is more than 1 availble.


How do I change the object datasource during insert or how do I filter the values in the dropdown.

THanks

Suresh'

 

protected void FormViewOnlinePhone_ItemCreated(object sender, EventArgs e)
{
         FormView fvPhone = (FormView)FindControl("FormViewOnlinePhone");

         DropDownList dropdownUsage = (DropDownList)fvPhone.FindControl("DropDownListPhoneType");
         DataSet dsType = new DataSet();
         if (FormViewOnlinePhone.CurrentMode == FormViewMode.Insert)
         { 
            dsType = psClass.GetInsertPhoneTypes(application_id);
              dropdownUsage.DataSource = dsType.Tables["usage"];
             dropdownUsage.DataTextField="NAME&quo

Custom List Form web part connection to data view

  
Hi

We have a sharpoint site to manage "projects".    That site includes a document library.  The documents uploaded to the library are categorised based on the project they belong to.

We are trying to implement a custom list form for editing a project record that does one of the following:

1. When the edit form is loaded for a particular projects record that edit form also shows a list of relevant documents.

or

2. Include a button or link on the edit form to another page that lists only the documents for the current project.

We thought this would be easy to do using web part connections.  If we click on the custom list form it gives us the option to setup a web part connection.  However, if you follow this wizard through and get to the stage of selecting columns to link, there are no columns listed for either the custom list form or for the target dataview.  This is the case whether the target data view is on the same page, ie in case of option 1 or on a different page as in case of option 2.

Could someone advise us how we could either get the web part connections between the custom list form and other dataviews to work or how we could hyperlink to a dataview and pass the id of the record currently being edited to that dataview as a filter?

We are using Sharepoint Designer so would appreciate any suggestions base

Drop down list inside Detail view

  

I am using a drop down list control inside Detail View but for some reason, its not picking up the selected value from database , secondly not being able to update the values either...Any idea?

<%@ Page Title="" Language="VB" MasterPageFile="~/__admin/_codefiles/Masterpages/admin.master"
    ValidateRequest="false" AutoEventWireup="false" CodeFile="ArticleTypeDetail.aspx.vb"
    Inherits="__admin_Admin_ArticleTypeDetail" %>

<%@ Register TagPrefix="tinymce" Namespace="Moxiecode.TinyMCE.Web" Assembly="Moxiecode.TinyMCE" %>
<asp:Content ID="Content1" ContentPlaceHolderID="HeadPlaceHolder1" runat="Server">
    <style type="text/css">
        .DataField
        {
            width: 300px;
            height: 50px;
        }
    </style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
    <div style="padding-left: 22px;">
        <table cellpadding="0" cellspacing="0">
            <tr>
                <td>
                    <div class="admin_blue_box">
                        Select the article type
           

How to remove blank item from infopath form in drop down list

  

Hi,

how to remove the blank item from the drop down box which is used in infopath form..

 

Regards,

siva


Data Form Web Part - Sharepoint Dropdown List as a field in Edit View - Possible?

  

Hi guys,

I'm building a Sharepoint page with a data form web part that uses custom SELECT and UPDATE statements with an SQL Server connection in order to retrieve and store records of information.

I'm getting along fine, records seem to update how they should etc, but I've ran into a problem with one thing: Sharepoint dropdownlists in 'Edit Template'

So the issue is this: if I replace a textbox field with a dropdown list that is populated with a separate SQL datasource, the dropdown list seems to be unable to show the current value of the field.

E.g. I have a dataview which has a field "FruitID", which I can update just fine by setting the ID value to different numbers. The SQL datasource uses the FruitID to display a list of all available Fruits, (e.g. 1 = Banana, 2 = Apple, 3 = Cherry, etc).

If i open the dataview in editmode, the default value in the dropdown is null, despite the real value of the field being "2", which should show "Apple" in the dropdown.

I can select a fruit and click save, and it will update just fine. But the initial display needs to show the correct value to start with.

Is there a custom binding I should be coding to make this work? I can't configure dropdown <items> on an individual level as they are populated from the SQL server. I can't set "SelectedI

SharePoint 2007 - How to associate a Custom List View with a Custom Edit Form. Edit link always re

  

Can someone give me a clue of how to connect a specific Custom List View with a custom Edit Form.

I have created a custom list, and I have created a custom view attached to that list.   I also have a custom CustomEditForm.aspx form created using SharePoint Designer.

I want to associate the Custom Edit form directly with one and one view only for a given list so that when the user clicks the edit icon in that view, they are linked to the custom Edit Form.  But all other views including the All Items view behave as normal, i.e. using the normal EditForm.aspx.

I can replace the EditForm.aspx in the Url with my custom form and it works fine, but I can't seem to figure out how to connect the custom view edit link to the custom form.  It always takes me back to the default EditForm.aspx page.

I have investigated the href="{$URL_Edit}?ID={@ID}" onclick="GoToPage('{$URL_Edit}?ID={@ID}') in code, which appears to  be how the URL is generated but I'm not sure how or where best to set the value of URL_Edit parameter so that I point to the custom Edit Form.  This is somehow getting passed into the custom view, but I'm not sure how best to set it for a specific non-AllItems view.

Does anyone

Form view in ASP.NET

  

hi all...!
i have a database and i create a form with button edit,delete, New Registration..using Formview in asp.net..
everything was working good...

And i write SQL statement to get New ID number into dropdownlist/TextBox when i click button "New Registration".

i can get new(next) ID number after read database
it's also working good

Now i want change it to get ID which was deleted from table and replace the ID with new record...what i need is when i click "New Registration" i want get deleted "ID" first and then go to new record ID...

my code is here:-it working for get next ID after read database.

SELECT min(PANG)
FROM (SELECT ID + 1 AS PANG
FROM Table1
EXCEPT SELECT ID FROM Table1)
AS boon WHERE PANG &gt;300000
</p>

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"

Disable filtering on a Dynamic Data list view.

  

I have an entity set of NotificationTemplates, and each one of these has a collection of zero-many SmsTemplate entities. When editing or viewing a NotificationTemplate, I have a link to View SMS Templates. That link takes me to a List view for the SmsTemplates entity set, filtered for the NotificationTemplate I was viewing.

How can I prevent the user changing this filter to show SmsTemplates for another NotificationTemplate? That is, I want the filter, but it must be read only. The drop-down just mustn't drop down, it must just display the name of the NotificationTemplate that these SmsTemplates belong to. To view SmsTemplates for another NotificationTemplate, the user must click View SMS Templates from that other template.


This was originally asked by myself on SatckOverflow at: http://stackoverflow.com/questions/3514373/disable-filtering-on-a-dynamic-data-list-view



How to use a drop down list to edit in the standard Edit.aspx with DD?

  

Hey All,

I'm brand new to Dynamic Data and to ASP.NET.  I've been able to fumble around and get the calendar extender up and running and a few other customization options implemented, but I can't seem to get this drop down list to work - even after reading tons of online info.  The good news is that my web page/application is VERY simple, so hopefully you guys can help me out.  I'm working in VB btw.

I have a list of road projects submitted to me by local governments.  One of the fields is SponsoringAgency, which has a limited number of possible entries (the names of member governments).  Thus, when they submit a new project, or edit an existing one, I want to limit the input into the field "SponsoringAgency." I'm trying to use a dropdownlist because I'm familiar with it from Access, but it may not be the best approach.  Imagine you just setup a brand new, standard DD website, how would you get this to work?

Methods tried and failed (probably because I don't understand them fully):

UIHint - The closest I can get with this is an error saying that since SponsoringAgency isn't a Foreign Key, I'm out of luck.

Creating a SponsoringAgency Table - In my data layer, I created a second table with a list of government names.  I then tried se

FormView Text Field Being Set by A Drop Down List

  

Hello, I have a FormView which is used to insert a record into a database.  Outside of this formview i have a drop down list, I want to grab the value from that drop down list and set one of the text fields within the formview to it's currently selected value.  I've tried the following code, but the dynamic categorytextbox line is what seems to not be working.


                    <asp:DropDownList ID="ddlCategory" runat="server" AutoPostBack="True" 
DataSourceID="SqlDataSourceCategory" DataTextField="CategoryName"
DataValueField="CategoryID" Width="200px">
</asp:DropDownList>


                            <asp:TextBox ID="CategoryIDTextBox" runat="server" 
Text='<%# Bind("CategoryID") %>' Visible="False" />

        protected void FormView1_DataBound(object sender, EventArgs e)
{
dynamic varCategory = ddlCategory.SelectedValue;
dynamic categoryTextBox = FormView1.FindControl("CategoryIDText

Infopath 2007 print view in browser enabled form with Print button

  

Hi i create a  print view brower enabled form in Infopath 2007 with header and footer. In Infopath works fine. Margin was ok, header and footter to. But then i try to print this browser the margin, header and footer it changes to default setting of browser ? I try also create a print button in form with VS 2008 code, but method :

this.print(); not working.

It is possible to print the "print view" in browser as the same like in Infopath 2007? Does anyone have the code how to create a print button in C# on browser enabled form?


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