|
Just try one trick.
Before loading data to datagrid disable it and, once
data is loaded make it enable.
dataGridView1.Enable=false;
dataGridView1.Datasource=dataTable1;
dataGridView1.Enable=true;
HTH
Jinal Desai - LIVE
Experience is mother of sage....
|
|
|
|
|
Well, I finally discovered the problem. It was a side affect of the DataGrid being updated, and not the update itself. On an update, any changed data is sent to the TextBox and that part of the system was unaware to me. They were losing their focus because all objects were trying to refresh their data and not just the DataGrid.
Also, the update to the DataGrid was being done through a DataTable, in which I never did need to refresh the DataSource variable. You simply have to:
DataRow row = _pumpTable.Rows[index];
row.BeginEdit();
row.EndEdit();
row.AcceptChanges();
Thank you for your reply!
|
|
|
|
|
I am having a problem and been looking for days on passing a variable to a textbox in reportviewer.
Currently I have one date string and eventually will have six that I want to pass to textboxes in my .rdlc report. I am pulling information from a database to place in the report and have constructed a dataset. The dataset does not allow me to pull the dates I need since they are future dates, i.e. timecards/dairycards and the dates are picked from a calendar control, The dates are stored as variables and placed in an array for the report.
I keep getting the following error message when I run the report:
LocalProcessingException was unhandled.
Microsoft.Reporting.WinForms.LocalProcessingException was unhandled
Message="An error occurred during local report processing."
Source="Microsoft.ReportViewer.WinForms"
Below is my code for the btnRun_Click event:
private void btnRun_Click(object sender, EventArgs e)
{
reportViewer1.ProcessingMode = ProcessingMode.Local;
LocalReport localReport = reportViewer1.LocalReport;
reportViewer1.LocalReport.ReportPath = "Report1.rdlc";
string param0 = GlobalClass.GlobalVar;
ReportParameter inputdata = new ReportParameter("DateOne", param0);
<code>this.reportViewer1.LocalReport.SetParameters(new ReportParameter[] {inputdata});</code>
this.EMPLOYEESTableAdapter.Fill(this.AttendanceDataSet.EMPLOYEES);
this.reportViewer1.RefreshReport();
}
I have highlighted the line of code that the exception is thrown at.
I do have on my report the textbox expression set as:
=Parameters!inputdata.Value
I have looked everywhere I can think to find a solution. Any advice would be helpful.
Thanks in advance
|
|
|
|
|
Hello,
I am using Dynamic dictionary in C#. The problem which I am facing , is the usage of TryGetMember behavior which i am overriding in dynamic dictionary class.
here's the code of dynamic dictionary.
class DynamicDictionary : DynamicObject
{
private IDictionary m_dictionary;
public DynamicDictionary(IDictionary<string, TValue> a_dictionary)
{
m_dictionary = a_dictionary;
}
public override bool TryGetMember(GetMemberBinder a_binder, out object a_result)
{
bool returnValue = false;
var key = a_binder.Name;
if (m_dictionary.ContainsKey(key))
{
a_result = m_dictionary[key];
returnValue = true;
}
else
a_result = null;
return returnValue;
}
}
Here TryGetMember will be called at runtime whenever we refer some key from outside. But strange here that binder's Name member which always give the key what we refer from outside. Strange here that it always resolve the key name what written as characters of alphabets.
e.g if make the object of DynamicDictionary as
Dictionary<string,List<String>> dictionaryOfStringVsListOfStrings;
dictionaryOfStringVsListOfStrings.Add("Test", listOfStrings); //here listOfStrings some strings list already populated with strings
dynamic dynamicDictionary_01 = new DynamicDictionary(dictionaryOfStringVsListOfStrings);
string somekey = "Test";
List listOfStringsAsValue = dynamicDictionary_01.somekey //will be resolve at runtime
Now here what happens actually "somekey" will become the value of a_binder (i.e a_binder.Name="somekey") what I need that key assigned value should be resolved as key. i.e it should be resolved as a_binder.Name = "Test" and then from dynamic dictionary it will locate listOfStrings against this key i.e actually "Test" but it resolves not the value but actual variable name as key..
Way around?
Regards Usman
|
|
|
|
|
I just want to make my form, free of its Parent and change WindowState and BorderStyle of it for a fullscreen view.
Anybody have some suggestions?
Bye bye
|
|
|
|
|
MDIChild is always rendered in the context of it's parent MDI form.
It cannot go beyong it.
However, you can set MDIChild's property to set it to expand to full view
in the context of it's parent.
MDIChild1.WindowState == FormWindowState.Maximized;
HTH
Jinal Desai - LIVE
Experience is mother of sage....
|
|
|
|
|
Thank you Jinal.
But if i remove the parent form the MDIchild?
how to remove the parent?
Is it possible?
|
|
|
|
|
No man, it is not possible to remove parent.
Because it is the container and if you remove
container then the child will also disappear.
HTH
Jinal Desai - LIVE
Experience is mother of sage....
|
|
|
|
|
You may want to consider using this[^] docking framework as an alternative to the built-in MDI facility.
/ravi
|
|
|
|
|
childForm.MdiParent = null;
I believe that's how I did it. I wanted some child windows to detach in order to drag them across both of my monitors. Then you can change to maximized and and whatever else.
|
|
|
|
|
well as u ask ....how to make full screen the child form of mdi....
so just do one thing.
1 ---go to the child form property and set the property "FormBorderStyle" to "FixedSingle" and set the "size" also to 935, 680 n above.
2-Now make the form child by command like
form1 _a=new form1();//Child Form
_a.MDIParent=this
_a.Show();
Niyamat Khan
9810320282
niyamat@iamsingle.in
|
|
|
|
|
Hi,
I have created a simple browser..my requirement is if i open my browser....all other opened browsers example IE,FireFox...need to get close....and should not re-open. I have tryed by killing the process...it worked out but its working only in the first time, by refreshing continuously i can achieve this....but how to auto-refesh a control or a page continuously
krishna
|
|
|
|
|
You can use timer control. And on tick event of timer that is
fired on specific time interval you have set, you need to perform
the action required to kill browser process and refresh your
browser control.
Find example of timer control here[^].
HTH
Jinal Desai - LIVE
Experience is mother of sage....
|
|
|
|
|
Thanks alot...i have done it... :->
krishna
|
|
|
|
|
Hi, Everyone!!
I need ur help, regarding html entity replacement----
I have characters incoming from an xml template for example:
& —
I want to replace these in html code in c# like:
& — respectively.
can some one please help me with proper code.
because I am fresher.
waiting for your earliest reply.
thanx in advance
-- Modified Thursday, July 22, 2010 6:37 AM
|
|
|
|
|
Hi Ahamed, Please refer [HERE]
|
|
|
|
|
thanx for ur kind attention. i am seeing th link.
actually, in my xml file has & and mdash;
and i write in this character code in html , an want to show the above code is in character like: & and -
is there any namespace , to read entity
thanx
|
|
|
|
|
For complete list of Character Entities of HTML for
all numeric code refer this[^] link.
HTH
Jinal Desai - LIVE
Experience is mother of sage....
|
|
|
|
|
hi..
I want help for how can solve these scenario . In my chat application , i was creates socket communication ( TCP /IP) . Once if we run the application to the system which is listen one port and send a data to another port .
With in a local area network , what are the application are , username appear all application . if we need to send to particular user . that will send to that ipaddress and corresponding that listening port ( Now already fixed listening and sending port address ). Now my question is if that port is used already with some another application , we can modify the listening port using application config file.
In the scenario how can fine the listening port or want to do something else please help me
Thanks
|
|
|
|
|
Typically a server represents a significant dedicated resource and one that will not often change.
Consequently the port will be free.
However one might still one to provide a way to configure it. In that case one needs to provide a way to configure the client as well to use a different port. This is a common idiom such that it can be seen in many places such as that http defaults to port 80 but there is a way to specify a different port. Same thing is true for databased connection urls.
There are other alternatives involving various ways of 'discovering' a resource which involve using another server (such as LDAP) or using a broadcast via UDP. Neither is likely to be suitable for a chat application.
|
|
|
|
|
Is this a client-server chat application or some kind of peer-to-peer chat application? Once a client connects to a server the server just needs to know what user is associated with that stream. You shouldn't have to keep opening and closing the connection.
|
|
|
|
|
Thanks for reply
This is not server client application . directly connect to application via IP/port ( peer to peer ).
If i check all consequently free port ( backward / forward ) , its occur any performance issue or may be time delay or have any network traffic . Its a major problem or simple one..
Thanks
|
|
|
|
|
I have a small program that loads the html code from a local html file. How can I extract the bold and italic text and display it?
I work with Visual Studio 2008.
Could you please direct me to some articles/code? I've searched and tried for one week now and can't seem to do it... I need this from school.
THANKS a lot. I really appreciate it.
Cris
|
|
|
|
|
you could use Regex class (multi-line, case-insensitive, ignoring space) to locate strings delimited by b, i, strong tags. You may get some trouble when some string is both italic and bold at the same time.
|
|
|
|
|