|
Streaming video, over the network, to multiple users, with sound, at 25 FPS, and keeping it in synch ? You're insane.
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.
|
|
|
|
|
Christian Graus wrote: You're insane
Yep. But I (and probably you) worked that out last time...
No trees were harmed in the sending of this message; however, a significant number of electrons were slightly inconvenienced.
This message is made of fully recyclable Zeros and Ones
|
|
|
|
|
Hello. I have a question that i would like to ask all the codeproject members.
I have this cenario:
TextBox.DataBindings.Add("Text", DataTable, "Field", false, DataSourceUpdateMode.OnPropertyChanged)
A textbox is binded to a DataTable field. When i change the text on the textbox the cell from the datatable receives the new value, but the RowState of the current row doesn't changes to Modified, it keeps the Unchanged state. Only when i change to another row in the DataTable (the DataTable is binded to a DataGrdiView) that the RowState of that row is changed to Modified. The problem is that when i have only one row and the user saves the information, i use a batch update to save the changes in the DataTable, but as the row keeps the Unchanged State is doesn't gets to the update.
Is there any way to solve this?
Thanks in advance.
|
|
|
|
|
It is possible that the Row is still in Edit Mode.
When the user saves, does your code call EndEdit ?
If this is a possibility, see How to: Commit In-Process Edits on Data-Bound Controls Before Saving Data[^] on MSDN.
Henry Minute
Do not read medical books! You could die of a misprint. - Mark Twain
Girl: (staring) "Why do you need an icy cucumber?"
“I want to report a fraud. The government is lying to us all.”
|
|
|
|
|
Right before you call update on the data set, call this:
private void CommitChanges(DataSet ds)
{
foreach (DataTable dt in ds.Tables)
{
foreach (DataRow dr in ds.Tables)
{
dr.EndEdit();
}
}
}
Or, you could first subscribe to the ColumnChanged event on the table
dt.ColumnChanged += new DataColumnChangeEventHandler(dt_ColumnChanged);
then in the event do this:
static void dt_ColumnChanged(object sender, DataColumnChangeEventArgs e)
{
e.Row.EndEdit();
}
Everything makes sense in someone's mind
modified on Wednesday, October 7, 2009 11:28 AM
|
|
|
|
|
Thanks to the both of you. Although i'm using .net 2.0 the answer from Henry Minute was correct for that i thank you.
The asnwer from KMAROIS was exactly what i was looking for. Thanks
|
|
|
|
|
Hi all..
========================================
TYPE Public_Rec IS RECORD
(user_id SETUP_TAB.user_id%TYPE,
tool SETUP_TAB.tool%TYPE,
database SETUP_TAB.database%TYPE);
========================================
FUNCTION Get (
id_ IN VARCHAR2 ) RETURN Public_Rec
IS
temp_ Public_Rec;
CURSOR get_attr IS
SELECT user_id, tool, database
FROM SETUP_TAB
WHERE id = id_;
BEGIN
OPEN get_attr;
FETCH get_attr INTO temp_;
CLOSE get_attr;
RETURN temp_;
END Get;
========================================
can any one tell me how to this function and set return value to dataset.
|
|
|
|
|
The same way you'd call a stored proc. Use ExecuteScalar if your function has a single return value.
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.
|
|
|
|
|
OracleConnection conn = new OracleConnection();
String str = "Data source=****;user ID=****;Password=****;";
conn.ConnectionString = str;
OracleCommand cmd = new OracleCommand("Setup_API.Get", conn);
cmd.CommandType = CommandType.StoredProcedure;
OracleParameter id_ = new OracleParameter();
id_.ParameterName = "id_";
id_.OracleDbType = OracleDbType.Varchar2;
id_.Value = "11";
id_.Direction = ParameterDirection.Input;
cmd.Parameters.Add(id_);
i have write this code..and can you tell me how to get return value(record) and and how to set it inti dataset.i'm new to C#,pl sql.thank you for reply my post.
|
|
|
|
|
sampath_dr wrote: i'm new to C#,pl sql.
you're new to C# and SQL ? In what context do you need to do this then ?
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.
|
|
|
|
|
i'm doing my indusrial training these days.To my project need it.can you help me? thank you reply my post.
|
|
|
|
|
Hi,
i have made program which takes screen-shots and crop screen image. but i want to take a screen shots like -
you can see any image or screen or in web page, there are many rectangle images, not only images, it can be anything in rectangle shape. i want to take a screen shot of each rectangle image of screen. how can i do this???
take a look at snagit software. i am developing application like this.
|
|
|
|
|
You would take a screenshot of the actual desktop, and then chop it based on the box the user drags.
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.
|
|
|
|
|
http://www.techsmith.com/download/snagittrial.asp , install it and try. and try to take a screen shot using window option.
|
|
|
|
|
yogeshdew wrote: i am developing application like this.
If it already exists; why?
Are you sure it's not enumerating the processes on the system and then capturing their windows?
|
|
|
|
|
i just want to make a clone and want to know then how anybody can do it.
|
|
|
|
|
Hi All,
I have a class named "C1" which has a property name "P1", which is declared as below in class.
Class C1
{
...
Account1[] P1;// Here Account1 is another class/type
...
}
Now i have created an object of "C1" using reflection as below.
// object
Type objTempType = Type.GetType("C1");
object objTempObject = Activator.CreateInstance(objTempType);
Now i want to set value of first item in "P1" property(An array property) of objTempObject using reflection, which i can do without reflection as per below.
objTempType.P1[0].SomeFieldinAccount1Class = SomeObjectOrValue;
Could any one of you please give me some direction on how is that possible.
I checked all the possible ways do it using property/reflection related classes in C#, also searched many sites and forums to get answer but without any success...
modified on Wednesday, August 26, 2009 5:41 AM
|
|
|
|
|
Hi
Before you can set the SomeFieldinAccount1Class property/field value you need to intialize / create the element at position 0
objTempType.P1[0] = new Account1();
|
|
|
|
|
Hello nissims,
Thanks for your reply.
i have already created the first item in P1[0](before i try setvalue thing), I just didn't want to make my post a more lengthier one, so made the code hide.
modified on Wednesday, October 7, 2009 4:23 AM
|
|
|
|
|
You can use the Array class when operating on array properties with reflection.
Using only refection, what you want to achieve is done like this:
Type objTempType = Type.GetType("C1");
object objTempObject = Activator.CreateInstance(objTempType);
PropertyInfo p1Property = objTempType.GetProperty("P1");
Array p1ArrayValue = p1Property.GetValue(objTempObject, null) as Array;
Type itemType = p1ArrayValue.GetType().GetElementType();
object itemValue = p1ArrayValue.GetValue(0);
PropertyInfo someFieldProperty = itemType.GetProperty("SomeFieldinAccount1Class");
someFieldProperty.SetValue(itemValue, SomeObjectOrValue, null);
|
|
|
|
|
Thanks Bro...
your suggestion exactly matched what i needed and was more than i expected... thanks again...
modified on Wednesday, October 7, 2009 4:23 AM
|
|
|
|
|
You welcome
|
|
|
|
|
<br />
ToolStripMenuItem firstItem = new ToolStripMenuItem("level1);<br />
for (int i = 0; i<CenterTables.Length; i++)<br />
{<br />
ToolStripMenuItem subItem = new ToolStripMenuItem(CenterTables[i]);<br />
firstItem.DropDownItems.Add(subItem);<br />
}<br />
contextMenuStrip1.Items.Add(firstItem);
in the above code centertable is a string array. I am adding the element of this array as sub menu/dropdown item for level1.
Now I need the following task:
1. No need to get the level1 selected item
2. need to handle the submenu seleted event
2. Need to get the sub menu/ dropdownitems that have been selected
How can I do that...
|
|
|
|
|
1st.:
Don't add event on top level item
2nd:
Yust add event handler for each sub menu
ToolStripMenuItem subItem = new ToolStripMenuItem(CenterTables[i]);
subItem.Click += new System.EventHandler(subItem_Click);
firstItem.DropDownItems.Add(subItem);
Also there is no Select Event, but Click.
3rd: You can get item in Event Handelr
This code is in event handler and gets ToolStripMenuItem from Object that is passet into event handler. So every SubItem with a can use same event handler and can be distinguished betwen them
ToolStripMenuItem mnu = sender as ToolStripMenuItem;
|
|
|
|
|
It's great!!!!
Thanks a lotz
|
|
|
|