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

GridView Resposive Design

9 Answers 94 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Kashif
Top achievements
Rank 1
Kashif asked on 28 Sep 2019, 03:21 PM

Hello Admins,

I want to develop a Responsive DataGrid Record insertion.

Like When I have to add Data from List<Objects>.

  • I want to Show RowByRow insertion.
  • How can i show waiter control while loading the data From the List.

What will be Best Solution can be applied in both scenarios.

9 Answers, 1 is accepted

Sort by
0
Dess | Tech Support Engineer, Principal
Telerik team
answered on 01 Oct 2019, 10:46 AM

Hello, Kashif,    

If you need to add row by row in RadGridView and this behavior to be noticeable for the end user, I would suggest you to use a timer. Please refer to the below code snippet which result is illustrated in the attached gif file:

        BindingList<Item> items = new BindingList<Item>();

        public RadForm1()
        {
            InitializeComponent();
            this.radGridView1.DataSource = items;
            this.radGridView1.AutoSizeColumnsMode = GridViewAutoSizeColumnsMode.Fill;
        }

        private void timer1_Tick(object sender, EventArgs e)
        {
            items.Add(new Item(items.Count, "Item" + items.Count));
        }

        public class Item
        {
            public int Id { get; set; }

            public string Name { get; set; }

            public Item(int id, string name)
            {
                this.Id = id;
                this.Name = name;
            }
        }

        private void radButton1_Click(object sender, EventArgs e)
        {
            if (!this.timer1.Enabled)
            {
                this.timer1.Start();
            }
            else
            {
                this.timer1.Stop();
            }
        }

As to the waiting indicator, you can use RadWaitingBar which allows you to associate it to any control indicating its load time. The following help article demonstrates a sample approach: https://docs.telerik.com/devtools/winforms/controls/track-and-status-controls/waitingbar/associated-control

I hope this information helps. If you need any further assistance please don't hesitate to contact me. 

Regards,
Dess | Tech Support Engineer, Sr.
Progress Telerik

Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
0
Kashif
Top achievements
Rank 1
answered on 01 Oct 2019, 07:18 PM

thank you very much. Your example help me a lot.

Can u provide code used in WaitingIndicator.gif.

 

thank you

0
Accepted
Dess | Tech Support Engineer, Principal
Telerik team
answered on 02 Oct 2019, 01:15 PM

Hello, Kashif,    

I have attached my sample project for your reference.

I hope it would be helpful.

Regards,
Dess | Tech Support Engineer, Sr.
Progress Telerik

Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
0
Kashif
Top achievements
Rank 1
answered on 02 Oct 2019, 01:38 PM
Thank you Very Much.
0
Kashif
Top achievements
Rank 1
answered on 02 Oct 2019, 04:12 PM

Using Associated Control with ONE control is working fine.

Can we Use associated control property for the whole form, including other controls(like buttons, textboxes etc) on the form.

Or there will any other method for doing this.

0
Accepted
Dess | Tech Support Engineer, Principal
Telerik team
answered on 03 Oct 2019, 01:10 PM
Hello, Kashif,    

I would suggest you to use a RadPanel as an associated control for the waiting bar. Thus, you can place different controls in the panel and the waiting indication will be shown over all the controls that are hosted in the panel.

I hope this information helps.

 

Regards,
Dess | Tech Support Engineer, Sr.
Progress Telerik

Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
0
Kashif
Top achievements
Rank 1
answered on 03 Oct 2019, 01:20 PM

Thank you for the suggestion.

0
Kashif
Top achievements
Rank 1
answered on 17 Oct 2019, 07:15 PM

Using waiting bar in timer control is working perfectly.

Now an other requirement.

I'm Assigning DataTable to GridView Data Source Property.

How to show progress/WaitingBar while form is Fetching the Data in the Data table and assigning it to Gridview.DataSource

0
Dess | Tech Support Engineer, Principal
Telerik team
answered on 22 Oct 2019, 05:16 AM
Hello, Kashif,      

For long-lasting operations like extracting data from the database for example, it is suitable to use a BackgroundWorker. Thus, the main UI thread won't be busy with this operation. 

I would recommend you to have a look at the following help article which demonstrates how to show a waiting bar while a background operation is being executed: https://docs.telerik.com/devtools/winforms/controls/track-and-status-controls/waitingbar/using-waitingbar-with-a-background-worker

I hope this information helps. If you need any further assistance please don't hesitate to contact me. 

 

Regards,
Dess | Tech Support Engineer, Sr.
Progress Telerik

Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
Tags
GridView
Asked by
Kashif
Top achievements
Rank 1
Answers by
Dess | Tech Support Engineer, Principal
Telerik team
Kashif
Top achievements
Rank 1
Share this question
or