|
I apparently solved this issue using a new variable bool filt to be false as default and set to true after the application of the filter. If this variable is false then the filter has not been aplied and it edits the columns as previously, if the variable is true, then the filter is set and it lets me edit the filtered columns, after which is again set to false, allowing the edition of non filtered columns. Thank you very much.
|
|
|
|
|
You're welcome! Glad you got it working.
If the brain were so simple we could understand it, we would be so simple we couldn't. — Lyall Watson
|
|
|
|
|
Sample table
RC ABC GORDON
RC XYZ Biz
RC PQR SERT
Expected Table
_____ | ABC GORDON
_____ | XYZ Biz
RC | PQR SERT
|
|
|
|
|
What kind of table? A System.Data.DataTable?
Why would the expected table have to be like you posted and not
RC | ABC GORDON
___ | XYZ Biz
___ | PQR SERT
..for example?
And did you try anything yourself? If yes, please post it. If not, why not?
If the brain were so simple we could understand it, we would be so simple we couldn't. — Lyall Watson
|
|
|
|
|
Hi Sascha Lefèvre, thank you for replying,
Yes you are right, I have to work on System.Data.DataTable.
All cells has common data, so it should be merged.
|
|
|
|
|
A DataTable is just a collection of data. It doesn't have "cells", and it wouldn't make any sense to "merge" values within it.
I suspect you want to merge the cells in whatever control you're using to display the data from the DataTable . You need to tell us how you're displaying the data.
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
Your question is not clear. What "table" are you referring to?
Remember, we can't see your screen, access your computer, or read your mind.
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
Hi, I have an Employee class with Name, Department, and Salary as properties. All I'm trying to do is add an employee to a list of Employees after typing in all the required info and hitting the Add button on my form.
Then I want to display the employees in the list of Employees using a foreach loop. Below are my code but they're not working and I get no errors.
namespace CSharpListObjects
{
public partial class Form1: System.Web.UI.Page
{
List<Employee> employees = new List<Employee>();
protected void Page_Load(object sender, EventArgs e)
{
}
protected void btnShowEmployees_Click(object sender, EventArgs e)
{
StringBuilder employeeDetails = new StringBuilder();
foreach(Employee e in employees)
{
employeeDetails.Append("< br/>Name: " + e.Name
+ " Department: " + e.Department
+ " Salary: " + e.Salary + "< br/ >");
}
Literal1.Text = employeeDetails.ToString();
}
protected void btnAddEmployee_Click(object sender, EventArgs e)
{
Employee employee = new Employee();
employee.Name = txtName.Text;
employee.Department = txtDepartment.Text;
employee.Salary = Convert.ToInt32(txtSalary.Text);
employees.Add(employee);
}
}
}
It appears there is nothing in List < Employee > after I added Employee objects. Please help point out where my mistake is if you can spot it, thanks.
modified 4-Jan-16 2:05am.
|
|
|
|
|
I see that this is a question about an ASP.NET project. We do have a dedicated forum for that, that you should consider posting questions like this on, in the future.
Anyway, the problem is because your list of employees is lost between one postback and the next. You have to consider the nature of a web site, which is short lived in the duration of what happens in the code because each post back from the client to the server effectively fires off a new instance of this page. What you need to do is either store your list in a cache or a session object and then retrieve it from there. The choice of whether to host it in the Cache or in a Session depends on whether you want this list to be visible to everyone (stored in the Cache), or just for the user who is entering the current details (store it in the Session).
This space for rent
|
|
|
|
|
Thanks for replying. Your suggestion did the trick.
|
|
|
|
|
Hi Team,
I have a C# app where the only localization that needs to be done is in the Menu Strings. So instead of the strings being stored in a resx file (OR BAML), I was thinking of storing that in a keyvalue pair .properties file that can be dynamically updated from a CDN. This way if a new locale has to be supported, all we need to do is add the corresponding property file for that locale.
Anyone tried this approach and any recommendations/things I have to take care of?
Thanks,
Chandra
|
|
|
|
|
Good morning, i would like to develop a fingerprint students attendance, But the problem i face is not sure how and where to start. The help provided really will be helpful to me. I will develop using c# provided by digital persona sdk. i have basic knowledge in c# but able to lern.
|
|
|
|
|
The first thing you need is a fingerprint reader. A study of its documentation will get you started.
|
|
|
|
|
Just be sure you get the most recent SDK. At least in prior versions of the Digital Persona SDK, there's at least one really serious memory leak when using a Streamed image from the 4500 / 5100 series readers.
Also, under existing privacy laws, fingerprints fall under protections for PII -- personally identifying information. So students or not, you have to be really careful about what you do with the fingerprint records.
The madman is not the man who has lost his reason; the madman is the man who has lost everything except his reason.
--G.K. Chesterton
|
|
|
|
|
You have replied to the wrong person. Richard doesn't need to know this.
This space for rent
|
|
|
|
|
Nareen Nair wrote: Sir i have bought the device digital persona fingerprint reader. The adk provided only show sample of indentification and enrollemnt. They did not provide me how to save to database. So i am confuse on it sir The device i bought is U.are.U 5100 Saving information to a database is nothing to do with a fingerprint reader. Once you have the input data from the reader you just send it to your database in the same way you would any other input data.
|
|
|
|
|
owh... thanks Richard.. now i got soem idea... i researching more in how to save to database directly. You are helpful sir... i try research and find out how to do that.. or is there any link i can go through sir, sir can share..
|
|
|
|
|
Nareen Nair wrote: is there any link i can go through Yes, www.google.com[^]. But you need to explain your problem more clearly. We have no idea which database you are using or what problems you are having with it. If you are still learning about databases then Google will find you many samples and tutorials.
|
|
|
|
|
i am using oracle as my databse. The problem is i not sure how would it save the fingerprint to the database..
|
|
|
|
|
It depends on what you retrieve from the fingerprint reader. The data that it provides is presumably a digitised representation of an image, so that is what you need to save. Whether you save it in the database, as a blob, or as a normal file with a link in the database is up to you. But the first thing to do is undertstand the format of the data that the reader provides.
|
|
|
|
|
owh.. now i have some idea.. i try and see on the format that the reader will save... if i have other question i would ask.. and thanks alot as without ur help i will be blur on where to start thanks..
|
|
|
|
|
Hi all,
I have a mdi application which have Form1 and Form2 each form has a public Function named MyPrint(). So I want to create a button on the MDI parent form which will call the MyPrint() function of the ActiveMdiChild form i.e:
Form curForm=new Form();
curForm.Print();
how to make it possible to call MyPrint() of each form implicitly.
thanks in advance
APC Corner
|
|
|
|
|
The way I would do it is to create a form derived from Form which includes an overridable MyPrint method, and derive my MDI children from that. That way, the main form can call the correct version without explicitly knowing which it needs to look for.
But your code fragment won't do it: that creates a new form rather than trying to access a method in an existing displayed form. Try looking at the Form.ActiveMdiChild Property (System.Windows.Forms)[^] instead.
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
|
|
|
|
|
It's a mistake to place any Control on the MDIParent Form surface: it will then appear above all MDI Windows that may be "under" it, and make a visual mess. If you must have a Button, place it in a MenuStrip on the MDIParent Form.
One way to get the "implicit" functionality you describe is to define an Extension Method on the Form Class for printing:
using System;
using System.Windows.Forms;
namespace YourMDINameSpace
{
public static class FormExtensions
{
public static void Form_Print(this Form form)
{
Console.WriteLine("{0} is printing now", form.Name);
}
}
} If you drag-drop a MenuStrip onto the MDIParent Form, you can then choose the option for it to insert the standard items which will include a 'File Menu with a 'Print sub-menu item. By defining an EventHandler for that 'Print menu-item, you can write your code that handles printing:
private void printToolStripMenuItem_Click(object sender, EventArgs e)
{
if(ActiveMdiChild != null) ActiveMdiChild.Form_Print();
} The code shown here assumes you have implemented the Extension shown above; note that you use the 'ActiveMDIChild directly to invoke the method.
«Tell me and I forget. Teach me and I remember. Involve me and I learn.» Benjamin Franklin
modified 2-Jan-16 7:24am.
|
|
|
|
|
Downvote countered. Have yourself a 5 and a Happy New Year from me.
This space for rent
|
|
|
|