Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
C

C Scharbe

@C Scharbe
About
Posts
42
Topics
15
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • Style of a DataGridView.Row by using DataSet
    C C Scharbe

    I forgot: It's a Windows.Forms application. So i can't do it in that way. But in Websites it's also a solution.

    .NET (Core and Framework) help question

  • Style of a DataGridView.Row by using DataSet
    C C Scharbe

    In that way i currently solved it: private void dataGridView1_RowPrePaint(object sender, DataGridViewRowPrePaintEventArgs e) { int i = 0; try { dataGridView1.Rows[e.RowIndex].DefaultCellStyle.BackColor = Color.White; if (dataGridView1.Rows[e.RowIndex].Cells[1].Value.ToString().Contains(textBox1.Text)) { dataGridView1.Rows[e.RowIndex].DefaultCellStyle.BackColor = Color.ForestGreen; } int ii = 1 / i; } catch { } } I used the RowPrePaint event. So everytime when the row will be painted there is a check if the BackColor should be changed. I tested it with 1,000,000 rows in fullscreen and the performance is (not the best but) ok. But if you have another solution, feel free to post it.

    .NET (Core and Framework) help question

  • Style of a DataGridView.Row by using DataSet
    C C Scharbe

    The following code shows you how I created a DataSet and added it to the DataGridView. To define the default column style, I added 2 columns to the DataGridView before and set their DataPropertyName. DataSet ds = new DataSet(); ds.Tables.Add(); ds.Tables[0].Columns.Add("a"); ds.Tables[0].Columns.Add("b"); colColumn1.DataPropertyName = "a"; colColumn2.DataPropertyName = "b"; for (int i = 0; i < 10; i++) { ds.Tables[0].Rows.Add("a" + i, "b" + i); } dataGridView1.DataSource = ds.Tables[0]; Now I have the problem that I can't change any style (BackColor) of the rows that will be added by setting the DataSource. Can I define it somehow in the DataSet (DataRow) OR is there any event that will be called after the row finished adding? [I don't want to go through each row after the DataSource is setted and set the new style]

    modified on Friday, June 5, 2009 3:33 AM

    .NET (Core and Framework) help question

  • ListView.SelectedIndexChanged fired too much
    C C Scharbe

    Does anyone have an idea, to solve this problem??

    C# database help question announcement

  • ListView.SelectedIndexChanged fired too much
    C C Scharbe

    So there is minimum a throw new Exception("The method or operation is not implemented."); implemented :)!!

    C# database help question announcement

  • ListView.SelectedIndexChanged fired too much
    C C Scharbe

    What is DWIM? Tell me more :) Or send me a link....

    C# database help question announcement

  • How to bind a list to a combobox
    C C Scharbe

    The combobox run ToString() for each item. If you have a class, that does not override the ToString() method, it returns the name of the class- type. I guess you don't need to run cmb_rues.DisplayMember = ... ??

    C# help tutorial

  • How to bind a list to a combobox
    C C Scharbe

    Try this: class Rue { public int Id; public string Nom; public override string ToString() { return Nom; } };

    C# help tutorial

  • ListView.SelectedIndexChanged fired too much
    C C Scharbe

    It's too complicate... ... for the user to click an extra button :) I missing something like LastSelectedIndexChanged or AfterSelectedIndexChanged.

    C# database help question announcement

  • How to bind a list to a combobox
    C C Scharbe

    I think you need to write: cmb_rues.DataSource = Rues; cmb_rues.DisplayMember = "Nom"; cmb_rues.ValueMember = "Id";

    C# help tutorial

  • ListView.SelectedIndexChanged fired too much
    C C Scharbe

    I am using the ListView.SelectedIndexChanged to update data, when a new item has been selected. My problem is, that the event will be fired for each new selected (de-selected) item (if multiSelect is true; more than twice). [And i don't want to get the data from the database each time.] Is there an event that will be raised if the control has finished handling these processes (or processes for this control at all)? Or does anyone have another idea to solve thsi problem

    C# database help question announcement

  • Items in ListView changed [modified]
    C C Scharbe

    I also tried to inherit an own class from ListViewItemCollection and raise a Changed event if any item were added or removed, but i don't know how to set the inherited class to the ListView.Items collection. Therefore i inherit an own ListView2 from the ListView class and tried to set the Items: base.Items = new ListViewItemCollection2(); But base.Items is readonly...

    C# question

  • Items in ListView changed [modified]
    C C Scharbe

    Is there an event that raise if the collection of ListViewItems in the ListView has been changed?

    modified on Tuesday, February 19, 2008 11:22 AM

    C# question

  • Get Current Working Direcotry/Folder
    C C Scharbe

    You get the directory with: AppDomain.CurrentDomain.BaseDirectory Greetings

    C# question

  • ClickOnce - Change Processor
    C C Scharbe

    I hope i am in the right group. I have the following problem: I deployed an application by ClickOnce (files have been created by MageUI.exe) and selected the processor type x86 (because the application was builded in x86 mode). Now I changed the processor of the application to Any CPU and also the processor mode of the ClickOnce files to msil (by MageUI.exe) As I deployed the msil files to the same Website where the x86 files have been earlier and run the application link (in Start menu) on the client, I got an error. In the error description I read that the files aren't valid anymore. The link on the client (in Start menu) has the following data http://localhost/x86/MyApp.application#MyApp.app, Culture=neutral, PublicKeyToken=xxxxxxxxxxxxxxxx, processorArchitecture=x86 So the problem is that there is a fixed processor Architecture setted. Can I change the processor type in ClickOnce without removing the old application in the client? Does anyone have an idea? Thank You

    .NET (Core and Framework) help architecture question

  • IDeviceContext OR How to MeasureText out of the Paint Event
    C C Scharbe

    Solution: IDeviceContext deviceContext = this.CreateGraphics(); ARTICLE AT: Friday, April 28, 2006 Calculating Size of Multi-Line WinForm Label With MeasureText http://geekswithblogs.net/paulmehner/Default.aspx

    C# graphics help tutorial question

  • IDeviceContext OR How to MeasureText out of the Paint Event
    C C Scharbe

    Hello, I'd like to Resize a control that contains any text. If I use TextRenderer.MeasureText there is always a Padding, also if I use the Flag NoPadding: Size size = TextRenderer.MeasureText("dddd", this.Font, new Size(Int32.MaxValue, Int32.MaxValue), (TextFormatFlags.NoPadding)); I found out that i need to set a IDeviceContext like that: private void MyControl_Paint(object sender, PaintEventArgs e) { Size size = TextRenderer.MeasureText(e.Graphics, "dddd", this.Font, new Size(Int32.MaxValue, Int32.MaxValue), (TextFormatFlags.NoPadding)); } My Problem is: I dont want to Resize the Control in the Paint-Event, so I guess I need to get somehow the current IDeviceContext, but how? Or do I use the TextRenderer.MeasureText method in a wrong way? Thank You for Your Answers!

    C# graphics help tutorial question

  • FileSystemWatcher vs. Own file system polling
    C C Scharbe

    Yes i already do so, but i think: 'is this mix good?', isn't it better only to poll the file system instead using the file system watcher?

    C# javascript visual-studio sysadmin help question

  • FileSystemWatcher vs. Own file system polling
    C C Scharbe

    Can any body tell me the advantages and disadvantages of both kinds to get to know if a file is in a specified directory. I have a directory in the network and a application that should work with the file took into the directory. I try to do it with a FileSystemWatcher, but the problem is, if the network connection failed, the FileSystemWatcher did'nt react if the network directory is already available. So i need to reinitialize the FileSystemWatcher in a while again. But i also heard to poll the file system isn't a good idea because it slows the cpu down. (Is it more than the FileSystemWatcher? Can anybody suggest (a good loop time for) polling?) Thank You for your suggestions...

    C# javascript visual-studio sysadmin help question

  • Form.Show() and TabControl tab page changed
    C C Scharbe

    Does anyone have another idea?

    C# help question
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups