Adding row to databound Datagridview

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • =?Utf-8?B?Tmljaw==?=

    #1

    Adding row to databound Datagridview

    Hello,

    I've got a DataGridView that I have bound to a stored procedure. I'm using
    LINQ, so this is basically what I have (this was created using SQLMetal):

    public ISingleResult<S toredProcedure1 Result>
    StoredProcedure 1([Parameter(DbTyp e="Int")] System.Nullable <intparam1)
    {
    IExecuteResult result = this.ExecuteMet hodCall(this,
    ((MethodInfo)(M ethodInfo.GetCu rrentMethod())) , param1);
    return ((ISingleResult <StoredProcedur e1Result>)(resu lt.ReturnValue) );
    }


    Then I just set the datasource for my datagrid:

    datagridview1.D ataSource = StoredProcedure 1(param);


    My question is this. I want to be able to add a row to the datagrid. How can
    I do that? I don't want to add the data to the database until the user
    submits the form. Could someone point me in the right direction?

    Thanks for any help, I really appreciate it.

    Thanks,
    Nick
Working...