|
I do not read whole your question. But by reading some lines what I got is
that you need to make visibility true or false for particular column of DataGrid based
on some condition or data change in particular row of the same grid.
Find following code useful for the same.
dataGridView1.Columns["column_name"/column_number].Visible = false/true;
private void dataGridView1_CellContentClick(object sender, DataGridViewCellEventArgs e)
{
String str=dataGridView1.Rows[e.RowIndex].Cells[e.ColumnIndex].Value.ToString();
}
HTH
Jinal Desai - LIVE
Experience is mother of sage....
|
|
|
|
|
I'm sorry that you feel the need to reply to messages without reading them.
As I said, I've had a lot of unsuccessful testing with various methods of accomplishing dynamic visibility of cells.
Your suggestion is just one of a half dozen that I already desperately tried.
It does NOT work. It hides an entire column.
I really need an answer to my current situation for which I believe I have provided an entire independent functioning example.
|
|
|
|
|
Hi, I need help with my report
I have created 2 tables:
Table1:
>>Datasource: Datasource1
>>Dataset: ReportItemLevelDetail1
Its grouped by category:
CategoryGroup1, expression =Fields!CategoryName.Value
The field creates a running value of =Sum(Fields!ActualCost.Value,"CategoryGroup1")
Table2:
>>Datasource: Datasource2
>>Dataset: ReportItemLevelDetail2
Its grouped by category:
CategoryGroup1, expression =Fields!CategoryName.Value
The field creates a running value of =Sum(Fields!ActualCost.Value,"CategoryGroup2")
Both create the same data but at different time periods I need to make a table3 and with
The difference between =Sum(Fields!ActualCost.Value,"CategoryGroup1") and =Sum(Fields!ActualCost.Value,"CategoryGroup2")
|
|
|
|
|
o0romeo0o wrote: I need help with my report
Who is the creator of the report object? This sounds more like a question for them.
The mind is like a parachute. It doesn’t work unless it’s open.
|
|
|
|
|
Hi guys,
Just a quick question -
I have a Windows Form (C#) with a WCF reference built on VS 2008, Windows 7.
Everything works ok. The form connects to the service, gets the data I need, and outputs it to the form.
Once I deploy/move the application to a Windows XP Pro machine - nothing works!
I have 3.5, 3.0 and 2.0 frameworks installed with all the updates.
Has anyone had a similar issue before? Or knows what could be going wrong? Perhaps I need to release the app with all references inbuilt?
Thanks for your help!
Xav.
|
|
|
|
|
xavier9999 wrote: Once I deploy/move the application to a Windows XP Pro machine - nothing works!
That's way too vague.
- Did you get an exception? You're not swallowing those, are you?
- Checked the EventLog for details?
- Does it 'try' to launch the executable, or does it even refuse to load? (Does the mouse-cursor change?)
- You mentioned that three frameworks being present, what framework is the project using?
- Verified that DEP is off? Right-click the executable and open the properties, might say something like "blocked".
I are Troll
|
|
|
|
|
xavier9999 wrote: nothing works!
Do you get some errors?
Specify them here and someone might be able to help you.
|
|
|
|
|
Hi,
Try installing "ASimpleProjectSetup"
This utility helps Windows display the apps developed in .NET.
You can download it from Microsoft website.
If case you cannot find any link for this, search for the .NET framework setup and you will see a link for "ASimpleProjectSetup" at the bottom of the page.
Please tell me whether this solution works or not.
|
|
|
|
|
How can i save values from datagridview to database
|
|
|
|
|
|
By little googling[^], see what I found.
HTH
Jinal Desai - LIVE
Experience is mother of sage....
|
|
|
|
|
hi,
I want to bind a bool property of my class to the "Enabled" property of a control, but when I change my bool property, the enabled state of my control isn't changing, here an example
<br />
private bool boolValue = false;<br />
public bool BoolValue<br />
{<br />
get { return boolValue; }<br />
set { boolValue = value; }<br />
}<br />
<br />
button1.DataBindings.Add("Enabled", this, "BoolValue", false, DataSourceUpdateMode.OnPropertyChanged);<br />
<br />
BoolValue = true;<br />
How can I solve this problem?
Regards,
timm
|
|
|
|
|
The "DataSourceUpdateMode.OnPropertyChanged" is a flag that sends button1's "Enabled" value to the current record's "BoolValue" field.
It does not tell the datasource to send updates to the control.
What you need to do is force the binding context of the button to update it's index. This will cause: button1 to read the changed value.
The mind is like a parachute. It doesn’t work unless it’s open.
|
|
|
|
|
|
Hi
I am using dataset control for crystal reports inside the dataset i type tables and then pass it to thte crystal report.
Using this way i have a feeling that if i have 300 reports the dataset control will definately become heavy and the application will get slow.
My question is:
1) Is there any other way of doing it using untyped data set without using the typed dataset?
2) Is there a way i can use it without a dataset control?
Regards
|
|
|
|
|
You can "pull" data directly from source without using needing to use dataset.
You should only passing the datatables that are needed for each report, so whether 3 or 300 reports it should not matter, unless you are talking about generating 300 reports all at once.
|
|
|
|
|
you are right but what i want to do here is:
1) Not to use the dataset control in which i create tables for each report.
if i create a datatable it is not accepting to through values in the crystalreport datasource.
However all the columns are the same on both sides.
|
|
|
|
|
You're near bankrupt, aren't you? I can tell by the way that you're trying to save money on advertising
I are Troll
|
|
|
|
|
Please read this[^] guideline before you post anything in the thread.
If you want to put any product world wide then post the article in
"Product Showcase" section of code project.
HTH
Jinal Desai - LIVE
Experience is mother of sage....
|
|
|
|
|
You are not even on the right website(forget the forum).
The funniest thing about this particular signature is that by the time you realise it doesn't say anything it's too late to stop reading it.
|
|
|
|
|
I have a DataGridView in a windows form that I need to be able to make the datagridviewbutton visible or invisible depending on the value of another column. I can not figure out how to make this happen when I bind the datatable to the datagridview.
Any help would be appreciated.
Thanks
John
|
|
|
|
|
For that you need to use RowDataBound event. Try following code.
protected void MyDataGrid_RowDataBound(object sender, GridViewRowEventArgs e)
{
if (e.Row.RowType == DataControlRowType.DataRow)
{
if (condition)
{
(e.Row.FindControl("buttonid") as Button).Enabled = false;
}
}
}
HTH
Jinal Desai - LIVE
Experience is mother of sage....
|
|
|
|
|
hi man,
this could be a possible solution but never tested..
In the CellValueChanged event you have to check your specified cell against your condition and than try:
<br />
dataGridView1.Rows[rowIndex].Cells[buttonCell].ReadOnly = true;<br />
or
<br />
dataGridView1.Rows[rowIndex].Cells[buttonCell].Frozen = true;<br />
hope i could help
|
|
|
|
|
Hey - we're looking at trying to implement a T9-based predictive text capability (like on your cell phone/PDA) into our Windows forms application (this is running on a standard Windows/embedded environment, NOT on a smart phone). Has anyone seen or worked with anything like this in the past?
Cheers,
Chris
|
|
|
|
|
For that you need to do following.
1. Maintain one dictionary which will serve as base for auto suggestion.
2. Bind that dictionary with your textbox.
3. Track keypress event of your textbox and suggest world if it is starting
from the character user enters.
That's All.
HTH
Jinal Desai - LIVE
Experience is mother of sage....
|
|
|
|