RadialGauge on Gridview

14 posts, 2 answers
  1. shah
    shah avatar
    13 posts
    Member since:
    Oct 2019

    Posted 20 Oct Link to this post

    Dear sir,
    i want to show RadialGauge in Gridview in Telerik UI winform using in Desktop App but it's not working.
    i need like this image
    it is requested that help / guidance may be provided that how to radRadial gauge in Rad gridview  cell in Winform.

    Thanks
  2. Answer
    Dimitar
    Admin
    Dimitar avatar
    2808 posts

    Posted 21 Oct Link to this post

    Hi Shah,

    This can be achieved by using the following approach:

    I have attached a project that shows how this can be implemented. 

    In addition, I have noticed that you have two more posts on the same. I have deleted them in order to avoid duplicate posts in our forum.

    I hope this helps. Please let me know if you have additional questions.

    Regards,
    Dimitar
    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.
  3. shah
    shah avatar
    13 posts
    Member since:
    Oct 2019

    Posted 21 Oct in reply to Dimitar Link to this post

    Thanks Sir Get the work
  4. shah
    shah avatar
    13 posts
    Member since:
    Oct 2019

    Posted 22 Oct Link to this post

    Dear Sir 

    As a Dynamically how to show these static app

    it is requested that help / guidance may be provided that how to radRadial gauge in Rad gridview  cell in Winform

  5. Answer
    Dimitar
    Admin
    Dimitar avatar
    2808 posts

    Posted 22 Oct Link to this post

    Hi Shah,

    You can set the value directly. Here is an example:

    private void T_Tick(object sender, EventArgs e)
    {
        radGridView1.Rows[0].Cells[0].Value = rnd.Next(100);
    }
    

    I hope this helps. Please let me know if you have additional questions.

    Regards,
    Dimitar
    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.
  6. shah
    shah avatar
    13 posts
    Member since:
    Oct 2019

    Posted 22 Oct in reply to Dimitar Link to this post

    Sir the value get from data base through sqldatareader which obtain in data table in row column

      SqlCommand cmd = new SqlCommand("select*from Gauge", con);
                SqlDataReader dataReader = cmd.ExecuteReader();
                DataTable dt = new DataTable();
                dt.Columns.Add("id");

                dt.Columns.Add("per");


                while (dataReader.Read())
                {
                    DataRow row = dt.NewRow();
                    row[0] = dataReader["id"];

                    //if ((decimal)radGridView1.Rows[1].Cells["per"].Value ==10)
                    //    radGridView1.Rows[5].Cells["column1"].Value = row[0];

                    //this.radGridView1.CurrentRow = this.radGridView1.Rows[1];
                    //this.radGridView1.CurrentColumn = this.radGridView1.Columns[1];
                    //this.Text = this.radGridView1.CurrentCell.Value.ToString();

                    radGridView1.Rows.Add(52);

                    row[1] = dataReader["per"];
                    dt.Rows.Add(row);

     

  7. Dimitar
    Admin
    Dimitar avatar
    2808 posts

    Posted 23 Oct Link to this post

    Hello,

    Once the data is loaded to the table you can directly bind the grid. You need to set the FieldName of the column. I have attached an updated version of the project.

    Please let me know if there is anything else I can help you with. 

    Regards,
    Dimitar
    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.
  8. shah
    shah avatar
    13 posts
    Member since:
    Oct 2019

    Posted 23 Oct in reply to Dimitar Link to this post

    thanks you sir For the Guide to me but one more Question 

    How Can I add Another Field Which is already in datatable but not show in gridview

    Check the code please.................

      radGridView1.TableElement.RowHeight = 100;
                radGridView1.AllowAddNewRow = false;

                var col = new GaugeColumn();
                col.Width = 100;
             col.FieldName = "GaugeData";
                col.DataType = typeof(int);
        
                radGridView1.Columns.Add(col);



             dataTable.Columns.Add("GaugeData", typeof(int));
                dataTable.Columns.Add("name");
                dataTable.Columns.Add("class");

                while (sqlDataReader.Read())
                {
                    DataRow row = dataTable.NewRow();

                   
                    row["GaugeData"] = sqlDataReader["GaugeData"];
                    row["name"] = sqlDataReader["name"];
                    row["class"] = sqlDataReader["class"];
              

                    dataTable.Rows.Add(row);
                }

  9. Dimitar
    Admin
    Dimitar avatar
    2808 posts

    Posted 24 Oct Link to this post

    Hi Shah,

    You can add a GridViewTextBoxColumn. Here is an example: GridViewTextBoxColumn.

    If you set the data source before adding any columns they will be autogenerated according to the fileds data type. 

    Please let me know if you have additional questions.

    Regards,
    Dimitar
    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.
  10. shah
    shah avatar
    13 posts
    Member since:
    Oct 2019

    Posted 27 Oct in reply to Dimitar Link to this post

    Thanks for the the reply.

    Sir One More Question......

    I have add another Columns or Fields in same Gridview For RadialGauges Any possible Solution So To Please Sent me.....

    Thank You!!!!!

  11. shah
    shah avatar
    13 posts
    Member since:
    Oct 2019

    Posted 28 Oct in reply to shah Link to this post

    Dear Sir

    I have add another Columns or Fields in same Gridview For RadialGauges Any possible Solution So To Please Sent me.....
    Thank You!!!!!

  12. Dimitar
    Admin
    Dimitar avatar
    2808 posts

    Posted 28 Oct Link to this post

    Hello Shah,

    To add other columns use the same code and specify different column names. Make sure to set the FieldName as well. 

    Let me know if you have additional questions.

    Regards,
    Dimitar
    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.
  13. shah
    shah avatar
    13 posts
    Member since:
    Oct 2019

    Posted 05 Nov Link to this post

    Hello Sir I hope you are good!

    1)I have a question can i use the radradial gauges as taking the user control and than we use in radgridview just like the above with xml.

    2)one another question how can i set the specific column  text to vertical in radgridview

  14. Dimitar
    Admin
    Dimitar avatar
    2808 posts

    Posted 05 Nov Link to this post

    Hi Shah,

    1. I do not understand the question. Can you give an example of what you want to achieve in this case?

    2. To have a vertical text you can set the AngleTransform property in the CellFormatting event handler:

    private void RadGridView1_CellFormatting(object sender, CellFormattingEventArgs e)
    {
        if (e.Column.Name == "Name")
        {
            e.CellElement.AngleTransform = 270;
           
        }
        else
        {
            e.CellElement.ResetValue(LightVisualElement.AngleTransformProperty, ValueResetFlags.Local);
        }
    }
    
    

    I am looking forward to your reply.

    Regards,
    Dimitar
    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.
Back to Top