|
See this[^] article about printing data. Might help.
|
|
|
|
|
Hi All,
im working on c# windows forms,i need to add a check box control to datagrid while binding data.To be clear im adding some set of fields to the datagrid.I need to add checkbox in the cells having datafied "id".If i check that id check box i need to display the checked value.This is my question,please do needful.Im new to this windows forms.
Thanks in advance.
|
|
|
|
|
This[^] explains what you need.
Once, you have added the DataGridBoolColumn, handle its MouseClick event to display/hide the data.
I prefer using DataGridView instead of the grid. Check out if that suits your need.
|
|
|
|
|
hi all
I have a datagrid and another datagrid in the rowdetails. When 2 or more rowdetails are displayed, there is problem with scrollbar.
The scrollbar will not disappear when the row detail is collapsed using a button placed in the rowdetails..Please help me if anybody has the solution.
the code to Collapse the rowdetail is as follows:
private void CancelButton_Click(object sender, RoutedEventArgs e)
{
StackPanel panel = (((sender as Button).Parent as Grid).Parent as StackPanel);
DataGrid grid = panel.Children[1] as DataGrid;
DataGridRow row = DataGridRow.GetRowContainingElement(grid);
row.DetailsVisibility = Visibility.Collapsed;
}
thanks in advance..
|
|
|
|
|
is it possible to know the method used by dotnet libraries. i m using getbezierpoints method in dotnet to get the bezier points of a stroke. but not sure if dot net is using quadratic bezier points or cubic bezier point or something else. my further analysis depends on the method used by them. i asked the same question 2 days back n was suggested to seek help of reflector. unfortunately reflector is not able to give the code behind. is there any other way out. pls help
|
|
|
|
|
Hi,
for such questions there are IMO three possible answers:
- documentation
- reflection
- experiments
I would spend 10 minutes on documentation, try reflection for 10 minutes, then start a series of little experiments, trying out some extreme cases since those are most likely to show the differences.
Luc Pattyn [Forum Guidelines] [My Articles]
The quality and detail of your question reflects on the effectiveness of the help you are likely to get.
Show formatted code inside PRE tags, and give clear symptoms when describing a problem.
|
|
|
|
|
how to prevent same forms laod agin and agin from MDI???
|
|
|
|
|
use the below sample code.
bool flag = false;
FrmSearch search = new FrmSearch();
foreach (Form f in this.MdiChildren)
{
if (f.Name.ToString() == search.Name.ToString())
{
f.Focus();
flag = true;
break;
}
}
if (flag == false)
{
search.MdiParent = this;
search.Show();
}
Regards,
Karthik K...
|
|
|
|
|
KKarthik2000 wrote: if (f.Name.ToString() == search.Name.ToString())
AFAIK string.ToString() is a waste, it just returns
string<br />
<br />
:) <br />
<br />
<div class="ForumSig">Luc Pattyn <a href="http://www.codeproject.com/KB/scrapbook/ForumGuidelines.aspx">[Forum Guidelines]</a> <a href="http://www.codeproject.com/script/Articles/MemberArticles.aspx?amid=648011">[My Articles]</a><br />
<hr>The quality and detail of your question reflects on the effectiveness of the help you are likely to get.<br />
Show formatted code inside PRE tags, and give clear symptoms when describing a problem.<hr></div>
|
|
|
|
|
Hi,
i need to convert a Java project to c#.
In java we have defaultTreeModel and defaultMutableTreeNode, jTable, JTree, jscrollpane is there any equivalent component in c# which performs same as the above mentioned java components.....??
I know there is treeview in c#... can i use tat one?
If so, plz tell me abt those components.....
thank u
|
|
|
|
|
vidhyaravichandar wrote: I know there is treeview in c#... can i use tat one?
TreeView should do all those and much more. Give it a try.
|
|
|
|
|
How to use tree view can give a details
|
|
|
|
|
Get a book
Read some doco
Get some samples and work through them there are plenty around.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
For a very long time now I've been having a problem with making an icon appear on the top-left part of my form. I have created a .ico file and it works for my .exe icon but whenever I try it on my icon property of my form it doesn't work. Anyone have any ideas why I'm having this problem?
|
|
|
|
|
An icon file can contain icons in a number of different sizes. You probably are not including one in the size needed for the corner of the form ( I am guessing 16x16 or 32x32 )
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
As Christian said, ICO files can contain several icons at different sizes (but meant to represent the same thing). Which "sub-icon" gets used depends on the situation AND the Windows version.
And Vista introduced new sizes.
This[^] and this[^] gives some details.
I never encountered a situation where an icon wasn't showing; I usually design it at 32*32 and that seems to work for me every time (that is on XP and Vista). However the favicon.ico shown in a browser's address bar has to be 16*16.
On XP hovering an ICO file shows a tooltip, which mentions the size iff there is only one. Don't know for Vista.
Luc Pattyn [Forum Guidelines] [My Articles]
The quality and detail of your question reflects on the effectiveness of the help you are likely to get.
Show formatted code inside PRE tags, and give clear symptoms when describing a problem.
|
|
|
|
|
Are you using Visual studio to create icon? If yes I would suggest use some other software to create the icon. I struggled with the same kind of problem,but got rid of it using some freeware icon generator tool(I do not remember the name of that software). you will get it on the net for free
|
|
|
|
|
Personally, I use IcoFX. It's freeware and has many useful features (such as extracting icons from existing files).
|
|
|
|
|
I use IcoFX if that's any help
DaveBTW, in software, hope and pray is not a viable strategy. (Luc Pattyn) Visual Basic is not used by normal people so we're not covering it here. (Uncyclopedia) Why are you using VB6? Do you hate yourself? (Christian Graus)
|
|
|
|
|
Well thank you so much! It turns out that with IcoFX the icon works well.
|
|
|
|
|
Hi,
I have a winform that has a grid linked to a bindingsource. The winform also has a usercontrol on it that also contains databound data linked to the same datatable but via a different bindingsource.
There is a definite need to have the separate usercontrol although life would be much easier without it <sigh>. The usercontrol is loaded onto the winform as a module contained within the winforms tab pages collection.
Anyhow, what I need to do is use the winforms grid as the navigator for the usercontrols binding source.
I have tried everything I can think of, the 'easiest' being to change a static variable on the usercontrol and then have a static method on the usercontrol change the bindingsource position but the bindingsource itself needs to be made static and that's not possible as far as I know?
Can someone come up with some code that will do the trick.
Thanks.
Glen Harvy
|
|
|
|
|
I am working on something that passes a DataGridView to a used control which then accesses the bindingsource of the DGV. I do this by having a public property on the UC of type DataGridView and passing the DGV on form load. I imagine you could do the same with a bindingsource.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
|
Hello I'm new to C# so you might have to bear with me a little bit but here is my problem. I am trying to make a windows form so that when you press a button, all the buttons disappear from the form. When that happens I am trying to make a different button take its place. You might find this a strange thing to do... but I have my reasons . This is as far as I have gotten.
Making a new button...
Button newButton = new Button(); (tell me if this is even works, because I'm not really all that sure if it does).
And that's all I can come up with. I've tried really hard to make that button appear after the others ones are disposed and I THINK it might have something to do with newButton.Location.X/Y. But that's just a guess. So it would be greatly appreciated if anyone could offer me any help.
I do not ask for code I simple ask for a little guidance to my next step.
Thanks, Nik!
|
|
|
|
|
After you create the button Button newButton = new Button() you have to set its x and y coordinates, width and height, and add it to the form: this.Controls.Add(newButton);
|
|
|
|