Search Results

Search found 1331 results on 54 pages for 'listview'.

Page 6/54 | < Previous Page | 2 3 4 5 6 7 8 9 10 11 12 13  | Next Page >

  • Wpf SelectedItem wont work for a Combobox in a ListView

    - by ChristianRo
    Hi there, I´ve got a problem with a Combobox in a ListView. I´ve got a class called "Substrate". This class contains an object of a class called "SubstrateType". I want to show the objects of the class "Substrate" in a Listview. Each property of the "Substrate" is presented in the columns of the Listview. For the different "SubstrateType" I want to use a combobox. In the XAML I tried it like this: <ComboBox Name="CBType" ItemsSource="{Binding ElementName=SettingsSubstrate, Path=TypeList}" SelectedItem="{Binding Path=Substrate.SubstrateType}" DisplayMemberPath="Description"/> In the code-behind I got two ObservableCollections. One for all Substrates and one for all possible SubstrateTypes. The combobox displays all SubstrateTypes if you click on it. But the combobox has no selecteditem if you dont select one. http://i44.tinypic.com/2eakxav.png Thanks in advance.

    Read the article

  • Listview Cancel/Update causes Failed Veiwstate Error

    - by ChiliYago
    I am utilizing a asp.net Listview control which is causing a Failed to load viewstate error after a row is put in edit mode and the user clicks either update or cancel. The ListView control is in an ascx User control that is hosted in a parent aspx page. The parent aspx code-behind calls the a bind method on the ascx page which in turn binds the ListView. I am trying to isolate where and how this is happening but have not had any success and frankly I am out of ideas. Please offer some suggestions on what I should be looking at. Thank you.

    Read the article

  • asp.net disappearing data from Dropdownlist inside listview when loading from DataTable

    - by piotrmichal
    Hello I have a problem with dropdowllist ddl1 that is inside of insertitem of listview. I populate it from table on page load. In Page_load I have: if (!Page.IsPostBack) { ListView1.DataBind(); InsDropDownList3.DataSource = GetAllPlayersName(); InsDropDownList3.DataBind(); } DropDownList ddl1 = (DropDownList)ListView1.InsertItem.FindControl("InsDropDownList1"); if (ddl1 != null) { DataTable t = GetAllPlayersName(); ddl1.DataSource = t; ddl1.DataBind(); } When I select a row in listview or edit it data from dropdownlist in insertitem row disappears - list became empty until I close page and open again. There is another InsDropDownList3 outside of listview and there is no problem with this one. Why one is loosing data and the other one not? As I understand ddl1 should even get data every time page loads.

    Read the article

  • Empty text view message when listview is empty

    - by Blid Tounsi
    I have a ListView with an empty list catch in the XML and it works fine. How to toggle ListView Empty Text please ? This is my XML code : <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="fill_parent" android:orientation="vertical" > <TextView android:id="@+id/empty" android:layout_width="fill_parent" android:layout_height="wrap_content" android:text="@string/emptyList" /> <ListView android:id="@+id/list" android:layout_width="fill_parent" android:layout_height="wrap_content" /> </LinearLayout> I'm not using a ListActivity. It s possible to do that please ?

    Read the article

  • Android ListView in Activity getting Refreshed on Changing Orientation

    - by y ramesh rao
    I have Activity with ListView inside it and in the onCreate method of the Activity I have code for populating the Data of the ListView this Data is a server based and so populating includes calling Network URLs. I have the ArrayAdapter of the ListView in the Same Activity Class. Now the Issue I'am facing is that, in Rest all scenarios my Activity is behaving in a proper way but when the Orientation [ Portrait to Landscaped or other way round] is taking place the Data is Getting lost and Newer Data calls are Required to Populate the Same Old Data now this is something that is not intended out the code how should I deal with it.

    Read the article

  • ListView GridView and Grid

    - by urema
    Hi, If you have a ListView with its view set as a GridView, which itself contains columns for each month say.....how do I set a template up for the ItemTemplate of the ListView so that each Item will be three rows high, and be inline with the ListView.View's columns? For example different employee recruits over a year.... each month across the top and each employee on the left side, though sub-columned on the employee are three rows "Name", "Address" and "Job Type" say. I know you have to use the IsSharedSizeScope attached property. January February ... Employee1 Name E1 Address E1 Street Job Type Cleaner Employee2 Name ... Address ... Job Type ... Thanks greatly in advance, U.

    Read the article

  • Show/Hide GridView Header in ListView

    - by Chris
    I have a ListView in WPF, and I want to hide the headers for the ListView when the List the ItemsSource is bound to is null, and display the headers when the ItemsSource is not null and has at least 1 item in the collection. I have found the code online to hide the ListView headers like this: <Window.Resources> <Style x:Key="HideListViewHeaders" TargetType="{x:Type GridViewColumnHeader}"> <Setter Property="Visibility" Value="Collapsed" /> </Style> </Window.Resources> Thanks for any help!

    Read the article

  • ListView items not responding to tap

    - by Justin Williams
    I'm just getting my feet wet with Android and have built a UI that contains a TabHost with three tabs. Each tab is powered by its own Activity. The first Tab contains a listview with a prepopulated set of rows and is built from a custom ArrayAdapter. The problem I'm running into is that none of the ListView rows are tappable. In other words, when I tap on them there is no orange selection. If I use the scroll ball on my Nexus One it will select, but any touch gestures don't seem to be responding. All the UI is being handled using XML files with a main.xml housing the TabHost - LinearLayout - TabWidget/FrameLayout and a nearby_activity.xml file containing my ListView UI <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="fill_parent"> <TextView android:id="@+id/android:empty" android:layout_width="fill_parent" android:layout_height="fill_parent" android:text="@string/nearby_no_events" /> <ListView android:id="@android:id/list" android:layout_width="fill_parent" android:layout_height="0dip" android:layout_weight="1.0" android:choiceMode="multipleChoice" android:divider="#d9d9d9" android:dividerHeight="1px" android:cacheColorHint="#eee" /> </LinearLayout> And the relevant code from my Activity that is set to show in the selected tab. public class NearbyActivity extends ListActivity { private ArrayList<Event> m_events = null; private EventAdapter m_adapter = null; public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.nearby_activity); getEvents(); this.m_adapter = new EventAdapter(this, R.layout.eventrow, m_events); setListAdapter(this.m_adapter); } private void getEvents() { m_events = new ArrayList<Event>(); for (int i = 0; i < 100 ; i++) { Event e = new Event(); e.setEventName("Event " + i); e.setVenueName("Staples Center"); e.setStartDate(new Date()); m_events.add(e); } } private class EventAdapter extends ArrayAdapter<Event> { private ArrayList<Event> items; public EventAdapter(Context context, int textViewResourceId, ArrayList<Event> items) { super(context, textViewResourceId, items); this.items = items; } @Override public View getView (int position, View convertView, ViewGroup parent) { View v = convertView; if (v == null) { LayoutInflater vi = (LayoutInflater)getSystemService(Context.LAYOUT_INFLATER_SERVICE); v = vi.inflate(R.layout.eventrow, null); } Event e = items.get(position); if (e != null) { TextView nameText = (TextView)v.findViewById(R.id.eventName); TextView venueNameText = (TextView)v.findViewById(R.id.venueName); if (nameText != null) { nameText.setText(e.getEventName()); } if(venueNameText != null) { venueNameText.setText(e.getVenueName()); } } return v; } } } My listview row's are populated by an XML file as well. <?xml version="1.0" encoding="utf-8"?> <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="?android:attr/listPreferredItemHeight" android:orientation="vertical" android:padding="4dip"> <TextView android:id="@+id/eventName" android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_alignParentTop="true" android:inputType="text" android:singleLine="true" android:ellipsize="marquee" android:textSize="18sp" android:textColor="#000" /> <TextView android:id="@+id/venueName" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_below="@id/eventName" android:layout_alignParentBottom="true" android:layout_marginRight="55dip" android:singleLine="true" android:ellipsize="end" android:scrollHorizontally="true" android:textSize="13sp" android:textColor="#313131" android:layout_alignWithParentIfMissing="true" android:gravity="center_vertical" /> </RelativeLayout> Thanks for any help you can offer.

    Read the article

  • Android ListView delete row button - focus issue

    - by Max Gontar
    Hi! I have an activity with ListView and buttons below: <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="fill_parent" android:orientation="vertical"> <ListView android:id="@+id/lvLamps" android:layout_width="fill_parent" android:layout_height="fill_parent" android:listSelector="@null" android:choiceMode="none" android:scrollbarStyle="insideInset" android:layout_weight="1.0" /> <RelativeLayout android:layout_width="fill_parent" android:layout_height="wrap_content" android:orientation="horizontal" android:layout_weight="0.0"> <Button android:id="@+id/btnAdd" android:background="@null" android:drawableLeft="@drawable/btn_upgrade" android:layout_width="wrap_content" android:layout_height="wrap_content" android:drawableRight="@drawable/lbl_upgrade" android:textSize="0pt" android:text="" android:layout_alignParentLeft="true" android:padding="20px" /> <Button android:id="@+id/btnNext" android:background="@null" android:drawableRight="@drawable/next_btn" android:layout_width="wrap_content" android:layout_height="wrap_content" android:drawableLeft="@drawable/lbl_next" android:textSize="0pt" android:text="" android:layout_alignParentRight="true" android:padding="20px" android:visibility="gone" /> <ImageButton android:id="@+id/btnListExit" android:background="@null" android:src="@drawable/btn_x" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignParentRight="true" android:padding="20px" /> </RelativeLayout> </LinearLayout> ListView row contains delete button: <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="wrap_content" android:layout_height="wrap_content" android:orientation="horizontal" android:focusable="true"> <RelativeLayout android:layout_width="wrap_content" android:layout_height="wrap_content" android:orientation="horizontal" android:focusable="true"> <ImageButton android:id="@+id/btnRowDelete" android:src="@drawable/btn_x" android:background="@null" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignParentLeft="true" android:padding="4px" android:focusable="true" android:focusableInTouchMode="true"/> <TextView android:id="@+id/txtLampRowFrom" android:text="123" android:layout_width="wrap_content" android:layout_height="wrap_content" android:textSize="6pt" android:layout_toRightOf="@id/btnRowDelete" android:focusable="false" android:textColor="@color/textColor"/> <TextView android:id="@+id/txtLampRowTo" android:text="123" android:layout_width="wrap_content" android:layout_height="wrap_content" android:textSize="6pt" android:layout_toRightOf="@id/btnRowDelete" android:layout_alignParentBottom="true" android:focusable="false" android:textColor="@color/textColor"/> <ImageView android:layout_width="wrap_content" android:layout_height="wrap_content" android:src="@drawable/arrow_upgrade_to" android:layout_alignParentRight="true" android:layout_centerVertical="true" android:focusable="false"/> </RelativeLayout> </LinearLayout> In Adapter, Button onClickListener is set, also there are dummies to make list non-selectable: // disabling list items select public boolean areAllItemsEnabled() { return false; } public boolean isEnabled(int position) { return false; } What I want is: always show buttons in the bottom of screen after list (no matter how long it is, there should be scroll if it's too long) ListView should not be selectable, I don't want row selection row delete button should be selectable (focusable) with touch and with trackball And everything works except I can't focus row delete button with trackball (although it's working with touch). Can you help me? Thanks!

    Read the article

  • WPF ListView Cannot Trigger Selection Changed when only one row

    - by Traci
    I have a listview which has its datasource changed after update of a search textbox. When I enter search criteria that only returns one row, I am unable to trigger the OnSelectionChanged event The listbox works as expected at any other time. I have tried changing SelectedItem and SelectedIndex in Code, Clicking aimlessly on the ListView both on and off the row and are at the brink of insanity. Does anyone know of a solution so that I am able to change the selected item!! Help Please

    Read the article

  • Android ListView delete row button - focus issue

    - by Max Gontar
    I have an activity with ListView and buttons below: <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="fill_parent" android:orientation="vertical"> <ListView android:id="@+id/lvLamps" android:layout_width="fill_parent" android:layout_height="fill_parent" android:listSelector="@null" android:choiceMode="none" android:scrollbarStyle="insideInset" android:layout_weight="1.0" /> <RelativeLayout android:layout_width="fill_parent" android:layout_height="wrap_content" android:orientation="horizontal" android:layout_weight="0.0"> <Button android:id="@+id/btnAdd" android:background="@null" android:drawableLeft="@drawable/btn_upgrade" android:layout_width="wrap_content" android:layout_height="wrap_content" android:drawableRight="@drawable/lbl_upgrade" android:textSize="0pt" android:text="" android:layout_alignParentLeft="true" android:padding="20px" /> <Button android:id="@+id/btnNext" android:background="@null" android:drawableRight="@drawable/next_btn" android:layout_width="wrap_content" android:layout_height="wrap_content" android:drawableLeft="@drawable/lbl_next" android:textSize="0pt" android:text="" android:layout_alignParentRight="true" android:padding="20px" android:visibility="gone" /> <ImageButton android:id="@+id/btnListExit" android:background="@null" android:src="@drawable/btn_x" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignParentRight="true" android:padding="20px" /> </RelativeLayout> </LinearLayout> ListView row contains delete button: <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="wrap_content" android:layout_height="wrap_content" android:orientation="horizontal" android:focusable="true"> <RelativeLayout android:layout_width="wrap_content" android:layout_height="wrap_content" android:orientation="horizontal" android:focusable="true"> <ImageButton android:id="@+id/btnRowDelete" android:src="@drawable/btn_x" android:background="@null" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignParentLeft="true" android:padding="4px" android:focusable="true" android:focusableInTouchMode="true"/> <TextView android:id="@+id/txtLampRowFrom" android:text="123" android:layout_width="wrap_content" android:layout_height="wrap_content" android:textSize="6pt" android:layout_toRightOf="@id/btnRowDelete" android:focusable="false" android:textColor="@color/textColor"/> <TextView android:id="@+id/txtLampRowTo" android:text="123" android:layout_width="wrap_content" android:layout_height="wrap_content" android:textSize="6pt" android:layout_toRightOf="@id/btnRowDelete" android:layout_alignParentBottom="true" android:focusable="false" android:textColor="@color/textColor"/> <ImageView android:layout_width="wrap_content" android:layout_height="wrap_content" android:src="@drawable/arrow_upgrade_to" android:layout_alignParentRight="true" android:layout_centerVertical="true" android:focusable="false"/> </RelativeLayout> </LinearLayout> In Adapter, Button onClickListener is set, also there are dummies to make list non-selectable: // disabling list items select public boolean areAllItemsEnabled() { return false; } public boolean isEnabled(int position) { return false; } What I want is: always show buttons in the bottom of screen after list (no matter how long it is, there should be scroll if it's too long) ListView should not be selectable, I don't want row selection row delete button should be selectable (focusable) with touch and with trackball And everything works except I can't focus row delete button with trackball (although it's working with touch). Can you help me? Thanks!

    Read the article

  • android : listview customization

    - by Puneet kaur
    hi, it is possible to have single listview with 2 or more columns ,which is operatable with paging property (i.e. at a time listview will show only 4 items in single column and on press of right arrow it will show next 4 items ).. can u please tell me he procedure to implement it or any idea. Thanks puneet

    Read the article

  • ListView and dynamic row sizes

    - by misbell
    I'd like to use different row descriptors (from the XML layout resource) in one ListView. Can I and how? Also, I'd like to be able to programmatically change the size of the rows, based on the data in each row, in a ListView. Can I and how? Thank you in advance--I LOVE stackoverflow. M

    Read the article

  • .Net ListView and System's Icon Size

    - by WhoaNow
    I have a ListView using the LargeIcon View mode with some 64x64 thumbnails. The problem is that the padding between ListViewItems is somehow based on the system's Icon size value (Display Properties Appearance Advanced Icon). The default for XP seems to be 32 and the ListView and its thumbnails look fine, but with higher Icon sizes, the items are spaced out horrendously. Is there any way to override this behavior and force it to use the same spacing?

    Read the article

  • WPF 4, ListView and ListCollectionView custom sorting

    - by JustABill
    I'm trying to use a custom sort with a ListView, as described in this blog entry. I'm doing ListCollectionView view = (ListCollectionView)CollectionViewSource.GetDefaultView(TheList.ItemsSource); as recommended there and in several other places, but for some reason I'm getting "Unable to cast object of type 'MS.Internal.Data.EnumerableCollectionView' to type 'System.Windows.Data.ListCollectionView'." (TheList is of type ListView). What could be causing this?

    Read the article

  • Possible to cancel paging in ListView using DataPager

    - by Littlefool
    I'm using a datapager control on my listview to perform paging in it. When paging through the table, I need to perform some validations. When these validations are not successfull, the paging should be cancelled. I currently perform the validation in the PagePropertiesChanging event of the ListView, however, the arguments do not provide a Cancel property. protected void MyListView_PagePropertiesChanging(object sender, PagePropertiesChangingEventArgs e) { if (!Validate()) { // cancel the paging action} } Does anyone know if canceling the paging is possible and how to perform it? Thanks

    Read the article

  • Binding class to ListView

    - by Neir0
    Hi, I have a class public class Foo { public List<string> list1 { get; set;} public List<string> list2 { get; set; } public string url; } and a ListView with two columns How i can to bind instance of Foo class to ListView?

    Read the article

  • WPF ListView GridViewColumn Double Click

    - by Kevin
    Hi, I have a WPF ListView that opens a certain window when double clicked on a certain item inside the list view, but I have a problem. When I double click the GridViewColumn, that also opens up a certain window. Is there a way to detect if the sender is a gridviewColumn or a listView item? Thanks

    Read the article

  • text is exceeding the listview bounds in Qt

    - by Solitaire
    Hi. I need to customize the listview,I am placing an icon and a text at the center of the listview. If the text length is bigger then the list rectangle length.. the text is coming over the icon first letter of the string is not visible.. How to avoid this situation? Is it possible to give marique effect for the string? Thanks in advance.

    Read the article

  • Adding Items to an Inner (Nested) ListView

    - by Corey O.
    I have 2 asp:ListView controls, one embedded in the other (OuterListView and InnerListView respectively). I am trying to add an asp:linkbutton in the InnerListView layout that will allow the user to add an item to the InnerListView. Unfortunately, when I handle the OnClick event in the linkbutton control, I can't figure out how to get a handle on the asp:linkbutton's parent ListView from within the codebehind handler. Obviously, there is no global handle since there are multiple inner listviews. I can link code if necessary.

    Read the article

< Previous Page | 2 3 4 5 6 7 8 9 10 11 12 13  | Next Page >