Click here to Skip to main content
15,798,825 members
Home / Discussions / C#
   

C#

 
AnswerRe: I still didnt figure out how to upate a DGV without pressing enter Pin
Richard MacCutchan22-Jul-22 2:05
mveRichard MacCutchan22-Jul-22 2:05 
GeneralRe: I still didnt figure out how to upate a DGV without pressing enter Pin
grennday26-Jul-22 3:15
grennday26-Jul-22 3:15 
GeneralRe: I still didnt figure out how to upate a DGV without pressing enter Pin
Richard MacCutchan26-Jul-22 3:25
mveRichard MacCutchan26-Jul-22 3:25 
QuestionPutting event handler codes inside DoWork delegate for asynchronous multi-threaded calculations Pin
Code4Ever15-Jul-22 19:35
Code4Ever15-Jul-22 19:35 
AnswerRe: Putting event handler codes inside DoWork delegate for asynchronous multi-threaded calculations Pin
OriginalGriff15-Jul-22 20:45
mvaOriginalGriff15-Jul-22 20:45 
GeneralRe: Putting event handler codes inside DoWork delegate for asynchronous multi-threaded calculations Pin
Code4Ever15-Jul-22 20:50
Code4Ever15-Jul-22 20:50 
GeneralRe: Putting event handler codes inside DoWork delegate for asynchronous multi-threaded calculations Pin
OriginalGriff15-Jul-22 21:00
mvaOriginalGriff15-Jul-22 21:00 
GeneralRe: Putting event handler codes inside DoWork delegate for asynchronous multi-threaded calculations Pin
Code4Ever15-Jul-22 20:52
Code4Ever15-Jul-22 20:52 
I used the following code for getting data from SQLite:

private void dataPager_OnDemandLoading(object sender, Syncfusion.UI.Xaml.Controls.DataPager.OnDemandLoadingEventArgs args)
        {
            List<int> list = new List<int>()
            {
                int.Parse(args.StartIndex.ToString()),
                int.Parse(args.PageSize.ToString())
            };

            BackgroundWorker worker = new BackgroundWorker();
            worker.WorkerReportsProgress = false;

            worker.DoWork += worker_DoWork;
            worker.RunWorkerAsync(list);
        }

        void worker_DoWork(object sender, DoWorkEventArgs e)
        {
            List<int> value = (List<int>)e.Argument;
            List<Equipment> data;
            using (var _sqliteContext = new SQLiteContext())
            {
                data = _sqliteContext.Equipments.Include(x => x.CostCenter).Skip(value[0]).Take(value[1]).ToList();
            }
            this.Dispatcher.Invoke(() =>
            {
                dataPager.LoadDynamicItems(value[0], data);
                //resetting cache for all pages.
                (dataPager.PagedSource as PagedCollectionView).ResetCache();
            });
        }


There is no runtime error but the table in the UI is empty.
GeneralRe: Putting event handler codes inside DoWork delegate for asynchronous multi-threaded calculations Pin
OriginalGriff15-Jul-22 21:02
mvaOriginalGriff15-Jul-22 21:02 
GeneralRe: Putting event handler codes inside DoWork delegate for asynchronous multi-threaded calculations Pin
Code4Ever15-Jul-22 21:04
Code4Ever15-Jul-22 21:04 
GeneralRe: Putting event handler codes inside DoWork delegate for asynchronous multi-threaded calculations Pin
Richard Andrew x6417-Jul-22 5:00
professionalRichard Andrew x6417-Jul-22 5:00 
AnswerRe: Putting event handler codes inside DoWork delegate for asynchronous multi-threaded calculations Pin
Gerry Schmitz16-Jul-22 6:13
mveGerry Schmitz16-Jul-22 6:13 
AnswerRe: Putting event handler codes inside DoWork delegate for asynchronous multi-threaded calculations Pin
Richard Deeming17-Jul-22 21:55
mveRichard Deeming17-Jul-22 21:55 
QuestionDisposing issue when trying to load data from SQLite database Pin
Code4Ever14-Jul-22 21:22
Code4Ever14-Jul-22 21:22 
AnswerRe: Disposing issue when trying to load data from SQLite database Pin
Richard MacCutchan14-Jul-22 22:18
mveRichard MacCutchan14-Jul-22 22:18 
GeneralRe: Disposing issue when trying to load data from SQLite database Pin
Code4Ever14-Jul-22 22:30
Code4Ever14-Jul-22 22:30 
QuestionCould not Load type spride Pin
Luis M. Rojas7-Jul-22 5:58
Luis M. Rojas7-Jul-22 5:58 
AnswerRe: Could not Load type spride Pin
Pete O'Hanlon7-Jul-22 22:39
subeditorPete O'Hanlon7-Jul-22 22:39 
QuestionRe: Could not Load type spride Pin
Richard MacCutchan8-Jul-22 0:29
mveRichard MacCutchan8-Jul-22 0:29 
QuestionJSDOC '@extends' is not attached to class Pin
Luis M. Rojas4-Jul-22 6:00
Luis M. Rojas4-Jul-22 6:00 
AnswerRe: JSDOC '@extends' is not attached to class Pin
Pete O'Hanlon4-Jul-22 6:04
subeditorPete O'Hanlon4-Jul-22 6:04 
GeneralRe: JSDOC '@extends' is not attached to class Pin
Luis M. Rojas4-Jul-22 6:18
Luis M. Rojas4-Jul-22 6:18 
GeneralRe: JSDOC '@extends' is not attached to class Pin
Pete O'Hanlon4-Jul-22 20:55
subeditorPete O'Hanlon4-Jul-22 20:55 
GeneralRe: JSDOC '@extends' is not attached to class Pin
Luis M. Rojas5-Jul-22 3:33
Luis M. Rojas5-Jul-22 3:33 
AnswerRe: JSDOC '@extends' is not attached to class Pin
Richard MacCutchan4-Jul-22 6:49
mveRichard MacCutchan4-Jul-22 6:49 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.