C# :: Why Filtering In Data Grid Don't Work

Oct 8, 2014

why filtering don't work??

This is code for load data into dataGridView

private void Izvestaj_Load(object sender, EventArgs e) {
connection.ConnectionString = @"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:UsersTomyDesktopzadatak2zadatak2fedek_OldVersion(2002-2003).mdb;User Id=admin;Password=;";
dt = new DataTable();
OleDbDataAdapter sda = new OleDbDataAdapter("SELECT korisnici.korisnik,dogadjaji.dogadjaj,Tomislav.Datum

[Code] .....

And this is code for filtering by typing into textbox, when type nothing happening

private void textBox3_TextChanged(object sender, EventArgs e) {
DataView DW2 = new DataView(dt);
DW2.RowFilter = string.Format("dogadjaji.dogadjaj LIKE '%{0}%'", textBox3.Text);
dataGridView1.DataSource = DW2;

[Code] .....

And this is by filtering on dataPickers, range of date, and show me what happens on that dates, but show me exception when click button

private void button1_Click(object sender, EventArgs e) {
if(dateTimePicker1.Value>dateTimePicker2.Value) {
MessageBox.Show("Takav opseg nije moguc. Datum Od mora biti veci od datuma Do.", "Opseg datuma", MessageBoxButtons.OK, MessageBoxIcon.Error);

[code].....

View 13 Replies


ADVERTISEMENT

C# :: Getting Data Out Of A Row In A Grid?

Jan 13, 2014

I'm trying to extract data from a grid, it's a Dev Express grid. I have got an object which if I hover over it in debug mode shows me the data I'm after. In the code below if I hover over "row" I can drill down through "Row" and then "ItemArray" and I can see the data I want in an array but I can't find how to get at it.

private void gridShowUsers_Click(object sender, EventArgs e)
{
Object row = gridView1.GetFocusedRow();
string [] rowarray = new string [50];

[Code].....

View 14 Replies View Related

C# :: Accessing Data From 3rd Tier Of Hierarchical Grid?

Jan 24, 2014

I've got a Dev Express hierarchical grid and I need to which row is in focus in the level that's in focus. In the code below I need to replace "gridControl1.FocusedView.GetRow(0)" with "gridControl1.FocusedView.GetRow(x)" where x is the row number in the focused row but I can't find a property for it.

private void gridControl1_Click_1(object sender, EventArgs e)
{
//int i = gridView1.GetFocusedDataSourceRowIndex();

[Code]....

View 1 Replies View Related

C++ :: Floating Point Numbers - Grid Collection Of Data

May 14, 2014

I have a program which generates lots of data points in 2D (x and y co-ordinates). Perhaps 1,000,000+ of these points. These are floating point numbers. The values all fall within a specific range -R/2 and +R/2.

I want to impose an 'imaginary' grid. Such that I can collect the number of each of these points falling within a specific grid location. The actual 'grid' size is variable.

Should I try and collate this data from my C++ program and then post-process it in some other s/w like matlab?

View 3 Replies View Related

C# :: Populate Textboxes And ComboBoxes Through Data Grid View?

Dec 23, 2011

i m working on a simple project, i want to populate my text boxes and comboBoxes through DataGridView, means when i double click on cell content then the text boxes are populated.my question is that if i have to populate comboBox with the specific value then what i have to do then because comboBox.selectedItem is an object but my class property is a string..

e.g
combobox shows 30 days in it and my class is Code: class account
{
public string day{set;get}

[Code]....

but that does not happen because "comboBox.selectedItem" is an object so if i have to do that what i have to do then?

View 3 Replies View Related

C# :: Add Data Grid View Column To Listbox Using For Loop

Apr 18, 2014

I need to take a single column and all the rows in the column from a datagridview to a listbox using a for loop. My code is giving me no errors just not showing any data in the listbox.

private void frmProject6_Load(object sender, EventArgs e) {
// TODO: This line of code loads data into the 'enrollmentsDataSet.Enrollments' table. You can move, or remove it, as needed.
this.enrollmentsTableAdapter.Fill(this.enrollmentsDataSet.Enrollments);

[Code] .....

View 1 Replies View Related

C++ :: Design Image Class Which Should Work With Various Data Types (Multidimensional)

Dec 2, 2013

I have been thinking about this all day and I am yet to come up with a good solution. So, I need to design an image class which should work with various data types (int, float, double etc.) and can also be multidimensional (2, 3, 4, 5). So, what I did was generate a template image class as follows:

Code:
template<typename T, int dimensions=3>
class Image {
private:
T * data;
};

Anyway, now I have various image formats that I want to support, so the easy thing to do is create a Factory sort of object which will call eventually generate the correct image.

So I want to create various image classes called ImageType1, ImageType2 etc. which will take the input image and generate the correct Image object. However, I do not want these objects to be templated because they need to be passed from functions and be used in a generic way.

So, at run time I will need to be able to do this…

Code:
class ImageType {
public:
ImageType() {
PolymorphicImage * image = new Image<float, 3>();
}
private:
PolymorphicImage * image;
};

So, I want my ImageType classes to contain the Image object and be able to generate it with the right template arguments at run time. Is there any way to do this without having multiple specialised definitions for ImageType?

View 2 Replies View Related

C :: WAV File Handling And Filtering

Dec 29, 2013

I got this issue to tackle which consists of using an FIR LPF filter to filter a wav file using C programming.

Till now I managed to tackle the filter part following this link: Implementation of FIR Filtering in C (Part 1) | Shawn's DSP Tutorials (I have my own filter co-efficients which have been produced using FDAtool on MATLAB and some other minor changes have been applied to match my requirements)

Now, the link shown does not compensate for files having a header. I have three wav files which need to be filtered. Thus I need to first extract the data from the header .. this was done using RIFFpad. Now that I have the data

Info from RIFFpad:
fmt -
Offset=20
ID=fmt

[Code].....

I've got this hint to start with: Each audio datasample inside the wav_files can be made up of a number of bytes and these bytes arestored in the little-endian order. Inside your program you have to change this to a big-endian order.

View 8 Replies View Related

C# :: Filtering Strings That Get Sent On A Event

Feb 4, 2015

I am writing a application that receives Event messages from a network device the problem I have is that the device sends some message 5 times per tiggered event on two of the events I like to use the rest of the messages are fine I need to create code to filter out the other 4 last messages that get displayed in a textbox the 5 message are identical I have added a timestamp to the sting and noted they are always 1 second apart so the format would be somthing like this:

11:23:01 - x - y
11:23:02 - x - y
11:23:03 - x - y
11:23:04 - x - y
11:23:05 - x - y

What I would like to do something like this, always append the first message to the textbox but ignore or even change the 4 messages that follow 1 second apart from each other that contain - x - y if any other message appears it should still append the text box as well

so the result i would like for the 5 event message as above should end like this:

11:23:01 - x - y
11:23:02 - custome message / ingnore append to textbox
11:23:03 - custome message / ingnore append to textbox
11:23:04 - custome message / ingnore append to textbox
11:23:05 - custome message / ingnore append to textbox

View 8 Replies View Related

C/C++ :: Two Dimensional Array Median Filtering?

Nov 12, 2014

I'm trying to write code that implements [median filtering] on a two-dimensional array.

Here's an image to illustrate:

The program starts at the beginning of the array. The maximum array size is 100. I know that I can use an array like:

int a[100][100];

to store the input, and that I can iterate over a part of this array using two `for` loops like this:

for(i=0;i<size_filter;i++)
for(j=0;j<size_filter;j++)
temp[i][j]=a[i][j] // not so sure

But how can I make this code loop over the neighbors of every element in the array, calculate their median, and replace the center element with the median?

For some examples of what I'm trying to do, let's say that the input is a 5x5 matrix, so the input size is 5. And I want to run a 3x3 median filter on it, i.e. each element should be replaced by the median of the 3x3 elements surrounding it.

The program starts at the corner index (0,0). For this index, it scans the 3x3 region surrounding it (of which only four indexes actually lie within the input array), which contains the values 0, 0, 1, and 0. The median of these values is 0, so that's what the code should output for this array index.

In the picture below, the number in -band - is the center cell, and the plain * and * numbers are its neighbors within the 3x3 region surrounding it:

-0- *0* 0 0 0
*1* *0* 0 1 0
1 1 0 0 0
0 1 1 0 0
0 0 0 0 0

Here's another example, this time with the center index (0,1):

*0* -0- *0* 0 0
*1* *0* *0* 1 0
1 1 0 0 0
0 1 1 0 0
0 0 0 0 0

This time, the elements in the 3x3 region (excluding those outside the input array) have the values 0, 0, 0, 1, 0, and 0, and again, their median is therefore 0.

Here's yet another example, this time from the middle of the input, at center index (3,2):

0 0 0 0 0
*1* *0* *0* 1 0
*1* -1- *0* 0 0
*0* *1* *1* 0 0
0 0 0 0 0

This time, the elements within the 3x3 region have the values 1, 0, 0, 1, 1, 0, 0, 1, and 1, and their median in therefore 1.

Final example:

<size of array><size filter> <data>
8
3
0 0 0 0 0 0 0 0
0 5 0 0 6 0 0 0
0 0 0 0 0 7 0 0
0 0 0 0 5 0 0 0
0 0 0 5 6 0 0 0
0 0 8 5 5 0 0 0
0 0 0 7 0 0 9 0
0 0 0 0 0 0 0 0

Output:

0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0
0 0 0 5 5 0 0 0
0 0 0 5 5 0 0 0
0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0

View 4 Replies View Related

C :: Implementing Simple Transparent Proxy With Filtering

Feb 9, 2014

My question is mainly about networks. I wan to implement a simple transparent proxy in C, which will filter the browsed sites according to URL blacklist (check before sending the HTTP request) and keywords in content (check the <meta> in the HTML that was responded).

How can I do this? Listen in a local socket (ex. 8080), set the proxy in my browser and according to the requests that the browser sends to me open a socket with the server, forward the browser's request to the server and forward the server's response to the browser? (Of course by applying filters in the stages where needed.

View 7 Replies View Related

C# :: Filtering Invalid Byte Sequences For UTF8 Encoding For A Postgre?

Jun 25, 2014

Basically, I am inserting data from an ODBC connection into a PostgreSql database using the COPY query, but the COPY query stops and returns this error...

Quote
ERROR: invalid byte sequence for encoding "UTF8": 0x92
CONTEXT: COPY [TableName], line 1: "189572|1-00-1202|1-|00-|1202||AP||1...
STATEMENT: COPY [TableName] FROM STDIN (DELIMITER '|', NULL '')

View 4 Replies View Related

C++ :: Finding Grid Of Mines?

Aug 8, 2014

Code: There is a rectangular grid of numbers. The grid has m rows and n columns. So it has m*n cells in total.The rows are numbered from 1 to m and the columns are numbered from 1 to n. The top most row has number 1, the row next to it has number 2 and so on. Similarly, the left most column has number 1, the column next to it has number 2 and so on. Each cell in the grid has a unique coordinate which is (x, y) where x is the row number and y is the column number of that particular cell.

Each cell in the grid has an integer in {0, 1, 2, 3, 4, 5, 6 ,7 ,8}. Number in cell (x,y) is number of mines in neighboring cells (cells have at least 1 common vertex with cell (x,y))

Your task is to find grid of mines, i.e display an m*n grid of numbers {0, 1} (cell (x, y) is 1 if there is a mine in cell (x, y)).

Input
First line of the input contains two space separated integers, m and n. Next m lines, each line has n numbers in {0, 1, 2, 3, 4, 5, 6 ,7 ,8}.

Output
A grid of numbers {0, 1}

View 4 Replies View Related

C :: Draw A Grid Using The Characters?

Aug 20, 2013

I'm trying to create a grid using the following characters: !, @, #, $, &.

It's an 8 x 8 grid, and should contain the characters in no particular order (trying to create a Bejeweled-like game).

I already defined the width and length to be 8, so:

#define WIDTH 8
#define LENGTH 8

Code:

void makegrid(char grid[])
{
int j;
int k;
for ( j = -1; j < LENGTH; j++ )
{
for ( k = -1; k < WIDTH; k++ )
{
/* I don't know what to type here anymore :( */
}
} }

View 14 Replies View Related

C++ :: Printing Grid Using A Class

Aug 15, 2014

I'm stuck on printing my grid from my class file to the main file.If I pull out the print code and put in on the actual main program, it prints, but if I try to put in the class methods and call the function from main, I get an error.

testfile.cpp
#include <iostream>
#include <vector>
#include <string>
#include "DUPoint.h"
#include "Grid.h"
using namespace std;

[code]....

View 3 Replies View Related

C++ :: Connecting Rooms In Grid Map

Apr 1, 2013

I have a map that is full of 4+ rooms each with one randomly selected door on one of its sides. I need to create a tunnel connecting all of the doors together. I'm not sure the best way to do this A* seems to complicated for me to do at the moment and I cannot think of a way to connect these rooms.

My world is currently a vector<vector<Tiles>> and the tiles contain entities like tunnel, wall, stair, floor, etc.

View 8 Replies View Related

C# :: How To Using Stored Procedure With Web Grid

Apr 9, 2014

How do you use a stored procedure with a WebGrid? Our coding standard say we cannot write sql statement directly in the code to include HTML.

[var Grid = new WebGrid(DB.Query("Select * from Menu")]

The above call must be a call to a stored procedure.

View 4 Replies View Related

C :: Check If Certain 9x9 Sudoku Grid Is Valid?

Sep 30, 2013

So my program is to check if a certain 9x9 sudoku grid is valid. i have to get the input through command argument. so for example.

./a.out sudoku.txt

So we have make my c program to use FILE I/O open and what not

program behavior must be as follow File does not exist.File contains something other than a sequence of 81 integers (too many, too few, non-int).

One or more of the values is not in the range 1..9 Violation of Sudoku rules (this is the big one!) In case 4, you should report the violation (or any one of the violations if there are multiple -- you do not need to exhaustively enumerate all violations).

For example: Row Violation: entries (2,2) and (2,6) are both equal to 7. (Similarly for column and box violations). All i know is that i need to make a 2d 9 by 9 array

View 12 Replies View Related

C++ :: Program To Fill Grid With Values Between 1 And 100

Aug 27, 2014

Write a menu driven program that will fill grid with values between 1 and 100. Begin the program by declaring a array of type int. Then present the user with the following menu

Enter 1 to add
Enter 2 to edit
Enter 3 to delete
Enter 4 to search
Enter 5 to display
Enter 0 to Quit

Each item of the menu must be implemented as a function. The program should Only allow values between 1 and 100

Always ask the user to apply coordinates for the cell to be changed

Flag an error when try to delete or edit a cell with a zero (0)

Flag an error when try to add to a cell that is not blank

Display the complete and nicely formatted grid when option 5 is selected

View 2 Replies View Related

C++ :: Summing Numbers In Grid Rows

May 1, 2014

I have to make a grid 40 X 40 with random numbers 0-9. I have already done this and it prints out great. My problem is I need to be able to choose a row number and output the sum of the number in that row. Here is what I have so far.

#include <iostream>
using namespace std;
int main(){
int Values[40][40];
int rows, cols;

[Code] ....

View 7 Replies View Related

C++ :: Draw 2D Grid With Blank Cells?

Mar 21, 2014

I am trying to draw a 2d grid array for a battleships game. I need the grid to have a border around each cell, how to do this. so far my code is:

#include<iostream>
using namespace std;
int main(){
int grid[5][5] = {{0}};

[Code] .....

View 4 Replies View Related

C# :: Bind XML Response To Grid View

Nov 11, 2014

I have been trying to bind an xml response from a web service to a gridview but to no success. bellow is my code

soapInvoker.setMethod("GetAgentProducts");
XDocument AgentproductsRequest = SoapMethods.GetAgentProducts(pin);
XDocument AgentproductsResponse = soapInvoker.CallSoapServiceInternal(AgentproductsRequest);
XDocument xmlDoc = new XDocument(AgentproductsResponse);
var vrresult = from a in xmlDoc.Descendants("product")

[Code] ....

And I always get an error that is not explained dont know whether is coz i bootstrapped my master page or what but all errors caught where there are it shows this Runtime Error

Description: An exception occurred while processing your request. Additionally, another exception occurred while executing the custom error page for the first exception. The request has been terminated.

View 1 Replies View Related

C/C++ :: Error - Grid Was Not Declared In Scope

Jan 28, 2014

I'm trying to make a dynamic 2d array of a Tile Object I created, the Dynamic 2d array was working when I tested it as an int array but not that I gave it a type of Tile it is giving me the above error. I'm reading values from a .txt .

tile Tile;
Tile **grid;
grid = new Tile*[a];
for (int i = 0; i < a; ++i) {
grid[i] = new Tile[b];
}

View 9 Replies View Related

C/C++ :: Draw A 5x5 Grid For Battleships Game

Mar 20, 2014

I'm trying to draw a 5x5 grid for a battleships game.

How to draw the grid with borders and individual cells.

I'm using dev c++

View 14 Replies View Related

C++ :: How To Implement A Grid Made Of Hexagons

May 8, 2015

implementing a game of chess, i was able to easily implement the grid with an 8x8 multidimensional array.but here is the case I need to implement a grid made of hexagons(six sided but in future may be seven sideded or eight may be needed): like a beehive something.

How can such a grid be implemented in c++ taking notes of coordinates and borders and stuff? From where i can start working from? this grid has to be just like the chess grid only we got six sided boxexs instead of four,

View 6 Replies View Related

C# :: Double Declining Balance In Grid View?

Apr 8, 2014

I don't really have an issue with the math behind this, rather it's more with the code structure itself. Basically, every row is right, except for the last row. The last row (year) needs to be depreciated by the value at the beginning of the last row (year).

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;

[Code]......

View 2 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved