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

radMessageBox RightToLeft (All Items)

9 Answers 148 Views
MessageBox
This is a migrated thread and some comments may be shown as answers.
saeid
Top achievements
Rank 1
saeid asked on 31 Jan 2017, 07:11 PM

Hi I'm Saeid. Programer in Iran.

Q:

How to Right To Left All Items in radMessageBox?

radMessagebox.Show("Text","Caption Message", MessageBoxIcon.Ok, radMessageIcon.Info, ::::::RightToLeft:::::);

9 Answers, 1 is accepted

Sort by
0
Dimitar
Telerik team
answered on 01 Feb 2017, 07:48 AM
Hi Saeid,

This is supported, the following snippet shows the parameter that you should use:
RadMessageBox.Show(this, "Test", "Caption", MessageBoxButtons.OKCancel, RadMessageIcon.Info, MessageBoxDefaultButton.Button1, RightToLeft.Yes);

I hope this will be useful. Let me know if you have additional questions.

Regards,
Dimitar
Telerik by Progress
Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
0
saeid
Top achievements
Rank 1
answered on 01 Feb 2017, 04:53 PM

Hi Dimitar,

I'm write code but not true,

I'm use Persian Font in string MSG.

0
Dimitar
Telerik team
answered on 02 Feb 2017, 07:28 AM
Hi Saeid,

You are using the wrong method override. The first parameter must be the parent window (see attached image).

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

Regards,
Dimitar
Telerik by Progress
Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
0
saeid
Top achievements
Rank 1
answered on 02 Feb 2017, 08:30 AM

Hi Dimitar,

 

Please, see my attachment.

I'm write normal code but not true right to left. and wrong to be rebuild solution

0
Dimitar
Telerik team
answered on 02 Feb 2017, 12:58 PM
Hello Saeid,

The parameters configuration is wrong. Just copy the code from my post and try again.

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

Regards,
Dimitar
Telerik by Progress
Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
0
saeid
Top achievements
Rank 1
answered on 02 Feb 2017, 01:11 PM
001.using System;
002.using System.Collections.Generic;
003.using System.ComponentModel;
004.using System.Data;
005.using System.Data.Linq;
006.using System.Data.Sql;
007.using System.Data.SqlClient;
008.using System.Drawing;
009.using System.Text;
010.using System.Windows.Forms;
011.using Telerik.WinControls;
012.using Telerik.WinControls.Themes;
013.using System.Windows.Forms.Layout;
014. 
015. 
016.namespace Quark.Others
017.{
018.    public partial class Gender : Telerik.WinControls.UI.RadForm
019.    {
020.        public Gender()
021.        {
022.            InitializeComponent();
023.        }
024.        SqlConnection conn;
025. 
026.        private void Gender_Load(object sender, EventArgs e)
027.        {
028.            SQLCONN();
029.        }
030. 
031.        #region SQL Conn
032.        public void SQLCONN()
033.        {
034.            conn = new SqlConnection ("Data Source=.;Initial Catalog=QuarkDB;Persist Security Info=True;User ID=.............;Password=............................................");
035.            SqlDataAdapter da = new SqlDataAdapter("SelectGender",conn);
036.            da.SelectCommand.CommandType = CommandType.StoredProcedure;
037.            DataTable dt = new DataTable();
038.            da.Fill(dt);
039.            gvinfo.DataSource = dt;
040.        }
041.        #endregion
042. 
043.        private void btn_Save_Click(object sender, EventArgs e)
044.        {
045. 
046.            if(string.IsNullOrWhiteSpace(txt_Name.Text))
047.            {
048.                //MessageBox.Show("");
049.                errorProvider1.SetError(txt_Name , "لطفا نوع جنسیت را وارد نمایید.");
050.                return
051.            }
052. 
053.            SqlCommand cmd = new SqlCommand("AddGender", conn);
054.            cmd.CommandType = CommandType.StoredProcedure;
055.            cmd.Parameters.AddWithValue("@Gender_Types", txt_Name.Text);
056. 
057.                cmd.Parameters.Add("@Result", SqlDbType.Int);
058.                cmd.Parameters["@Result"].Direction = ParameterDirection.Output;
059. 
060.            conn.Open();
061.            cmd.ExecuteNonQuery();
062.            conn.Close();
063. 
064. 
065.            int res = Convert.ToInt32(cmd.Parameters["@Result"].Value.ToString());
066.            if (res==0)
067.            {
068.               // MessageBox.Show("این نوع جنسیت قبلا ثبت شده است.");
069.                RadMessageBox.Instance.ThemeName = "TelerikMetro";
070.                RadMessageBox.Show("این نوع جنسیت قبلا ثبت شده است!", "داده تکراری", MessageBoxButtons.RetryCancel, RadMessageIcon.Info);
071.            }
072.            else
073.            {
074.                Gender_Load(null , null);
075.                txt_Name.Text = "";
076.                txt_Name.Focus();
077.            }
078. 
079.        }
080. 
081.        void msgdelgender()
082.        {
083.            RadMessageBox.Instance.ThemeName = "TelerikMetro";           
084.            RadMessageBox.Show("آیا از حذف این رکورد اطمینان دارید؟", "حذف داده جاری", MessageBoxButtons.OK,RadMessageIcon.Error,MessageBoxDefaultButton.Button1, RightToLeft:Yes);
085.        }
086. 
087.        private void btn_Delete_Click(object sender, EventArgs e)
088.        {
089.            msgdelgender();
090. 
091.            if (true)
092.            {
093.                SqlCommand cmd = new SqlCommand("DelGender", conn);
094.                cmd.CommandType = CommandType.StoredProcedure;
095.                cmd.Parameters.AddWithValue("@Gender_ID", gvinfo.CurrentRow.Cells[0].Value.ToString());
096. 
097. 
098.                conn.Open();
099.                cmd.ExecuteNonQuery();
100.                conn.Close();
101. 
102.                Gender_Load(null, null);
103.            }
104.        }
105.    }
106.}
0
Dimitar
Telerik team
answered on 03 Feb 2017, 09:16 AM
Hi Saeid,

Still, the parameters configuration is not proper. I have attached a small sample that shows how this works.

I hope this will be useful. 

Regards,
Dimitar
Telerik by Progress
Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
0
saeid
Top achievements
Rank 1
answered on 03 Feb 2017, 06:24 PM

Hi Dimitar,

I thank you veryyyyyyyyyyyyyyyyyyyyyyyyyyyyy much. I wish I could kiss you. 

I'm not write the first "this".

 

I hope to always be successful

0
saeid
Top achievements
Rank 1
answered on 09 Jun 2017, 01:47 PM

Hi Dimitar,

How to customize radMessageBox Class?

for example: change button (yes or no) back color.

I want to change radMessageBox class details. (theme, Button Name, BackColor, Change Icon ,...)

Tags
MessageBox
Asked by
saeid
Top achievements
Rank 1
Answers by
Dimitar
Telerik team
saeid
Top achievements
Rank 1
Share this question
or