[Solved] Error adding items to the Grid

[ad_1] GridView1.DataSource = Sabt; GridView1.DataBind(); Sabt seems to be single object. To bind DataGrid you need to have collection like List<JadvalSabtenam > or BindingList<JadvalSabtenam> Try that: List<JadvalSabtenam > dataSource = new List<JadvalSabtenam> {Sabt}; GridView1.DataSource = dataSource; GridView1.DataBind(); Reason for that is: What Grid should do with single object? When it’s collection each item is corresponding … Read more

[Solved] Write a programme to input 10 numbers from the user and print greatest of all

[ad_1] If you have an array declared like int a[N]; where N is some positive integer value then the valid range of indices to access elements of the array is [0, N). It means that for example this for loop for(i=1;i<=10;i++) { printf(“enter 10 nos. for arr[%d] :”,i); scanf(“%d”,&arr[i]); } must look like for ( … Read more

[Solved] So,I made this simple C program to give output,so it is correct for positive and zero integer values but it is coming wrong for negative even and odd

[ad_1] Just reindent your code you will find strange { like the one after printf(“Positive”); Juste removing this strange { and fixing your coding style will be: #include<stdio.h> int main() { int x; scanf(“%d”, &x); if ( x > 0 ) { printf(“Positive”); if ( x % 2 == 0 ) { printf(“Even”); } else … Read more

[Solved] Program closes after running twice [closed]

[ad_1] Modify your main menu as follows: int main() { while(1) { printIntro(); mainMenu(); printOutro(); } return 0; } And get rid of cout << mainMenu(); in printOutro() 2 [ad_2] solved Program closes after running twice [closed]

[Solved] c# Devexpress datagridview to gridcontrol. manualy

[ad_1] You should use the following code to make the ASPxGridView show data from this table: if (connection.State == ConnectionState.Closed) { connection.Open(); SqlCommand cmd = new SqlCommand(“Select * From YazHata order by HataAdi ASC”, connection); SqlDataAdapter da = new SqlDataAdapter(cmd); DataTable dt = new DataTable(); da.Fill(dt); ASPxGridView1.DataSource = dt; // <<<< ASPxGridView1.DataBind(); //<<<<< da.Dispose(); connection.Close(); … Read more

[Solved] Crash when assigning values to array

[ad_1] You need to check for the validity of your array bounds and value of b. b should obviously be: (Pseudo code): MinBound <= b <= MaxBound In your case , you can do as below: void traps() { int a,b,r; cout<<“Deciding placement of traps”; for (a = 1; a <= 8; a++) { r … Read more

[Solved] Value of ‘10000’ is not valid for ‘Value’. ‘Value’ should be between ‘minimum’ and ‘maximum’. Parameter name: Value [closed]

[ad_1] Update I’m not sure if the answer below made sense before the question was edited. But it definitely looks pointless after :-). It is a bit hard to say, but maybe swapping lines will help (and I guess there is no need for unchecked): progressBar1.Maximum = Convert.ToInt32(e.MaximumProgress); progressBar1.Value = Convert.ToInt32(e.CurrentProgress); 9 [ad_2] solved Value … Read more