|
I am trying to add propertyitem dynamically to property grid.
For example If I want to add a property Item Like a text box which takes "String name" as variable how to add dynamically to property Grid?
I can do the following to add the "name" text box at static design time:
public class PropertyGridProcessDesigner
{
[Editor(typeof(PropertyGridProcessDesigner), typeof(System.Drawing.Design.UITypeEditor))]
public string Name
{
get { return name; }
set { name= value; }
}
}
But how to achieve the same above thing at run time ?
Do we need to create dynamic classes to add Property Item ?
If so, can anyone please share any information you have ?
Thanks,
rajan
|
|
|
|
|
Hi,
I have created datagrid. When I look at its view sourse it creates table with default style as style="border-collapse:collapse".
This style will affect my default style. Could anyone help me how to remove this default style in datagrid. I have used datagrid.controlstyle.reset(), but no luck.
Regards
Rams.
Be simple and Be sample.
|
|
|
|
|
hi
create a css file and set this:
.TableStyle {border-collapse:separate !important;}
or in your head tag insert:
<style>
.TableStyle {border-collapse:separate !important;}
</style>
then in your datagrid set: cssClass="TableStyle"
have a nice time
Alireza
www.toranjnet.com
|
|
|
|
|
hi
create a css file and set this:
.TableStyle {border-collapse:separate !important;}
or in your head tag insert:
<style>
.TableStyle {border-collapse:separate !important;}
</style>
then in your datagrid set: cssClass="TableStyle"
have a nice time
Alireza
www.toranjnet.com
|
|
|
|
|
Hi there,
I'm not quite sure if this is the right spot for this - if not please excuse me...
I've just finished my first Version of a MouseGesture-Recognition program in C#.
I first got the idea when playing with a WiiRemote connected to the PC.
However, this is a version for Mice (but can also yet be used with the WiiRemote in connection with GlovePie) but as it is only a matter of getting a list of Points its easy to implement it for the WiiMote.
So, the gesture recognition itself is done rather easy, no neuronal networks are used or s.th. like that, but nethertheless I think it works very good.
First the Points are beeing flattened and reduced to 17 by searching for the lowest distance between two following Points and then replacing those 2 with one in the middle.
Second step is to calculate the angles between following Points.
So we have 16 angles between 17 Points.
After that we compare these angles to the ones in a example list and get the difference to these angles.
-> The one with the lowest difference is the recogniced.
I'm sure you got the idea, if not - have a look at the source code
So heres the Code + a Build
http://rapidshare.de/files/39269348/Gestures.zip.html
Thanks to Konstantin Boukreev with his GestureApp in c++, from which I did not only got some ideas but also the example datas.
Please post some response to my work and advices how to enhance it.
Greetings from Germany
Sascha Negele
|
|
|
|
|
However, it seems like a good topic for an article.
Need a C# Consultant? I'm available.
Happiness in intelligent people is the rarest thing I know. -- Ernest Hemingway
|
|
|
|
|
Article, please!
Cheers,
Vikram.
The hands that help are holier than the lips that pray.
|
|
|
|
|
I'm not really sure if I am yet able to write an article...
First thing is that the code has some mistakes and unnecessarities (for example some data-types should be changed)...
The other thing is, as you might have already realized my english is not what you can call printable and so I would need someone to help me out with correcting the texts ... Volunteers first
But nethertheless I will think of writing an article...
I think there should be some additions to only the program itself - Anyone got any ideas?
I thought of maybe a utility to create the data for recognition, like you draw what you want, it flattens what you have drawn and creates the angles we need to compare...
So, please post suggestions to the article, the code itself and so on here, or directly via eMail...
Greetz
Sascha Negele
|
|
|
|
|
Dude, your English is good enough. But I wouldn't mind co-author credits
Use the 'Email' link if you are interested.
Cheers,
Vikram.
The hands that help are holier than the lips that pray.
|
|
|
|
|
thank you very much i saw that but may couldnt get that any way thanks once again.
|
|
|
|
|
Hi there, how can I call any one of the winAPI functions,
in a C# code,
and does it make a difference if the code is a service not an application
Thanks in advance
There is always something to learn
|
|
|
|
|
|
|
Thanks all
There is always something to learn
|
|
|
|
|
You are welcome
Giorgi Dalakishvili
#region signature
my articles
#endregion
|
|
|
|
|
Likewise
|
|
|
|
|
Can anyone please tell me in C# how to find a particular file is loaded by which processes? For example I want to check if "C:\test.doc" is loaded by which processes.
Thanks,
Mushq
|
|
|
|
|
|
Why? What do you want to do with it?
|
|
|
|
|
Thanks for reply.
PIEBALDconsult wrote: What do you want to do with it?
Actually some of my requirement wants to kill those processes.
Regards,
Mushq
|
|
|
|
|
Please anybody give me the LAN TicTacToe game in C# Win32
|
|
|
|
|
|
Hi Guys. I need some Advice/Help please.
I have two portions to my application that I am working on at the moment and they both working fine but I want to combine the two or to have the one matching data from the other one.
First, I have this Button event that would take data from a txtbox that would match data and return a MessageBox with a String. See below.
private void btnValidate_Click(object sender, EventArgs e)
{
int pcode = 0;
if (int.TryParse(txtboxPcode.Text, out pcode) == false)
{
MessageBox.Show("Invalid Integer!");
return;
}
if((pcode >= 4731) && (pcode <=6499))
{
MessageBox.Show("Eastern Cape");
return;
}
if ((pcode >= 9300) && (pcode <= 9999))
{
MessageBox.Show("Free State");
return;
}
}
The other section in my app I am using FileHelpers to import a CSV file into a MultiLine txtbox. This works fine. I want to use one of the files in the filehelpers import to match to the above code and return the matched value in the MessageBox. Below the FileHelpers Code. In the below code I want to use the imp.CallComments and match that to the pcode above and return the value currently returned in the Messagebox.
private void btnOpenFile_Click(object sender, EventArgs e)
{
if (openFileDialog1.ShowDialog() != DialogResult.OK)
{
this.Close();
}
else
{
txtboxSelectFile.Text = openFileDialog1.FileName;
}
string filePath;
filePath = txtboxSelectFile.Text;
FileHelperEngine<CsvImp> engine = new FileHelperEngine<CsvImp>();
engine.ErrorManager.ErrorMode = ErrorMode.SaveAndContinue;
CsvImp[] res = engine.ReadFile(filePath);
if (engine.ErrorManager.ErrorCount > 0)
engine.ErrorManager.SaveErrors("Errors.txt");
foreach (CsvImp imp in res)
{
txtboxDisplay.Text += imp.CompanyCode + "\t" + imp.Caller + "\t" +
imp.Reference + "\t" + imp.Agent + "\t" + imp.CallComments + Environment.NewLine;
}
}
Can somebody please advise me what the best way of doing this would be please? Any advice is greatly appreciated.
Thanking you in advance.
Excellence is doing ordinary things extraordinarily well.
|
|
|
|
|
I'd refactor the transformation code out of the button click handler into a separate routine that returns an appropriate string for the given input like:
private string TransformMyString(string inputStr)
{
string retval = "";
int pcode = 0;
if (!int.TryParse(inputStr, out pcode))
{
retval = "Invalid Integer!";
}
else if ((pcode >= 4731) && (pcode <= 6499))
{
retval = "whatever";
}
return retval;
}
Then you can MessageBox.Show the return from the function of put it in a text box or do whatever else you need to do.
|
|
|
|
|
Well my problem is the next buddies
I have a GridView, well Actually a RagGrid From telerik control
I get the data executing a StoreProcedure and storing in a Datatable
the I just use the next code
<br />
DataTable dtListValues = null;
dtListValues = LoValues.oListValues(Values.PKValue);
this.rgValues.DataSource = dtListValues;
this.rgValues.DataBind();
and then the page ends with this
NameColumns PKValue NameValue isActive
but!! I don't want to use this names!!
And to "fix" this I try to use this
<br />
dtListValues.Columns[0].Caption = "Code";<br />
dtListValues.Columns[1].Caption = "Name";<br />
dtListValues.Columns[2].Caption = "Active";<br />
I already used this code after and before executing the DataBind
But!!!! It doesn't work!!! =(
Could someone Tell Me where I'm wrong ?
I hope you can help me please
thanks in advanced
Greetings!!!
|
|
|
|