Click here to Skip to main content
15,887,027 members
Home / Discussions / C#
   

C#

 
QuestionDisabling DataGridView Column Button after clicking it Pin
AMRITESH ASTHANA6-Oct-14 1:11
AMRITESH ASTHANA6-Oct-14 1:11 
AnswerRe: Disabling DataGridView Column Button after clicking it Pin
Eddy Vluggen6-Oct-14 8:21
professionalEddy Vluggen6-Oct-14 8:21 
GeneralRe: Disabling DataGridView Column Button after clicking it Pin
AMRITESH ASTHANA6-Oct-14 21:29
AMRITESH ASTHANA6-Oct-14 21:29 
GeneralRe: Disabling DataGridView Column Button after clicking it Pin
Eddy Vluggen6-Oct-14 22:31
professionalEddy Vluggen6-Oct-14 22:31 
QuestionHow to add my app written by C# into Microsoft word as add-in? Pin
nashalj5-Oct-14 21:23
nashalj5-Oct-14 21:23 
AnswerRe: How to add my app written by C# into Microsoft word as add-in? Pin
BillWoodruff5-Oct-14 21:56
professionalBillWoodruff5-Oct-14 21:56 
QuestionIssue regarding SQLDependency used in Windows Service Pin
Tridip Bhattacharjee5-Oct-14 21:09
professionalTridip Bhattacharjee5-Oct-14 21:09 
Questionwating for anser how to add record to database with gridjanus and bindingnavigator Pin
fatemehsoleimani5-Oct-14 11:53
fatemehsoleimani5-Oct-14 11:53 
hi every one
i want add a one record to sql from grid janus and one cell from a editbox control
with binding navigator but can not add and message show column code can not null.
my source code:
C#
private void bindingNavigatorAddNewItem_Click(object sender, EventArgs e)
       {
            codemax = Convert.ToInt32(fatemeTableAdapter.maxcode());
           codemax = codemax + 1;

           editBox1.Text = codemax.ToString();
           ((DataRowView)fatemeBindingSource1.Current).Row["code"] = codemax;
       }



and savebinding:

C#
private void save_Click(object sender, EventArgs e)
        {
            int g, b;
            g=Convert.ToInt32(gridEX1.CurrentRow.Cells["code_b"].Value);
            b=Convert.ToInt32(gridEX1.CurrentRow.Cells["name"].Value) ;
            ((DataRowView)fatemeBindingSource1.Current).Row["code_b"] = g;
            ((DataRowView)fatemeBindingSource1.Current).Row["name"] = b;

            this.Validate();
            fatemeBindingSource1.EndEdit();
            fatemeTableAdapter.Update(this.baziDataSet1.fateme);
        }



i dont how get value from new row in grid please help me
best a regards

modified 7-Oct-14 8:34am.

AnswerRe: how to add record to database with gridjanus and bindingnavigator Pin
fatemehsoleimani5-Oct-14 20:19
fatemehsoleimani5-Oct-14 20:19 
GeneralRe: how to add record to database with gridjanus and bindingnavigator Pin
fatemehsoleimani5-Oct-14 21:49
fatemehsoleimani5-Oct-14 21:49 
GeneralRe: how to add record to database with gridjanus and bindingnavigator Pin
fatemehsoleimani5-Oct-14 22:50
fatemehsoleimani5-Oct-14 22:50 
GeneralRe: how to add record to database with gridjanus and bindingnavigator Pin
fatemehsoleimani6-Oct-14 3:43
fatemehsoleimani6-Oct-14 3:43 
AnswerRe: wating for anser how to add record to database with gridjanus and bindingnavigator Pin
fatemehsoleimani9-Oct-14 5:30
fatemehsoleimani9-Oct-14 5:30 
Questionif, else if, and else statement. Pin
Member 111309765-Oct-14 9:06
Member 111309765-Oct-14 9:06 
AnswerRe: if, else if, and else statement. Pin
BillWoodruff5-Oct-14 9:56
professionalBillWoodruff5-Oct-14 9:56 
AnswerRe: if, else if, and else statement. Pin
Swinkaran5-Oct-14 12:36
professionalSwinkaran5-Oct-14 12:36 
AnswerRe: if, else if, and else statement. Pin
Dominic Burford8-Oct-14 4:09
professionalDominic Burford8-Oct-14 4:09 
QuestionMessage Removed Pin
5-Oct-14 2:36
fatemehsoleimani5-Oct-14 2:36 
QuestionSystem.NullReferenceException DataGrid WPF Pin
smgetaweh4-Oct-14 6:18
smgetaweh4-Oct-14 6:18 
AnswerRe: System.NullReferenceException DataGrid WPF Pin
Dave Kreskowiak4-Oct-14 7:22
mveDave Kreskowiak4-Oct-14 7:22 
GeneralRe: System.NullReferenceException DataGrid WPF Pin
smgetaweh4-Oct-14 7:40
smgetaweh4-Oct-14 7:40 
GeneralRe: System.NullReferenceException DataGrid WPF Pin
SledgeHammer014-Oct-14 8:57
SledgeHammer014-Oct-14 8:57 
AnswerRe: System.NullReferenceException DataGrid WPF Pin
Praneet Nadkar5-Oct-14 19:58
Praneet Nadkar5-Oct-14 19:58 
GeneralRe: System.NullReferenceException DataGrid WPF Pin
smgetaweh6-Oct-14 4:44
smgetaweh6-Oct-14 4:44 
QuestionDisabling a Row of Data Grid View on Send Mail Button click Pin
AMRITESH ASTHANA3-Oct-14 20:40
AMRITESH ASTHANA3-Oct-14 20:40 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.