Search Results

Search found 16 results on 1 pages for 'editmode'.

Page 1/1 | 1 

  • UITableView Animation when entering Editmode

    - by f0rz
    Hi! Maybe I´m just stupid but I cant understand why this isnt working. I want to achieve a little animation when I'm entering editing mode within a UITableView. [super setEditing:NO animated:YES]; [myTable setEditing:NO animated:YES]; [myTable reloadData]; [self.navigationItem.leftBarButtonItem setTitle:@"Edit"]; [self.navigationItem.leftBarButtonItem setStyle:UIBarButtonItemStylePlain]; Shouldnt this animated:YES suppose to animated this entering of the editmode? Regards. - f0rz

    Read the article

  • Edit Mode Delete Spinner Icon for Specific TableView Rows

    - by Michael Bordelon
    I have a grouped tableview. Each section has three rows. I need to be able to delete one section at a time. Using the standard edit mode, I can make it work. However, the delete icon shows up to the left of each cell, not just the first row in each section. Is there a way to suppress the little spinner icon for all rows except the first? I am hoping there is an easy way to do this without subclassing. Thanks for your help. Here is a screenshot to help visualize it: http://picasaweb.google.com/lh/photo/ll-EJY5ACw7oqHH1xKBQ8w?feat=directlink

    Read the article

  • asp.net datasource in memory which component suites this better?

    - by Mike
    I need to create a page that has a listbox with databound items. Upon clicking an entry in the listbox, the page will postback and insert an entry into a listview. The listview should have the item's name, and a textbox allowing the user to edit the value for each. I don't want the listview to be in "edit" mode. I just want the user to be able to update the value. Is this possible?

    Read the article

  • TabBarController NavigationController with black backgroundbar

    - by Simon
    hello I've placed this code my didload method, to get a black Navigationbar. rootTabBarController.navigationController.navigationBar.barStyle = UIBarStyleBlackOpaque; rootTabBarController.moreNavigationController.navigationBar.barStyle = UIBarStyleBlackOpaque; its working fine, but when the user rearranges the Icons in the editmode, i'm getting a default blue navigation bar. Can anyone help me to avid this ? btw: big thanks to the genius crowd!

    Read the article

  • How to Edit rows in DataGridView?

    - by DanSogaard
    So I've a button on my frmMain that opens up another frmEdit which has a datagridview that displays the following query: BindingSource bs = new BindingSource(); string sqlqry = "select p_Name from Items where p_Id=" + p_Id; SqlCeCommand cmd = new SqlCeCommand(sqlqry1, conn); SqlCeDataReader rdr = cmd.ExecuteReader(); bs.DataSource = rdr; dataGridView1.DataSource = bs; this.ShowDialog(parent); Now when frmEdit loads up the dgv displays the query just fine, but I can't Edit. I tried dgv.BeginEdit(true), but it doesn't work. The EditMode works fine if I used wizard to bind datasources to the dgv, but I need to execute my own customized queries and be able to update them directly.

    Read the article

  • Component properties working at designtime but not runtime

    - by delphi-rulez-2010
    I am creating a component that uses a collection and collection items of panels. I can't seem to get the colors to work at runtime, but yet they seem to work just fine at design time. You can download the component source code here: http://www.shaneholmes.net/pasfiles/ There is a Consoles (Tcollection) property, status colors property, and a Edit mode property Each console (TCollectionItem) has a status property when changed, the consoles property is changed based on the components StatusColors property. When the components EditMode property is set to true, you can move the panels around at runtime. Question: Why does the colors only work at designtime and not runtime. thanks

    Read the article

  • Should I use parameters in template scripting to control the output, or a separate specialized template?

    - by asawyer
    Would it be considered best practice to use a single template that changes it's output based on script values, or have multiple templates, and use the view to pick the correct one instead? For example, in this underscope template: <script type="text/template" id="SkillsetTemplate"> <div class='RegularMode <%= (skillset.get('InEditMode')===false)?'show':'hide' %>'> </div> <div class='EditMode <%= (skillset.get('InEditMode')===true)?'show':'hide' %>'> </div> </script> I use a backbone model to bind against, and use the InEditMode attribute to pick which content to render. Should I instead have a normal mode, and an edit mode template, and use the attribute on the model to pick the template ? For background purposes, I am using backbone.js with underscore templates and an MVC3 backend.

    Read the article

  • Component properties working at designt time but not runtime - ???

    - by delphi-rulez-2010
    I am creating a component that uses a collection and collection items of panels. I can't seem to get the colors to work at runtime, but yet they seem to work just fine at design time. You can download the component source code here: http://www.shaneholmes.net/pasfiles/ There is a Consoles (Tcollection) property, status colors property, and a Edit mode property Each console (TCollectionItem) has a status property when changed, the consoles property is changed based on the components StatusColors property. When the components EditMode property is set to true, you can move the panels around at runtime. Question: Why does the colors only work at designtime and not runtime. thanks

    Read the article

  • Binding collections to DataGridView in Windows Forms

    - by Sergey
    I'm trying to bing collection to DataGridView. As it turns out it's impossible for user to edit anything in this DataGridView although EditMode is set to EditOnKeystrokeOrF2. Here is the simplified code: public Supplies() { InitializeComponent(); List<string> l = new <string>(); l.Add("hello"); this.SuppliesDataGridView.DataSource = l; } It also doesn't work when I change collection type to SortableBindingList, Dictionary or even use BindingSource. What can be wrong here?

    Read the article

  • Can a View Controller manage more than 1 nib based view?

    - by Hugo Brynjar
    I have a VC controlling a screen of content that has 2 modes; a normal mode and an edit mode. Can I create a single VC with 2 views, each from separate nibs? In many situations on the iphone, you have a VC which controls an associated view. Then on a button press or other event, a new VC is loaded and its view becomes the top level view etc. But in this situation, I have 2 modes that I want to use the same VC for, because they are closely related. So I want a VC which can swap in/out 2 views. As per here: http://stackoverflow.com/questions/863321/iphone-how-to-load-a-view-using-a-nib-file-created-with-interface-builder/2683153#2683153 I have found that I can load a VC with an associated view from a nib and then later on load a different view from another nib and make that new view the active view. NSArray *nibObjects = [[NSBundle mainBundle] loadNibNamed:@"EditMode" owner:self options:nil]; UIView *theEditView = [nibObjects objectAtIndex:0]; self.editView = theEditView; [self.view addSubview:theEditView]; The secondary nib has outlets wired up to the VC like the primary nib. When the new nib is loaded, the outlets are all connected up fine and everything works nicely. Unfortunately when this edit view is then removed, there doesn't seem to be any elegant way of getting the outlets hooked up again to the (normal mode) view from the original nib. Nib loading and outlet setting seems a once only thing. So, if you want to have a VC that swaps in/out 2 views without creating a new VC, what are the options? 1) You can do everything in code, but I want to use nibs because it makes creating the UI simpler. 2) You have 1 nib for your VC and just hide/show elements using the hidden property of UIView and its subclasses. 3) You load a new nib as described above. This is fine for the new nib, but how do you sort the outlets when you go back to the original nib. 4) Give up and accept having a 1:1 between VCs and nibs. There is a nib for normal mode, a nib for edit mode and each mode has a VC that subclasses a common superclass. In the end, I went with 4) and it works, but requires a fair amount of extra work, because I have a model class that I instantiate in normal mode and then have to pass to the edit mode VC because both modes need access to the model. I'm also using NSTimer and have to start and stop the timer in each mode. It is because of all this shared functionality that I wanted a single VC with 2 nibs in the first place.

    Read the article

  • Richfaces modal panel and a4j:keepAlive

    - by mykola
    Hello! I've got unexpected problems with richfaces (3.3.2) modal panel. When i try to open it, browser opens two panels instead of one: one is in the center, another is in the upper left corner. Besides, no fading happens. Also i have three modes: view, edit, new - and when i open my panel it should show either "Create new..." or "Edit..." in the header and actually it shows but not in the header as the latter isn't rendered at all though it should, because i set proper mode in action before opening this modal panel. Besides it works fine on all other pages i've made and there are tens of such pages in my application. I can't understand what's wrong here. The only way to fix it is to remove <a4j:keepAlive/> from the page that is very strange, imho. I'm not sure if code will be usefull here as it works fine everywhere in my application but this only case. So if you put it on your page it will probably work without problems. My only question is: are there any hidden or rare problems in interaction of these two elements (<rich:modalPanel> and <a4j:keepAlive>)? Or shall i spent another two or three days searching for some wrong comma, parenthesis or whatever in my code? :) For most curious. Panel itself: <!-- there's no outer form --> <rich:modalPanel id="panel" autosized="true" minWidth="300" minHeight="200"> <f:facet name="header"> <h:panelGroup id="panelHeader"> <h:outputText value="#{msg.new_smth}" rendered="#{MbSmth.newMode}"/> <h:outputText value="#{msg.edit_smth}" rendered="#{MbSmth.editMode}"/> </h:panelGroup> </f:facet> <h:panelGroup id="panelDiv"> <h:form > <!-- fields and buttons --> </h:form> </h:panelGroup> </rich:modalPanel> One of the buttons that open panel: <a4j:commandButton id="addBtn" reRender="panelHeader, panelDiv" value="#{form.add}" oncomplete="#{rich:component('panel')}.show()" action="#{MbSmth.add}" image="create.gif"/> Action invoked on button click: public void add() { curMode = NEW_MODE; // initial mode is VIEW_MODE newSmth = new Smth(); } Mode check: public boolean isNewMode() { return curMode == NEW_MODE; } public boolean isEditMode() { return curMode == EDIT_MODE; }

    Read the article

  • AdornerDecorator and tab stop issues

    - by Trev
    Hi, I am using IDataErrorInfo to validate and indicate errors in my text boxes. I am finding I have to tab once for the text box and once for the adornerdecorator. I have an error template: <ControlTemplate x:Key="ErrorTemplate"> <StackPanel KeyboardNavigation.IsTabStop="False" > <Border KeyboardNavigation.IsTabStop="False" BorderBrush="Red" BorderThickness="1" Padding="2" CornerRadius="2"> <AdornedElementPlaceholder KeyboardNavigation.IsTabStop="False" /> </Border> </StackPanel> </ControlTemplate> a textbox template: <Style x:Key="TextBoxInError" TargetType="{x:Type TextBox}"> <Setter Property="KeyboardNavigation.TabNavigation" Value="None"/> <Setter Property="FocusVisualStyle" Value="{x:Null}"/> <Setter Property="Margin" Value="0,5,0,5"/> <Setter Property="AllowDrop" Value="true"/> <Setter Property="HorizontalContentAlignment" Value="left"/> <Setter Property="Template"> <Setter.Value> <ControlTemplate TargetType="{x:Type TextBox}"> <Grid KeyboardNavigation.IsTabStop="False" > <Border KeyboardNavigation.IsTabStop="False" x:Name="Border" Background="{DynamicResource WindowBackgroundBrush}" BorderBrush="{DynamicResource SolidBorderBrush}" BorderThickness="1" Padding="2" CornerRadius="2"> <ScrollViewer IsTabStop="False" Margin="0" x:Name="PART_ContentHost" Style="{DynamicResource SimpleScrollViewer}" Background="{TemplateBinding Background}"/> </Border> </Grid> <ControlTemplate.Triggers> <Trigger Property="Validation.HasError" Value="true"> <Setter Property="ToolTip" Value="{Binding RelativeSource={RelativeSource Self}, Path=(Validation.Errors), Converter={StaticResource errorConverter}}"/> </Trigger> <Trigger Property="IsEnabled" Value="false"> <Setter Property="Foreground" Value="Gray"/> </Trigger> </ControlTemplate.Triggers> </ControlTemplate> </Setter.Value> </Setter> </Style> and declare a text box like this: <AdornerDecorator KeyboardNavigation.IsTabStop="False" > <TextBox Margin="5,5,5,3" x:Name="txtName" IsEnabled="{Binding EditMode}" Validation.ErrorTemplate="{StaticResource ErrorTemplate}" Text="{Binding ApplicationName, Mode=TwoWay, ValidatesOnExceptions=True, NotifyOnValidationError=True, ValidatesOnDataErrors=True}" Height="25" MaxLength="50" MaxLines="1" Style="{StaticResource TextBoxInError}"/> </AdornerDecorator> If the adorner is round one text box as above then I tab once to leave the text box and once to leave the 'adornment' (it seems) If I have the adorner around a stackpanel of text boxes then I tab once each for the text boxes then have to go back through all the 'adornments' in turn. When tabbing through the adornments the focus goes on the red border defined in the control template.. any ideas? thanks

    Read the article

  • Setting hidden input value in Javascript, then accessing it in c# codebehind

    - by Siegesmith
    Thank you for reading my question. I have been trying to set the value of a hidden input by using Javascript and then access the value from within my C# codebehind. When I run the code that is copied below, the value that is assigned to assignedIDs is "", which I assume is the default value for a hidden input. If I manually set the value in the html tag, then assignedIDs is set to that value. This behavior suggests to me that the value of the input is being reset (re-rendered?) between the onClientClick and onClick events firing. I would appreciate any help with the matter. I have spent hours trying to solve what seems like a very simple problem. html/javascript: <html xmlns="http://www.w3.org/1999/xhtml" > <head runat="server"> <title>Admin Page - Manage Tasks</title> <script language="javascript" type="text/javascript"> function PopulateAssignedIDHiddenInput() { var source = document.getElementById('assignedLinguistListBox'); var s = ""; var count = source.length; for (var i = count - 1; i >= 0; i--) { var item = source.options[i]; if (s == "") { s = source.options[i].value; } else { s = s.concat(",",source.options[i].value); } } document.getElementById('assignedIDHiddenInput').Value = s; // I have confirmed that, at this point, the value of // the hidden input is set properly } </script> </head> <body> <form id="form1" runat="server"> <div> <asp:Panel id="EditMode" runat="server"> <table style="border: none;"> <tr> <td> <asp:Label ID="availableLinguistLabel" runat="server" Text="Available"></asp:Label><br /> <asp:ListBox ID="availableLinguistListBox" runat="server" Rows="10" SelectionMode="Multiple"></asp:ListBox> </td> <td> <input type="button" name="right" value="&gt;&gt;" onclick="Javascript:MoveItem('availableLinguistListBox', 'assignedLinguistListBox');" /><br /><br /> <input type="button" name="left" value="&lt;&lt;" onclick="Javascript:MoveItem('assignedLinguistListBox', 'availableLinguistListBox');" /> </td> <td> <asp:Label ID="assignedLinguistLabel" runat="server" Text="Assigned To"></asp:Label><br /> <asp:ListBox ID="assignedLinguistListBox" runat="server" Rows="10" SelectionMode="Multiple"></asp:ListBox> </td> </tr> </table> //-snip- <asp:Button ID="save_task_changes_button" runat="server" ToolTip="Click to save changes to task" Text="Save Changes" OnClick="save_task_changes_button_click" OnClientClick="Javascript:PopulateAssignedIDHiddenInput()" /> </asp:Panel> <!-- Hidden Inputs --> <!-- Note that I have also tried setting runat="server" with no change --> <input id="assignedIDHiddenInput" name="assignedIDHiddenInput" type="hidden" /> </div> </form> </body> c# protected void save_task_changes_button_click(object sender, EventArgs e) { string assignedIDs = Request.Form["assignedIDHiddenInput"]; // Here, assignedIDs == ""; also, Request.Params["assignedIDHiddenInput"] == "" // -snip- }

    Read the article

  • Setting hidden input value in Javascript, then accessing it in codebehind

    - by Siegesmith
    I have been trying to set the value of a hidden input by using Javascript and then access the value from within my C# codebehind. When I run the code that is copied below, the value that is assigned to assignedIDs is "", which I assume is the default value for a hidden input. If I manually set the value in the html tag, then assignedIDs is set to that value. This behavior suggests to me that the value of the input is being reset (re-rendered?) between the onClientClick and onClick events firing. I would appreciate any help with the matter. I have spent hours trying to solve what seems like a very simple problem. html/javascript: <html xmlns="http://www.w3.org/1999/xhtml" > <head runat="server"> <title>Admin Page - Manage Tasks</title> <script language="javascript" type="text/javascript"> function PopulateAssignedIDHiddenInput() { var source = document.getElementById('assignedLinguistListBox'); var s = ""; var count = source.length; for (var i = count - 1; i >= 0; i--) { var item = source.options[i]; if (s == "") { s = source.options[i].value; } else { s = s.concat(",",source.options[i].value); } } document.getElementById('assignedIDHiddenInput').Value = s; // I have confirmed that, at this point, the value of // the hidden input is set properly } </script> </head> <body> <form id="form1" runat="server"> <div> <asp:Panel id="EditMode" runat="server"> <table style="border: none;"> <tr> <td> <asp:Label ID="availableLinguistLabel" runat="server" Text="Available"></asp:Label><br /> <asp:ListBox ID="availableLinguistListBox" runat="server" Rows="10" SelectionMode="Multiple"></asp:ListBox> </td> <td> <input type="button" name="right" value="&gt;&gt;" onclick="Javascript:MoveItem('availableLinguistListBox', 'assignedLinguistListBox');" /><br /><br /> <input type="button" name="left" value="&lt;&lt;" onclick="Javascript:MoveItem('assignedLinguistListBox', 'availableLinguistListBox');" /> </td> <td> <asp:Label ID="assignedLinguistLabel" runat="server" Text="Assigned To"></asp:Label><br /> <asp:ListBox ID="assignedLinguistListBox" runat="server" Rows="10" SelectionMode="Multiple"></asp:ListBox> </td> </tr> </table> //-snip- <asp:Button ID="save_task_changes_button" runat="server" ToolTip="Click to save changes to task" Text="Save Changes" OnClick="save_task_changes_button_click" OnClientClick="Javascript:PopulateAssignedIDHiddenInput()" /> </asp:Panel> <!-- Hidden Inputs --> <!-- Note that I have also tried setting runat="server" with no change --> <input id="assignedIDHiddenInput" name="assignedIDHiddenInput" type="hidden" /> </div> </form> </body> c# protected void save_task_changes_button_click(object sender, EventArgs e) { string assignedIDs = Request.Form["assignedIDHiddenInput"]; // Here, assignedIDs == ""; also, Request.Params["assignedIDHiddenInput"] == "" // -snip- }

    Read the article

  • datalist edit mode.

    - by Ranjana
    i have a datalist control <ItemTemplate> <tr> <td height="31px"> <asp:Label ID="lblStudentName" runat="server" Text="StudentName :" Font-Bold="true"></asp:Label> <%# DataBinder.Eval(Container.DataItem, "StudentName") %> </td> <td height="31px"> <asp:LinkButton ID="lnkEdit" runat="server" CommandName="edit">Edit</asp:LinkButton> </td> </tr> <tr> <td> <asp:Label ID="lblAdmissionNo" runat="server" Text="AdmissionNo :" Font-Bold="true"></asp:Label> <%# DataBinder.Eval(Container.DataItem, "AdmissionNo")%> </td> </tr> <tr> <td height="31px"> <asp:Label ID="lblStudentRollNo" runat="server" Text="StdentRollNo :" Font-Bold="true"></asp:Label> <%# DataBinder.Eval(Container.DataItem, "StdentRollNo") %> </td> <td height="31px"> <asp:LinkButton ID="lnkEditroll" runat="server" CommandName="edit">Edit</asp:LinkButton> </td> </tr> </ItemTemplate> <EditItemTemplate> <tr> <td height="31px"> <asp:Label ID="lblStudentName" runat="server" Text="StudentName :" Font-Bold="true"></asp:Label> <asp:TextBox ID="txtProductName" runat="server" Text='<%# DataBinder.Eval(Container.DataItem, "StudentName") %>'></asp:TextBox> </td> <td> <asp:LinkButton ID="lnkUpdate" runat="server" CommandName="update">Update</asp:LinkButton> <asp:LinkButton ID="lnkCancel" runat="server" CommandName="cancel">Cancel</asp:LinkButton> </td> </tr> <tr> <td height="31px"> <asp:Label ID="lblAdmissionNo" runat="server" Text="AdmissionNo :" Font-Bold="true"></asp:Label> <%# DataBinder.Eval(Container.DataItem, "AdmissionNo")%> </td> </tr> <tr> <td height="31px"> <asp:Label ID="lblStudentRollNo" runat="server" Text="StudentRollNo :" Font-Bold="true"></asp:Label> <asp:TextBox ID="txtStudentRollNo" runat="server" Text='<%# DataBinder.Eval(Container.DataItem, "StdentRollNo") %>'></asp:TextBox> </td> <td> <asp:LinkButton ID="LinkButton1" runat="server" CommandName="update">Update</asp:LinkButton> <asp:LinkButton ID="LinkButton2" runat="server" CommandName="cancel">Cancel</asp:LinkButton> </td> </tr> </EditItemTemplate> <FooterTemplate> </table> </FooterTemplate> </asp:DataList> code behind: protected void Page_Load(object sender, EventArgs e) { if (!Page.IsPostBack) { DataTable dt = new DataTable(); dt = obj.GetSamples(); DataList1.DataSource = dt; DataList1.DataBind(); } } public void DataBind() { DataTable dt = new DataTable(); dt = obj.GetSamples(); DataList1.DataSource = dt; DataList1.DataBind(); } protected void DataList1_EditCommand1(object source, DataListCommandEventArgs e) { DataList1.EditItemIndex = e.Item.ItemIndex; DataBind(); } protected void DataList1_CancelCommand1(object source, DataListCommandEventArgs e) { DataList1.EditItemIndex = -1; DataBind(); } protected void DataList1_UpdateCommand1(object source, DataListCommandEventArgs e) { // Get the DataKey value associated with current Item Index. // int AdmissionNo = Convert.ToInt32(DataList1.DataKeys[e.Item.ItemIndex]); string AdmissionNo = DataList1.DataKeys[e.Item.ItemIndex].ToString(); // Get updated value entered by user in textbox control for // ProductName field. TextBox txtProductName; txtProductName = (TextBox)e.Item.FindControl("txtProductName"); TextBox txtStudentRollNo; txtStudentRollNo = (TextBox)e.Item.FindControl("txtStudentRollNo"); // string variable to store the connection string // retrieved from the connectionStrings section of web.config string connectionString = ConfigurationManager.ConnectionStrings["MyConnectionString"].ConnectionString; // sql connection object SqlConnection mySqlConnection = new SqlConnection(connectionString); // sql command object initialized with update command text SqlCommand mySqlCommand = new SqlCommand("update SchoolAdmissionForm set StudentName=@studentname ,StdentRollNo=@studentroll where AdmissionNo=@admissionno", mySqlConnection); mySqlCommand.Parameters.Add("@studentname", SqlDbType.VarChar).Value = txtProductName.Text; mySqlCommand.Parameters.Add("@admissionno", SqlDbType.VarChar).Value = AdmissionNo; mySqlCommand.Parameters.Add("@studentroll", SqlDbType.VarChar).Value = txtStudentRollNo.Text; // check the connection state and open it accordingly. if (mySqlConnection.State == ConnectionState.Closed) mySqlConnection.Open(); // execute sql update query mySqlCommand.ExecuteNonQuery(); // check the connection state and close it accordingly. if (mySqlConnection.State == ConnectionState.Open) mySqlConnection.Close(); // reset the DataList mode back to its initial state DataList1.EditItemIndex = -1; DataBind(); // BindDataList(); } But it works fine.... but when i click edit command both the Fields 1.StudentName 2.StudentRollNo im getting textboxes to all the fields where i placed textbox when i click 'edit' command and not the particular field alone . but i should get oly the textbox visible to the field to which i clik as 'edit' , and the rest remain same without showing textboxes even though it is in editmode

    Read the article

1