How to enter a value into datagrid cell in wpf through manually?

Hi,
    Here my datagrid rows are in readonly mode here how can i enter the values in to the datagrid cell.(means how can i edit the cell value).i am adding the value to datagrid through programetically, I think  for this reason my datagrid rows
are visible in readonly mode. Then how can i edit. Please guide me.
Regards,
Bhadram

Hi Barry,
   Thank you for your reply, Now i sending my sample please check it once and suggest me.
MainWindow.xaml.cs
private void Save_Click(object sender, RoutedEventArgs e)
 List<CustomerMainViewModel> customer = new List<CustomerMainViewModel>(); customerviewmodel.NameTextField = tbName.Text;
customerviewmodel.AddressTextField = tbAddress.Text;
customerviewmodel.CountryField = countryddl.Text;
customerviewmodel.StateField = stateddl.Text;
customerviewmodel.Product = customerviewmodel.Product1 + "," + customerviewmodel.Product2;
foreach(string str in customerviewmodel.actionCollection)
customerviewmodel.ActionColl.Add(str);
customerviewmodel.actionCollection.Clear();
customer.Add(customerviewmodel);
dataGrid1.Items.Add(customer);
MessageBox.Show("Data Successfully Saved", " MessageBox", MessageBoxButton.OK, MessageBoxImage.Asterisk);
clearValues();
MainWindow.xaml
<DataGrid
Height="144"
HorizontalAlignment="Left"
Margin="79,447,0,0"
Name="dataGrid1"
VerticalAlignment="Top" CanUserAddRows="True"
Width="399" Grid.RowSpan="2" IsReadOnly="False">
<DataGrid.Columns>
<DataGridTextColumn Header="NAME" Binding="{Binding NameTextField,Mode=TwoWay}" Width="Auto" IsReadOnly="False" />
<DataGridTextColumn Header="ADDRESS" Binding="{Binding AddressTextField,Mode=TwoWay}" Width="Auto" IsReadOnly="False"/>
<DataGridTextColumn Header="GENDER" Binding="{Binding GenderField,Mode=TwoWay}" Width="Auto" IsReadOnly="False"/>
<DataGridTextColumn Header="COUNTRY" Binding="{Binding CountryField,Mode=TwoWay}" Width="Auto" IsReadOnly="False"/>
<DataGridTextColumn Header="STATE" Binding="{Binding StateField,Mode=TwoWay}" Width="Auto" IsReadOnly="False"/>
<DataGridTextColumn Header="PRODUCT" Binding="{Binding Product,Mode=TwoWay}" Width="Auto" IsReadOnly="False"/>
<DataGridTemplateColumn Header="ACTION" MinWidth="140" IsReadOnly="False">
<DataGridTemplateColumn.CellTemplate>
<DataTemplate>
<ComboBox x:Name="actionddl" ItemsSource="{Binding ActionColl}"/>
</DataTemplate>
</DataGridTemplateColumn.CellTemplate>
</DataGridTemplateColumn>
</DataGrid.Columns>
</DataGrid>
In the above "xaml" file i am using the attribute "Readonly="False"" but its not effected on my code still my datagrid is in readonly mode, i don't know why it happens. 
And I am adding data to my datagrid through "Wpf controls (TextBox,CheckBox,ComboBox and etc...)"  while click on "save" button the data added to grid. adding to grid works properly but the entire row is in readonly mode. How can
i solve my problem.  

Similar Messages

  • How to enter the values in JTable in runtime

    how to enter the values in JTable in runtime

    Basically you need a vector of vectors or an array of arrays. Example (off the top of my head):
    With Arrays
    String[] cols = { "colone", "coltwo", "colthree", "colfour", "colfive" };
    String[] numbers = { "one", "two", "three", "four", "five" };
    String[] letters = { "A", "B", "C", "D", "E" };
    String[][] data = { numbers, letters };
    //make sure that the table has a scroll pane wrapped around it otherwise the header is not displayed
    JScrollPane scroll = new JScrollPane(new JTable(data, cols));
    With Vectors
    Vector cols = new Vector();
    cols.addElement("colone");
    cols.addElement("coltwo");
    cols.addElement("colthree");
    cols.addElement("colfour");
    cols.addElement("colfive");
    Vector numbers = new Vector();
    numbers.addElement("one");
    numbers.addElement("two");
    numbers.addElement("three");
    numbers.addElement("four");
    numbers.addElement("five");
    Vector letters = new Vector();
    numbers.addElement("A");
    numbers.addElement("B");
    numbers.addElement("C");
    numbers.addElement("E");
    numbers.addElement("F");
    Vector data = new Vector();
    data.addElement(numbers);
    data.addElement(letters);
    //make sure that the table has a scroll pane wrapped around it otherwise the header is not displayed
    JScrollPane scroll = new JScrollPane(new JTable(data, cols));The array or vector can be easily populated at runtime.
    Regards
    Riz

  • Have a problem in Numbers with entering data directly into a cell when a table reaches a certain size and special characters are used?

    I am creating a list of words with special characters in some of them. I get to a point where I cannot enter data directly into the cell. I have to use the data entry bar at the top in the toolbar. Any solutions available?
    This is the table I am creating...
    From row 25 on, I am only able to enter data into the cell through the toolbar at the top and not directly into the cell itself. I believe that this problem originates from the special characters I have inserted in the previous records because if I do not use special characters, then the spreadsheet acts flawlessly. Have there been issues in Numbers with data entry, the size of a table, and using special characters?

    I would try removing the rows with "special" characters one at a time to see which one is causing the problem

  • How to pass src value into img tag in ADF

    Hi,
    My Dev : 11.1.2.3.0
    How to pass row values into <img> tag.,I used the below code but it's taking empty.,
    I tried both ways like #{row.CdFilePath}   and   ${row.CdFilePath}
    <af:iterator var="row"
                      value="#{bindings.xxx.collectionModel}"
                     id="i2">
         <img src='/ShowImage?src=#{row.CdFilePath}' border='0' style="width:100px; height:100px; margin:5px;"/>
    </af:iterator>
    Please tell me any other option is there..
    Thanks

    This works if you use a normal table so I guess it should work here too.
    Are you sure the el #{row.CdFilePath} return something?
    Why don't you use the adf image tag <af:image source="/ShowImage?src=#{row.CdFilePath}".../> instead of the html img tag?
    Should the src property not be enclosed with " instead of your '?
    Timo

  • Pasteing a value into another cell

    I have a formula from another cell in another page. I want to insert only the value into another cell. Paste Special / Value is what I used to choose from Excel?

    In Numbers,
    Menu > Edit > Paste Values.
    Regards,
    Ian.

  • How to store xml data into file in xml format through java program?

    HI Friends,
    Please let me know
    How to store xml data into file in xml format through java program?
    thanks......
    can discuss further at messenger.....
    Avanish Kumar Singh
    Software Engineer,
    Samsung India Development Center,
    Bangalore--560001.
    [email protected]

    Hi i need to write the data from an XML file to a Microsoft SQL SErver database!
    i got a piece of code from the net which allows me to parse th file:
    import java.io.IOException;
    import org.xml.sax.*;
    import org.xml.sax.helpers.*;
    import org.apache.xerces.parsers.SAXParser;
    import java.lang.*;
    public class MySaxParser extends DefaultHandler
    private static int INDENT = 4;
    private static String attList = "";
    public static void main(String[] argv)
    if (argv.length != 1)
    System.out.println("Usage: java MySaxParser [URI]");
    System.exit(0);
    String uri = argv[0];
    try
    XMLReader parser = XMLReaderFactory.createXMLReader("org.apache.xerces.parsers.SAXParser");
    MySaxParser MySaxParserInstance = new MySaxParser();
    parser.setContentHandler(MySaxParserInstance);
    parser.parse(uri);
    catch(IOException ioe)
    ioe.printStackTrace();
    catch(SAXException saxe)
    saxe.printStackTrace();
    private int idx = 0;
    public void characters(char[] ch, int start, int length)
    throws SAXException
    String s = new String(ch, start, length);
    if (ch[0] == '\n')
    return;
    System.out.println(getIndent() + " Value: " + s);
    public void endDocument() throws SAXException
    idx -= INDENT;
    public void endElement(String uri, String localName, String qName) throws SAXException
    if (!attList.equals(""))
    System.out.println(getIndent() + " Attributes: " + attList);
    attList = "";
    System.out.println(getIndent() + "end document");
    idx -= INDENT;
    public void startDocument() throws SAXException
    idx += INDENT;
    public void startElement(String uri,
    String localName,
    String qName,
    Attributes attributes) throws SAXException
    idx += INDENT;
    System.out.println('\n' + getIndent() + "start element: " + localName);
    if (localName.compareTo("Machine") == 0)
    System.out.println("YES");
    if (attributes.getLength() > 0)
    idx += INDENT;
    for (int i = 0; i < attributes.getLength(); i++)
    attList = attList + attributes.getLocalName(i) + " = " + attributes.getValue(i);
    if (i < (attributes.getLength() - 1))
    attList = attList + ", ";
    idx-= INDENT;
    private String getIndent()
    StringBuffer sb = new StringBuffer();
    for (int i = 0; i < idx; i++)
    sb.append(" ");
    return sb.toString();
    }// END PRGM
    Now , am not a very good Java DEv. and i need to find a soln. to this prob within 1 week.
    The next step is to write the data to the DB.
    Am sending an example of my file:
    <Start>
    <Machine>
    <Hostname> IPCServer </Hostname>
    <HostID> 80c04499 </HostID>
    <MachineType> sun4u [ID 466748 kern.info] Sun Ultra 5/10 UPA/PCI (UltraSPARC-IIi 360MHz) </MachineType>
    <CPU> UltraSPARC-IIi at 360 MHz </CPU>
    <Memory> RAM : 512 MB </Memory>
    <HostAdapter>
    <HA> kern.info] </HA>
    </HostAdapter>
    <Harddisks>
    <HD>
    <HD1> c0t0d0 ctrl kern.info] target 0 lun 0 </HD1>
    <HD2> ST38420A 8.2 GB </HD2>
    </HD>
    </Harddisks>
    <GraphicCard> m64B : PCI PGX 8-bit +Accel. </GraphicCard>
    <NetworkType> hme0 : Fast-Ethernet </NetworkType>
    <EthernetAddress> 09:00:30:C1:34:90 </EthernetAddress>
    <IPAddress> 149.51.23.140 </IPAddress>
    </Machine>
    </Start>
    Note that i can have more than 1 machines (meaning that i have to loop thru the file to be able to write to the DB)
    Cal u tellme what to do!
    Even better- do u have a piece of code that will help me understand and implement the database writing portion?
    I badly need help here.
    THANX

  • Is there a way to preserve interactivity within a table so that users of an iBook can enter new values in selected cells and have formulas recalculated with that input?

    I would like to include interactive tables that would recalculate using formulas I have written and values that the reader/user has entered into selected cells. The tables I've made in iBooks Author do contain formulas that work as expected...until exported to an iPad, then they look and act just like a static table. I am not looking for serious number crunching or high-end mathematics, although others might find great value in such capability.
    To work without a reader/user accidentally (or otherwise) altering formulas or formatting it would be necessary to lock some or most cells of the table. At present all cells are locked after export. Apple doesn't seem to envision or value the functionality of such a feature; it appears to me missing from Numbers as well.

    Should be near trivial to execute on with an app...
    As welll, I wouldn't be surprised if a dashcode widget would fit the bill.
    As always, feel free to use the 'Provide iBooks Author Feedback' menu item for features you'd like added in the future, etc.
    http://www.apple.com/feedback/ibooks-author.html

  • How do i store value into my itunes account?

    i have never used an itunes music store gift certificate before, in fact i only made one purchase in itunes before, and that was because i was just playing with my itunes setting and didn't know there was no final confirmation stage to cancel a purchase.
    anyway, a friend of mine give me an one hundred dollar gift certificate, and i have no idea where to store the value into my itunes account. can someone please help me out with it?
    in addition, the way my name appeared on the gift certificate is a little different from how i had entered it in itunes. will that cause any problem?
    any assistance would be greatly appreciated. thanks.

    It will store it in your iTunes music store account
    The name/spelling does not matter.
    Open iTunes.
    Select Music Store.
    On the left side of the store under Account, select Gift Certificate, then Redeem.
    Enter the number on the Gift Certificate and then click Redeem.
    This amount will be added to your iTunes store account and you can use it whenever you want. You don't need to do it all at once either.

  • How to pass Default value of a cell in to input control

    Hello Guys,
    We have a WEBI which has a floating cell and populated as Today's Date everyday when user runs it. Now user wants little modification and wants Input control for Date. He also wants to pass on the values selected in input control to that floating cell. How can I do that?
    Any suggestions?
    Regards
    Aj

    Hi nitya,
    I think u didnot get my requirement.
    my requirement is i have an complete editable ALV with all fields as input fields.
    now when i enter a value under material and press enter  i need to capyure the
    material value and based on the material value i need to get the details and populate all those values in the respective fields.
    All i need to do is get the material number that is entered.
    in the pdf of using ALV events it is such that editable cell editors trigger ON_DATA_CHANGED  event and non-editable cell editors trigger ON_CLICK event.
    But i couldnot find the ON_DATA_CHANGED event in the ALV events.
    Help me out in finding the event.
    Cheers,
    Madhu

  • How to insert column values into database as rows

    Hi,
    I have 8 columns and some not null columns. Based on not null columns I want to insert into table as rows. The 8 columns may contain values or no value. If the first column contains data, then I have to insert into one row. if the second column contains data I have to insert a row and in second column. respectively...So How can I insert column values into rows. Can I write 8 insert statements. (OR) is it possible to insert data from columns using where clause.
    Please help me out....
    Thanks in Advance

    Lines Table:
    line_id, orcl_bank_account_num, product_type, service_type, lease_type,
    funding_type, cpi, billing_frequency_unit_cd , annual_due_date ,
    pricing_start_date, pricing_end_date, install_date, contract_end_date ,
    prdct_replacement_cost_amt, cradle_replacement_amt, supranet_contract,
    issuance_fee, board_inactive_date, header_id, creation_date, last_modified_date,
    created_by_nam, modified_by_nam, activeinactive_flg, prdct_bill_amt_yr1,
    prdct_bill_amt_yr2, prdct_bill_amt_yr3, prdct_bill_amt_yr4, prdct_bill_amt_yr5,
    prdct_bill_amt_yr6, prdct_bill_amt_yr7, prdct_bill_amt_yr8, activation_fee_yr1,
    activation_fee_yr2, activation_fee_yr3, activation_fee_yr4, activation_fee_yr5,
    activation_fee_yr6, activation_fee_yr7, activation_fee_yr8,
    In this table the columns structure is :
    -- PRDCT_BILL_AMT_YR (1 to 8) NUMBER(14,4)
    -- ACTIVATION_FEE_YR (1 to 8) NUMBER(8,2)
    I have one more table:
    PRDCT_INS_AMT               NUMBER(14,4)
    ACTIVATION_FEE_AMT          NUMBER(14,4)
    I want to insert prdct_bill_amt_yr (1 to 8) columns data into PRDCT_INS_AMT column. similarly activation_fee (1 to 8) columns data.
    But the data should be inserted based product_type, service_type, lease_type columns values. (These 3 columns may contain upto 45 combinations).

  • How to enter negative value in a currency field

    Hi Experts,
    Please help me how to allow to enter negative value in a field on report selection.
    I created a currency field on a report selection using PARAMETERS.
    I can enter positive value in the field. But, I cannot enter negative value.
    SAP shows an error message 00 126 "Specify positive values only".
    I know I can place check ON at "with sign" option of the field in case I create the screen by myself.
    However, I cannot do it on screen 1000 created by report program.
    Thanks,
    George

    Hi ,
    I know I can place check ON at "with sign" option of the field in case I create the screen by myself.
        Prabhu--> Just Create a new Domain( select "WITH SIGN") and date elemet,And Use Data Element in your report.
    regards
    Prabhu

  • How to read the value of OLAPDataGrid cell/s from external object

    Hi,
    I have an OLAPDataGrid control in an Adobe flex application,
    and I am using the cutom renderer to render the cells of the
    OLAPDataGrid ,
    any Idea how I can read the value of each cell at the
    renderer , so I will be able to decide about the actions for each
    cell at the renderer?

    "j_shawqi" <[email protected]> wrote in
    message
    news:gkqgdl$539$[email protected]..
    > Hi,
    > I have an OLAPDataGrid control in an Adobe flex
    application,
    > and I am using the cutom renderer to render the cells of
    the OLAPDataGrid
    > ,
    > any Idea how I can read the value of each cell at the
    renderer , so I will
    > be
    > able to decide about the actions for each cell at the
    renderer?
    I'm thinking that you'll need to look at the listData
    property. I'm not
    sure what you get in an OLAP Grid that orients you to your
    cell position,
    but I'd set a break point in the listData override of your
    renderer and see
    what you actually have, or look at the docs for the data type
    of the
    listData object that the default renderer expects to get.
    HTH;
    Amy

  • How to enter a value versus picking one from the pop-up menu?

    I am new to numbers and am using version 3.5.2.  I understand one can define a Pop-Up for cell value selection, but what if I want to also be able to specify a value that is not in the pull down?  I thought "start with blank" would do the trick, but it won't let me enter any values.  Thanks in advance for your suggestions!

    Hi Sultry,
    If your entry is a one time deal you could just delete the cells value and type in your choice. If you want to update your popup you need ot redefine its values. And then of course replace your old popups with your new one.
    quinn

  • How to add one value into Input Entry Screen of Element

    Hi ,
    How to change the "Input Value" of Element which has already been processed and assigned. Its not allowing to update even though its been date tracked.
    I want to add one more Value into Input Value screen.
    Thanks
    Ram

    You cannot remove existing input values or add new one if you have created any entries for the element
    to know more details to maintain an element you can refer the following link
    http://ramesh-oraclehrms.blogspot.com/2007/08/maintaining-element.html
    Regards
    Ramesh Kumar S

  • How to put Variable value into Labeltext of a subcomponent WIB

    Hello
    In our Web Based Planning tool we uses Tabstrib_control component and the Label-Text is filled like 'Plan 2008'. (Our BPS = 3.5 and Web interface builder)
    I am looking for a way,how to put a variable into the Label field of the component.  I am not sure if there is a possibility to enhance the labelfield with variable values.
    Thanks a lof for any good idea.
    Best regards
    Christian
    Our BPS = 3.5 and Web interface builder

    Hello Christian,
    Maybe I have a solution for your problem.
    1. Create subcomponent "Selector variable" with your variable.
    2. Hide this new subcomponent
    3. Write in the Label-Text: <%=descr("Name of new subcomponent"/value)%>
    If the variable will be selected by the user in the web interface, put the name of this selector in the field "Update upon Change of" in the properties of the new created subcomponent.
    Hope this helps.
    Friedrich

Maybe you are looking for

  • How can I change my iCal times to be listed in 12 hour format?

    I have the system set for 12 hour but it does not seem to carry over to iCal.  I have restarted since changing the system to 12-hour clock. By the way, I mean the little timeline running down the left hand side in week view.  Individual appointments

  • Can I export values from an excel spreadsheet into a dropdown field in Acrobat?

    I'm creating a form in Acrobat with a dropdown field as an option, I would like to know if I could export the values from an Excel spreadsheet into this field (there are 600 records)?

  • Indication of Virtual Copy in Develop Module

    I'm working on Virtual Copies right now. Is there any indication within the Develop Module where I would see that what I'm workin on is a VC or an original? Not seeing it at all is kind of dangerous ... Beat Gossweiler Switzerland

  • XSQL-007 using Personal Oracle 8.1.6

    I get XSQL-007: Cannot acquire a database connection to process page. Io exception: The Network Adapter could not establish the connection message when running hello world demo. I have set up Oracle 8i on Windows 98, installed Oracle 8.1.6 for Window

  • Pixilate part of image or use black box...

    I want to try pixilating part of a screen or using a black box on one of my movies. Like they do when they are trying to disguise someone's face... Is this possible with IMovie? Can someone point me in the right direction to figure out how to do it?