This is a migrated thread and some comments may be shown as answers.

master detail same page using radgrid and form controls

1 Answer 83 Views
GridView
This is a migrated thread and some comments may be shown as answers.
David
Top achievements
Rank 1
David asked on 06 Aug 2013, 02:57 PM
I have a  rad grid which i am populating on from the context ie .


          BindingSource bs = new BindingSource();
            bs.DataSource = pamsContext.GetAppraisal(false).ToList();
            grvappraisal.DataSource = bs;

I have a list which contains apprisal id record id , next date  , apprisaed by

on the right on the same form I have notes and a couple of date drop down what I am wanting to no is using the entity frame work how do i store the values on the right hand side so I can later save them to the entity.

any help is appreciated 

1 Answer, 1 is accepted

Sort by
0
George
Telerik team
answered on 09 Aug 2013, 11:45 AM
Hi David,

Thank you for writing.

I find it hard to understand what exactly you are are trying to achieve from the provided information. However in case you want to save dates from a calendar column you can subscribe to the CellEndEdit event of the grid and add it to a temporary list or the database:
private List<DateTime> dates = new List<DateTime>();
void grid_CellEndEdit(object sender, GridViewCellEventArgs e)
{
    if (e.ActiveEditor is RadDateTimeEditor)
    {
        dates.Add((DateTime)e.Value);
    }
 
    //or
 
    using (DbContext db = new DbContext())
    {
        db.Dates.Add((DateTime)e.Value);
        db.SaveChanges();
    }
}

If this is not the case I would like to kindly ask you to provide me with more detailed information.

I hope this information is helpful. If you need any further assistance, please let me know.
 
Regards,
George
Telerik
TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for WINFORMS.
Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
Sign up for Free application insights >>
Tags
GridView
Asked by
David
Top achievements
Rank 1
Answers by
George
Telerik team
Share this question
or