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


Top 5 Contributors of the Month
Kaviya Balasubramanian
satyapriyanayak
SP
abhays
Sasi Prabhu
Post New Web Links

Change order for list view drop down

Posted By:      Posted Date: September 07, 2010    Points: 0   Category :SharePoint
 
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?


View Complete Post


More Related Resource Links

can not change view of list view web part

  
hi, i created a list view web part and tried to change its view to custom view. in following code the view gets created but never comes as default. i have to go to list view web part and change it manually....                       web.AllowUnsafeUpdates = true;                     ListViewWebPart lvwp = new ListViewWebPart();                     lvwp.ListName = list.ID.ToString("B").ToUpper();                     SPView view = list.Views["customview"];                     view.Query = query;     view.Update();                     lvwp.ViewGuid = view.ID.ToString("B");                     lvwp.Visible = true;                     web.Update();                     web.AllowUnsafeUpdates = false;   I even tried with SPLimitedWebPartManager as shown in some example....                    &n

how to change the view of SharePoint List based on field?

  

hi all,

I have different sites in my sharepoint application. in every site i have one list, this list have one field called location. When i open this list in purticular site at the time users  will see only the items where the location filed is equal to the site name.

So please suggest me how we can achieve this?

thanks.......

 


Change order of columns in a list

  

Hi there

I'm looking for a way to change the order of the colums in a list in SharePoint 2010. I only have access to SharePoint Designer 2010 for editing the site.

I already looked at the function to create custom views for lists. However this are only useful when viewing the list as a whole, however when you edit an existing, or create a new entry you will see

  • first: the columns in the order in which they were created.
  • and second: all of the columns. i cant find a way to make certain columns invisible for the user.
I already looked through the functions that are given to me by SharePoint Designer 2010 when editing the columns of a list and I also checked for a way to change the order of the columns when surfing the actual website with Internet Explorer.

Does anyone know how to do this? Or am I just trying to find a function that doesn't make sense because it's covered by another feature?

Thanks for your help!


drop down list in form view

  

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..


Dynamically change the drop down list

  

hi,

I'm trying to make a drop down list which contain is dynamically changed.

drop down1 contains names of the months, january to december and drop down2 contains relevent days.(1,2,...).

my requirement is if I select january drop down2 should be listed 1,2,..31.and select february drop down2 should be 1,2,...28.

I tried using followng code and It does not give correct out put.It is continously adding days when i select each month.

$(document).ready(function(){

    var fillDays = true;

    $('#month :item').click(function(){
            var selectedItem = $('#month option:selected');
            var selectedItemText = selectedItem.val();
            var dropDown = document.getElementById('day');
        
            if(selectedItemText=='feb' && fillDays)
            {
                
                fillDays = false;
    

Change the order of list fields on Edit page?

  

Is there a way to change the order of the fields show up on the edit page (EditForm.aspx) and new page (NewForm.aspx)?  I know the fields can be reordered in views. 


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
           

Alphabetical order in infopath drop down fails for sharepoint list dataconnection, but it works in p

  

Hello Experts,

I am using Sharepoint List dataconnection to retrive the drop down in Infopath form & configured several rules to retirve data for other fields based on Id value selected in drop down.

when i modify the list view to display items in alphabetical order, Then i can see the infopath preview mode to display drop down in alphabetical order. But when i deploy as administrator approved XSN in Sharepoint, it doesnt show the alphabetical order which was shown in the preview mode.

How to achieve the alphbetical order in browser enabled forms were it works in preview mode but not when we deploy in sharepoint  ?

Thanks !

Krishna

 

 


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



Change grid view from table to other HTML layout

  

Hi,

You'll have to excuse my ignorance, I'm coming at this from a front-end perspective, and don't really know how to deal with data views in ASP.NET.

Basically, I'm trying to change the layout of some repeated data from a straight table, to something more design-heavy.  It's the same data, just re-organised slightly.  The current ASP.NET code looks like this:

		<table>
			<tr>
				<td>
                    <asp:GridView ID="GVMoments" runat="server" AllowPaging="True" AllowSorting="True"
                        AutoGenerateColumns="False" PageSize="20" RowHeaderColumn="FirstName"
                        SkinID="GroupSkin" DataKeyNames="moment_id" 
                        DataSourceID="SqlDataEditMoments">
                        <PagerSettings Mode="NumericFirstLast" PageButtonCount="20" Position="TopAndBottom" />
                        <RowStyle />
                            <Columns>
                                <asp:BoundField DataField="moment_id" HeaderText="moment_id" ReadOnly="True" SortExpression="moment_id"
                                    Visible="False" In

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
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