radMessageBox RightToLeft (All Items)

10 posts, 0 answers
  1. saeid
    saeid avatar
    15 posts
    Member since:
    Jan 2017

    Posted 31 Jan Link to this post

    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:::::);

  2. Dimitar
    Admin
    Dimitar avatar
    1871 posts

    Posted 01 Feb Link to this post

    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.
  3. saeid
    saeid avatar
    15 posts
    Member since:
    Jan 2017

    Posted 01 Feb Link to this post

    Hi Dimitar,

    I'm write code but not true,

    I'm use Persian Font in string MSG.

  4. Dimitar
    Admin
    Dimitar avatar
    1871 posts

    Posted 02 Feb Link to this post

    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.
  5. saeid
    saeid avatar
    15 posts
    Member since:
    Jan 2017

    Posted 02 Feb Link to this post

    Hi Dimitar,

     

    Please, see my attachment.

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

  6. Dimitar
    Admin
    Dimitar avatar
    1871 posts

    Posted 02 Feb Link to this post

    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.
  7. saeid
    saeid avatar
    15 posts
    Member since:
    Jan 2017

    Posted 02 Feb Link to this post

    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.}
  8. Dimitar
    Admin
    Dimitar avatar
    1871 posts

    Posted 03 Feb Link to this post

    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.
  9. saeid
    saeid avatar
    15 posts
    Member since:
    Jan 2017

    Posted 03 Feb Link to this post

    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

  10. saeid
    saeid avatar
    15 posts
    Member since:
    Jan 2017

    Posted 09 Jun Link to this post

    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 ,...)

Back to Top