Well, CodeSmith to generate our DAL and BLL. I can access other classes b/c of parent / child relationships, but this is like a type and its only connection that is see, is that its a property.
Really appreciate the assistance!
Thanks for advice.
As I continue to learn... that's all I can say at the moment.
Still doesn't draw me any closer at the moment to a solution. Any and all tips will be greatly appreciated!
Thanks for your reply!
Maybe I should elaborate on my business logic layer - these classes are genereated via some ORM tool and thus resemble our database schema. So, according to my code from above, the Employee table has a field called StateId which in turn is linked to the State table. So...
Let's say I have 2 classes, Employee and State (reference the code below for further details), and I set the Employee.stateID, upon the setter being set, how can I get the StateName, i.e. State.stateName? Thank you in advance for any assistance!
----- Employee Class -----
public class Employee...
Here's my scenario: Work in a C# 2.0 environment with our view layer bound to a business logic layer of objects.
Here is what I'm attempting to do: Upon a form loading, user picks a value from a combobox and it brings back a collection of values. These values, I would like them to populate...
I am using C#2.0 in a Windows Application and trying to validate a TextBox on its Validating Event. What I am basically looking for is to see if the value entered is a decimcal. Looks to be working but when I delete the contents of the TextBox, i.e. no value in there, the cursor cannot leave...
Where do you have that second piece of code? Within a _CellFormatting Event?
FYI, I have the following and does not work:
private void dgv_CellFormatting(object sender, DataGridViewCellFormattingEventArgs e)
{
if (this.dgv.Columns[e.ColumnIndex].Name == "SecType")
{
if...
Zameer:
Thanks for responding but I've tried that already and having the .Width = 0, one can still see the column with a very small width. By having the Width = 0, as the user tabs through the cells, the Tab Stops within this small column, which I do not want.
Any other suggestions anyone?
I am using C# 2.0 in a Windows Forms platform - I am using the CellFormatting() Event to display certain rows of my DataGridView with a certain color depending on the value found in a certain column. This works great if the Column is Visible, but I don't want to display this Column to the end...
Well, the framework I'm using has MVC as a basis but has been modified. I am using some of the great templates via www.nettiers.com. If you're using a code generator, I stronly recommend this route. Hope this helps.
Any other input regarding my original question?
I am trying to recognize when the Cursor is over the Header. I have tried the following but it seems to change cursor anywhere within the DataGridView. Thanks for any help!
private void DataGridView1_MouseHover(object sender, EventArgs e)
{
if (DataGridView1.CurrentRow.Index == 0)
{...
Working on C# 2.0 Windows Forms with an MVC Pattern in place. I have a bunch of ComboBoxes that are bound to Business Object BindingSources, i.e. Collection BO. Everything works perfectly (CRUD) but I just noticed that if the User tries to update one of the ComboBoxes by deleting its value...
I have a TabControl in place and would like to have the selectedt tab to have bold text and the other tabs to be grayed out or not be so prevalent. I was trying something like this:
private void tabControl1_Selected(object sender, TabControlEventArgs e)
{
if...
Thanks! That worked!
No, just doing some validation of business rules on Save event. Eventhough the database as these constraints in place, I wanted a UI level of validation.
I am trying to do some validating, and when a certain TextBox is filled an accompanying value from a ComboBox should also be chosen. How can I check if a value from my ComboBox has been picked from its original state, which is nothing from the list of values?
if (this.txtCity != null) // ***...
In my DataGridView, I would like the whole row to be of a unique color when the user is editing a cell on that row. I was thinking something like this:
private void dgv_CellPainting(object sender, DataGridViewCellPaintingEventArgs e)
{
dgv.CurrentRow ???
??? SelectionBackColor =...
I am trying to loop through the values of a ComboBox and it seems that when I use the following:
foreach (object item in this.Items)
it loops through the whole collection from the pertinent Business Object. I would only like to loop through the values given in the DisplayMember, e.g...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.