|
That's exactly what I am going to do. Thank you.
|
|
|
|
|
Hello,
Is there a way of GradingOut DataGrid, so if it's Enabled = false, how can I show that it is disabled. Because my grid is in the pannel, so if I disable the pannel, grid gets disabled, however it looks like it's enabled.
I would want something like the textbox, if it's disabled it gets (ReadOnly) appearance.
Thank you
|
|
|
|
|
Do this in DataGridTextBoxColumn wire up GrayOutCellEvent
when the status of the Grid changes to Enabled = false.
protected override void Paint(System.Drawing.Graphics g, System.Drawing.Rectangle bounds, System.Windows.Forms.CurrencyManager source, int rowNum, System.Drawing.Brush backBrush, System.Drawing.Brush foreBrush, bool alignToRight)
{
foreBrush = SystemBrushes.HighlightText;
.....
if (
this.GrayOutCellEvent != null &&
!this.DataGridTableStyle.DataGrid.IsSelected(rowNum)
)
{
GrayOutCellEventArgs grayOutCellEventArgs = new GrayOutCellEventArgs(rowNum);
this.GrayOutCellEvent(this, grayOutCellEventArgs);
if (grayOutCellEventArgs.IsGrayOut)
{
backBrush = SystemBrushes.ControlLight;
}
}
}
|
|
|
|
|
hi to all,
i need to populate a tree view with data but i have some restriction
in fact my relation parent ==> in the database look like this :
01 root
01MM module (child of root)
01MMFR form (child of module)
i can't found a trick to populate my treeview
does anyone has suggestions
thanks in advance and best regards
fady
|
|
|
|
|
Can you please post the schema of the table in the database holding the parent child relationship.
|
|
|
|
|
Lets assume you have all keys in a string array 'keys' and als names in a string array 'names':
HashTable keysToNodesHash = new HashTable();
for (int i = 0; i < keys.Length; i++) {
TreeNodeCollection nodes = treeView1.Nodes;
if (keys[i].Length > 2)
nodes = (TreeNodeCollection)hash[keys[i].SubString(0, keys[i].Length - 2)];
TreeNode newNode = nodes.Add(names[i]);
keysToNodesHash.Add(keys[i], newNodes.Nodes);
}
Haven't tested it but it should give you the basic idea. Note that this will only function properly if the nodes come in the right order (liek in your example). If this isn't true you will have to sort them before this operation.
|
|
|
|
|
Hi all, hope you can help me with a small problem.
I need to add an item to the forms drop down menu that you get when you right click the icon in the top left of the form.
Anyone know how??
Cheers
Kev
|
|
|
|
|
Hi,
I want to install multiple instance of the windows service with different name. So for that I need to read the service name at the time of installation from some config file.
Can any buddy help me out in this?
Ankit Singhal
|
|
|
|
|
Check this out
http://www.codeproject.com/csharp/CSharpWindowsServiceInst.asp
|
|
|
|
|
How can I show custom string such as "N/A" in DataGrid instead (null) for null columns?
My datagrid data will load by a DataSource.
Or how can I filter sum record/field when loading fata from DataSource to DataGrid !?
Thank you
|
|
|
|
|
I found it ...
int nColCount = dataGrid1.DataSource.Tables[0].Columns.Count;<br />
int nStyleCount = dataGrid1.TableStyles.Count;<br />
for(int nSC= 0; nSC < nStyleCount; nSC++ )<br />
for(int nCol = 0; nCol < nColCount; nCol++ )<br />
{<br />
dataGrid1.TableStyles[nSC].GridColumnStyles[nCol].NullText = "N/A";<br />
}<br />
|
|
|
|
|
hi,
What does .net stand for? or What is the .net original name?
Thanks
|
|
|
|
|
|
|
It means DOT in the NET
- ashish
|
|
|
|
|
Now, I just recently found out about PropertyGrid and I think I like it.
My problem is, I can't figure out how to display my tree in a apropriate way.
My classes look like this:
class MyTreeNode
{
List mylist = new List();
public MyTreeNode[] SubNodes
{
get { return (MyTreeNode[])mylist.ToArray(); }
}
public string Name = "something";
}
I want this MyTreeNode class to display as a list of nodes; but instead of that [0] as a name it should display the node's Name-attribute. I would also like to set the value to something different.
I just can't figure out how to do that exactly.
please give me a hint.
so long.
|
|
|
|
|
Hi,
I don't know if this works, but what about overriding the ToString() method. This overridden method should return the name. Maybe this will display the name attribute.
Regards
Sebastian
|
|
|
|
|
|
How to drag n drop the row of datagrid.Please help!!!
|
|
|
|
|
If we use System.Data.OracleClient namespace in desktop application, do we have to have Oracle client installed on the machine/desktop to access database.
- ashish
|
|
|
|
|
Yes, version 8.1.7 or later.
Here[^] is a link to the pertinent documentation.
The most exciting phrase to hear in science, the one that heralds the most discoveries, is not 'Eureka!' ('I found it!') but 'That's funny...’
|
|
|
|
|
Is it possible to access Oracle Database without having Oracle client installtion?
- ashish
|
|
|
|
|
As far as I know (and speaking about Oracle, it's not very far), no, there isn't. You need the client.
-- LuisR
Luis Alonso Ramos
Intelectix - Chihuahua, Mexico
Not much here: My CP Blog!
The amount of sleep the average person needs is five more minutes. -- Vikram A Punathambekar, Aug. 11, 2005
|
|
|
|
|
I'm having a few issues with multiple projects going to the same output folder, particularly around the locking of 3rd party asssemblies that multiple projects reference, and the fact thast it can not be copied due to it being locked in the output folder by the IDE.
The main output is a windows service, that hosts remotable objects, and as no reference exists between the service, and the objects, i need some way to copy them to the output folder, so hello Post Build Step.
Now, if i copy all the files from the specific output folder, doing a *.*, i still get the same problem with locking on the 3rd party dll, (log4Net).
If i just copy the ${target}, then i do not get the dependant files that this project requires.
What is the preferred thing to do in this situation? Manually specifying the list of all the files to copy for each project, will be quite a laborius task.
Thanks
|
|
|
|
|
You might consider placing your third party assemblies in the common folder and just leaving them there, since multiple projects will reference them anyway, then just move the ${target} assembly into the common folder post-build.
If you apply the post-build script consistently to all of the projects in the applications whose assemblies you want in the common folder, you should be okay.
The most exciting phrase to hear in science, the one that heralds the most discoveries, is not 'Eureka!' ('I found it!') but 'That's funny...’
|
|
|
|