|
Hi:
yourdatagrid[r,c]=youtext
or you can operate the datatable
|
|
|
|
|
datatable would work.
Do you know how to bind an arraylist to a datatable?
thanks
Naji
|
|
|
|
|
Hi All,
I'm having the worst time trying to bind data to a IBindableComponent. I can bind things fine to a Data Grid View using:
IBindableComponent.DataBindings.Add("DataSource", IList, "MyTable")
But when I do the same thing where the IBindableComponent is a ComboBox:
this._bindableControl.DataBindings.Add( "DataSource", _bindingSource, "Value", true );
It adds it to the combo box's data bindings but does not bind it to the "DataSource" property. Very frustrating. I should note that unless I put in the "true" for "Formatting enabled", it throws an exception saying that the data source needs to be of type "IList" or "IListSource", but guess what, it is!
The "_bindingSource" is a class which implements "IListSource" and returns a "BindingList" of "ItemList" objects. The "Value" data member property that I'm supplying is the "Value" property of the "ItemList" object. This seems like the right approach to me, especially considering the end use of this will be for application developers who need to supply special formatting to what needs to be displayed in the combo box. I've tried using a BindingSource, and basically every other combination I can think of. I don't want to have to implement IList either, that would be extremely messy and unnecessary, in my opinion.
I really want to try and use the interface for this and not cast the object to what it really is. When I do that, it does work, but I want to avoid it at all costs.
Thanks in advance for any help anyone is able to provide. I would really appreciate solving this problem.
Eric
|
|
|
|
|
Don't cross post, you already asked this question in the Soapbox
Some people have a memory and an attention span, you should try them out one day. - Jeremy Falcon
|
|
|
|
|
I am just learning C# so please be patient.
I am trying to set up a splash screen that will last for a given amount of time and close itself, but I can't seem to find any references to such an operation (or more likely just can't understand what I have found...)
I have the splash screen set up, it closes when clicked. I just need something that will close the form after X number of seconds.
Thanks in advance!
David Wilkes
|
|
|
|
|
i just get this problem i instead of going it traditionally i tried this (you can say it hack)
in main thread i run a form build for this purpose named frmWelcome
static void Main()
{
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
Application.Run(new Screens.frmWelcome());
Application.Run(new Screens.frmMain());
}
then i set a timer in frmWelcome set its time interval equal to the time i want to show it and on its tick event i just write
this.Close();
it is good to be important but it is more important to be good
|
|
|
|
|
amatbrewer wrote: I just need something that will close the form after X number of seconds.
1- Go to the designer mode.
2- In your toolbox, drag a Timer control and drop it in your form -looks like a small clock-.
3- Single click on the Timer control in the panel below your form.
4- In the PropertyGrid set the Interval property to the number of milliseconds you wish -ie. X * 1000-.
5- Double click on the Timer control in the panel below your form.
6- Write the following code in the event handler:
this.Close();
Regards
|
|
|
|
|
Thank You!
This is exactly what I was looking for.
David Wilkes
|
|
|
|
|
hi
i want to pass some parameters to crystal reports but how to do that ?
i tried to pass parameters to Crystal reports by ParameterFields properties but it's could not pass my value to crystal reports fields.
please give me a tested example for vc# 2005 ..
thanks
|
|
|
|
|
If I have a VS.NET 2005 project, and I set its default namespace to be MyCompany.Library, then add a folder to that project (using VS) called Database, and just for giggles, add a subfolder to that called SQL, THEN add a new class to that folder, instead of getting the namespace MyCompany.Library, I get MyCompany.Library.Database.SQL. Easy enough to fix, until I start adding forms and user controls to a similarly set up Windows Forms project, at which point I have to change the namespace in both the Form.cs file AND the Form.Designer.cs file.
Is there a way to turn off this annoying "feature"? I strolled through the VS properties, but it didn't jump out at me.
Thanks in advance!
Kyosa Jamie Nordmeyer - Taekwondo Yi (2nd) Dan
Portland, Oregon, USA
|
|
|
|
|
i like this feature i just create folders according to my needs and VS takes care of namespaces
it is good to be important but it is more important to be good
|
|
|
|
|
Well, to each their own.
In my case, my folder structures tend to mirror what they do (Interface Definitions as a folder name, for example), not the namespace pattern I want to use. Plus, if I'm just seperating out functionality, but want the objects in the same namespace, I should be able to do so without having to edit every class.
Kyosa Jamie Nordmeyer - Taekwondo Yi (2nd) Dan
Portland, Oregon, USA
|
|
|
|
|
i didn't find any solution for that but i think a work around will help
just create the class /form /whatever in you parent directory (MyCompany\Library)
and then drag it to destination folder (MyCompany\Library\Database\SQL)
you can use it until somebody else comes up with a better solution
It is Good to be Important but!
it is more Important to be Good
[My Question]
|
|
|
|
|
I can not connect to a database oracle 10g from the .net
I receive this error msg "ORA-12154:TNS could not resolve the connect identifier specified
Dad
|
|
|
|
|
hadad wrote: ORA-12154
Google search for ORA-12154[^] might help you out
Some people have a memory and an attention span, you should try them out one day. - Jeremy Falcon
|
|
|
|
|
Check your tnsnames.ora file
Check that you are using the right service name as defined in tnsnames.ora
Use the oracle Net Configuration Assistant tool to test the connection
System.IO.Path.IsPathRooted() does not behave as I would expect
|
|
|
|
|
The product I am working on is a standard product that my company sells to clients. Like all software, no client seems to like the software just the way it is... Everybody wants to tweak this or that functionality. I don't have a problem with this as it makes our product better and adds functionality. My problem is that we are getting a larger client base. It is becoming difficult to manage the base project separate from the client customizations and their projects. If any of you have a good way to manage customizations between many clients and a base product, please share or suggest ways to do this better.
Environment:
Visual Studio .NET
SQL Server 2000
Microsoft VSS
Thanks for any responses!
Hogan
|
|
|
|
|
Can you not just create settings of functionalities in your app?? I don't know which customizations we're talking about, what I recently implemented in one of my apps was a (what I called) SettingsManager Class which is basicly very simple, when it gets instanciated, it loads several values from datasource and exposes them via properties. When properties are set, the class changes the values in the database (easy right??) Now some settings are user dependant, others are 'global' settings which count for all users, to I added a argument for User ID in the constructor for the SettingsManager class, to make sure we load settings for the correct user, and (ofcouse) set them for the correct user once a property is being set.
Now you have a set of booleans, integers, strings you name is available via your SettingsManager properties and let your app interact with that...
<br />
if (!SettingsManager.HideWarningMessages)<br />
Messagebox.Show("WARNING!!");<br />
It works great here...
|
|
|
|
|
Eduard,
Thanks for your response, but I believe it is more complicated than just settings. I'll provide a better example.
Our product has 3 standard interfaces to bring data into it (ODBC, CSV, XML). We have several clients that use our standard interface. However, several of our clients, don't have a development staff. They will provide us with a CSV or ODBC interface that we have to work with. I don't think it makes sense to carry 5 custom CSV interfaces in our standard product that other clients will never use. The custom interfaces can be quite large and difficult to deal with. This seems to violate the KISS principle for code.
What you listed in your comment sounds more like a permission system for standard features. Am I missing something?
Hogan
|
|
|
|
|
Hi,
I am working on a GridView control to play a game. I am trying to make the cells editable; however, when I click on edit I lost my data or I get an error:
Object reference not set to an instance of an object
Here is a code sample (excuse the messiness, I am still debugging things and I like to clean-up at the end)
protected void Page_Load(object sender, EventArgs e)<br />
{<br />
if (!IsPostBack)<br />
{<br />
NewGame(0); <br />
}<br />
else<br />
{<br />
lblStatus.Text = lblStatus.Text + "postback!";<br />
mySet = _newGame.GameSet;<br />
DataRow[] currentRows = mySet.Tables["problemcopyset"].Select(null, null, DataViewRowState.CurrentRows);<br />
foreach (DataRow row in currentRows)<br />
{<br />
foreach (DataColumn column in mySet.Tables["problemcopyset"].Columns)<br />
{<br />
lblStatus.Text = lblStatus.Text + row[column] ;
}<br />
}<br />
lblStatus.Text = lblStatus.Text + "<br />
";<br />
}<br />
}<br />
<br />
private void NewGame(int index)<br />
{<br />
GameLevel[] levels = { GameLevel.SIMPLE, GameLevel.MEDIUM, GameLevel.COMPLEX };<br />
<br />
<br />
if (index > -1)<br />
{<br />
_newGame.GenerateGame(levels[index]);<br />
gameGrid.Visible = false;<br />
_currentSet = _newGame.GameSet;<br />
mySet = _currentSet;<br />
_currentSet.Tables["numberset"].DefaultView.AllowNew = false;<br />
<br />
<br />
if (_currentSet != null)<br />
{<br />
_currentSet.Tables["answerset"].ColumnChanging += new DataColumnChangeEventHandler(this.CurrentSet_ColumnChanging);<br />
}<br />
gameGrid.Visible = true;<br />
gameGrid.DataSource = _currentSet.Tables["numberset"];<br />
gameGrid.DataBind();<br />
<br />
}<br />
<br />
<br />
}<br />
protected void gameGrid_RowEditing(object sender, GridViewEditEventArgs e)<br />
{<br />
lblStatus.Text = lblStatus.Text + "<br />
editing!<br />
";<br />
gameGrid.EditIndex = e.NewEditIndex;<br />
gameGrid.DataSource = mySet.Tables["numberset"];<br />
gameGrid.DataBind();<br />
}
Any help would be greatly appreciated.
Thanks!
|
|
|
|
|
This looks like an ASP.NET problem. Am I correct? If so, it looks like you're not caching your dataset between postbacks.
|
|
|
|
|
Yes, you are right...I managed to get it to work.
Thanks!
|
|
|
|
|
has someone used this DLL tu read a class from a JAR file I am having some errors but with out relevant things
stack trace:
at Jni.Net.Bridge.JClass.ForName(String name) in C:\Documents and Settings\penuelas\Desktop\Downloads\article1_source\Jni.Net.Bridge\src\JNI.NET.Bridge\JNI.NET.Bridge\Jni\Net\Bridge\JClass.cs:line 55
at CsharpJVM.CSharpVirtual..cctor() in C:\Documents and Settings\penuelas\My Documents\Visual Studio 2005\Projects\CsharpJVM\CsharpJVM\CSharpVirtual.cs:line 15
-- modified at 13:59 Tuesday 28th November, 2006
|
|
|
|
|
hi
i need a free task pane component. can anyone reply me ??
i get a very good task pane control from codeproject but when i compile it's project the following error shown me :
private void InitializeComponent()
{
System.Resources.ResourceManager resources = new System.Resources.ResourceManager(typeof(DemoForm));
this.systemTaskPane = new XPExplorerBar.TaskPane(); //error occured in this line
this.pictureTasksExpando = new XPExplorerBar.Expando();
....
}
A call to PInvoke function 'XPExplorerBar!XPExplorerBar.NativeMethods::LoadBitmap' has unbalanced the stack. This is likely because the managed PInvoke signature does not match the unmanaged target signature. Check that the calling convention and parameters of the PInvoke signature match the target unmanaged signature.
|
|
|
|
|
Please see the comments to the XPExplorerBar article, where this bug was discussed and solved[^].
|
|
|
|