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
D

Dominic Farr

@Dominic Farr
About
Posts
23
Topics
12
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • cancel event
    D Dominic Farr

    The problem stems from button1 having it's DialogResult property set. When button1 click event is fired, it executes button1_Click, displays the are you sure dialog and regardless of the result of the are you sure dialog will close the window form because it has a DialogResult set. I was wondering if I could cancel this close window event depending on the result of the are you sure dialog. I can simply not set the DialogResult property of button1, and set the DialogResult in the button1_Click event depending on the result of the are you sure dialog. Regards.

    C#

  • cancel event
    D Dominic Farr

    I have a windows form with a button that I have set the DialogResult property. The button also has a click event. When the click event fires, my event methods displays an MessageBox with Yes or No buttons. (an 'are you sure' type message) If the user clicks the No button I want to cancel closing of the window form event. How I can I achieve this. Thanks

    C#

  • Permission Issues
    D Dominic Farr

    I have an MS Access database as part of my asp.net project. When I install my application int IIS the database is include, but I have grant the ASPNET user access to the directory and database.mdb file before my web application can query my database. Why do I have to grant access manually, I don't have to grant access to any other file. Is there a way I can automatically grant access during installation.

    ASP.NET asp-net database csharp windows-admin

  • Debug WebSetup Project
    D Dominic Farr

    I have a WebSetup for my C# web project. I also have a class that extends System.Configuration.Install.Installer, a custom application that is called when I install my web project. Is there anyway I can use the debugger on my custom action class? I'd like to step through my code while installing.

    Visual Studio debugging csharp question workspace

  • Repeater DateItem
    D Dominic Farr

    I have a Repeater with many rows. However, when I foreach through the items the DataItem is null. Why can I not get the DataItem from my Repeater? Or maybe a better question would be, how do I get the DataItems from my repeater? thank you -- modified at 13:11 Thursday 12th January, 2006

    ASP.NET question

  • Currency Symbol
    D Dominic Farr

    thank you

    C# question

  • Currency Symbol
    D Dominic Farr

    How can I get the currency symbol from just the ISO 4217 standard 3-letter code. CAD = $ USD = $ GBP = £ YEN = ¥ I tried creating a RegionInfo by stripping out the first two characters of the 3-letter code but is doesn't work for all cases. Any ideas?

    C# question

  • Currency Symbol
    D Dominic Farr

    How can I get the currency symbol from just the ISO 4217 standard 3-letter code. CAD = $ USD = $ GBP = £ YEN = ¥ I tried creating a RegionInfo by stripping out the first two characters of the 3-letter code but is doesn't work for all cases. Any ideas?

    C# question

  • Web Setup Project
    D Dominic Farr

    I've created a simple web setup project in VS 2003. When I install my web project is puts all the aspx pages in the wwwroot area and creates a bin directory with the dll. However, when I uninstall my web project it does not remove the any of the files. Why not? Surely if I uninstall if should remove all trace!

    ASP.NET visual-studio debugging question workspace

  • Access Databases in ASP.Net
    D Dominic Farr

    I'm using an access database in my web project. I have two questions that I'm unsure about. After installing my web project on the host machine.....

    It seems that I have to add read/write security permissions for the folder and
    access mdb file for the ASPNET user. Is that the correct thing to do, or is
    there another way around it. Without it I cannot update tables via my web project.

    Can the access database handle concurrent users/browsers reading and writing or
    do I need to serialize the connections?

    -- modified at 16:15 Thursday 15th September, 2005

    ASP.NET asp-net csharp database security question

  • ListView GridLines Don't line up
    D Dominic Farr

    When you set GridLines = true in the ViewList the grid lines don't match up with the column. How do I fix this? Thank you

    C# question css regex help

  • Keeping selected row after sort
    D Dominic Farr

    I've learnt some great things here, thanks. I'm interested in why the DataView.Enumerator returns the results in the correct sorted order where as the DataView.Table.Rows list is always in the unsorted order. Best regards

    ASP.NET question database

  • Question concerning Sorting DataGrids
    D Dominic Farr

    Two part to this. Part1 (Save Row ID) Each time a user selects a row in your DataGrid you need to save the row's unique idenifier. Part2 (Re select Row based on ID) After sorting, locate the new location of your selected row using the saved unique row identifier. Example Part 1

    // set selected row's id in view state
    IEnumerator enu = ((DataView)DataGrid1.DataSource).GetEnumerator();
    int index = 0;
    while( index <= DataGrid1.SelectedIndex )
    {
    enu.MoveNext();
    index++;
    }

    DataRowView rowView = enu.Current as DataRowView;
    DataRow row = rowView.Row;
    ViewState["item"] = (int)row["ID"];

    Example Part 2

    DataView sortView = dataSet1.MyTable.DefaultView;

    // numberDiv is a static int
    if( ( numberDiv % 2 ) == 0 )
    {
    sortView.Sort = e.SortExpression + " ASC";
    }
    else
    {
    sortView.Sort = e.SortExpression + " DESC";
    }
    numberDiv++;

    // set new sort into ViewState
    ViewState["sort"] = sortView.Sort;

    // set sorted dataview
    DataGrid1.DataSource = sortView;

    // bind data
    DataGrid1.DataBind();

    // here reselected your row
    // check that you have an item selected
    if( ViewState["item"] != null )
    {
    int id = (int)ViewState["item"];
    int index = -1;
    IEnumerator enu = sortView.GetEnumerator();
    while(enu.MoveNext())
    {
    index++;
    DataRowView rowView = enu.Current as DataRowView;
    DataRow row = rowView.Row;
    int rowID = (int)row["ID"];
    if(rowID == id)
    {
    break;
    }
    }
    DataGrid1.SelectedIndex = index;
    }

    Hope this helps. My thanks to minhpc_bk

    Database question database winforms algorithms help

  • Keeping selected row after sort
    D Dominic Farr

    ..thank you for your thoughts. I can't use DataView.Find as the sort key doesn't return a unique values. The table has a unique identifier. ID. This ID is a column in the DataGrid at present but won't be in the finished version. I'm use showing it to help debug. The user selects a row, triggers an event, I saved the ID of the selected row and highlight it in the DataGrid Then the user clicks a column to sort the DataGrid and the follow code is performed. DataView dv = dataSet.MyTable.DefaultView; dv.Sort = "column"; DataGrid1.DataSource = dv; DataGrid1.Bind(); How can I then loop through and find (using the ID) which row in the DataGrid or DataView contains the row of the selected item. Which I will use to set DataGrid1.SelectedIndex. It isn't clear to me that this is possible.

    ASP.NET question database

  • Question concerning Sorting DataGrids
    D Dominic Farr

    I'm trying to do the same thing. If you find out a way do it let me know, Thank you

    Database question database winforms algorithms help

  • Keeping selected row after sort
    D Dominic Farr

    DataGrid, DataView, Sort - All great things. What I'm having trouble doing is keep my selected row selected after I column sort. The selectedIndex is no longer valid because of the sort. So how do I find the current row index of the previously selected item. ?

    ASP.NET question database

  • ASP .Net - C# - Datagrid : selecting a row by clicking it (no button)
    D Dominic Farr

    Excellent. Thanks

    ASP.NET csharp help question

  • ASP .Net - C# - Datagrid : selecting a row by clicking it (no button)
    D Dominic Farr

    Could you shed some light on the __doPostBack paramter "DataGrid1$_ctl2$_ctl0" DataGrid1 (the control) _ctl2 (? the row of the table) Why do you take the index and + 2 _ctl0 (? got me) Thank you

    ASP.NET csharp help question

  • Like foreach but from end to begining ?
    D Dominic Farr

    char[] chars = "this is a very long string, not!".ToCharArray(); Array.Reverse(chars); foreach(char c in chars) { // do what you want }

    C# tutorial question

  • Label Click Event Location
    D Dominic Farr

    Hello all. Take a Label with Image or ImageList and add Click Event. Then.... ...Determine if click event occurred within the bounds of the image or within the bounds of the label text. Any Ideas? (I know I could just make two controls, an image and a label and put them next to each other....but humour me a little please:))

    C# 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