1
Answer

How to customize Windows Forms DataGrid Messages?

m_soltani

m_soltani

21y
1.7k
1
DataGrid sometimes shows a message Like this: "Column 'Code' Does not allow nulls. Do you want to correct the value?" I want to customize this message. My users language is not English. so I don't want them to see "Do you want to correct the value" message. so How can I customize Windows Forms DataGrid Messages? thanks
Answers (1)
0
Marcel Hertel

Marcel Hertel

NA 54 0 14y
hi,

assume that you have the columns emp_id and emp_name in your emp-table you can use the following procedure:

create procedure sp_Sortdata
(
    @Orderbyclause varchar(50)
)
as
select
    *
from
    emp e
order by   
    case when @Orderbyclause = 'emp_id' then e.emp_id end asc
    ,case when @Orderbyclause = 'emp_name' then e.emp_name end asc
   
if you execute exec sp_Sortdata 'emp_id' the procedure returns the emp-table ordered by emp_id

i hope this helps

Marcel Hertel