One last attempt...

Discussion in 'ASP .Net' started by EMW, May 31, 2004.

  1. EMW

    EMW Guest

    I'm really getting frustrated..

    I'm trying to create an interactive datagrid to be used in a sort of
    planning tool.

    In my company we have 25 engineers and they run a 24/7 call duty once a
    month.
    Every week 6 engineers are on call duty according to a planning.

    At the moment an excel sheet is used to create the planning and comments are
    used to give extra information like one engineer starts at 8 am and another
    will take over from 5pm to 11pm and then the former engineer is continueing
    his watch.
    This because they also have private lives ;)

    What I'm now trying to create is a page, written in ASP.NET, with a datagrid
    as the excel-like sheet.
    The first four columns are bound to some information in a XML file (names,
    etc..)
    Then 31 columns for each day in the month. Ofcourse the days that are not
    applicable in a month are made hidden.
    In those 31 columns I put an imagebutton, the columns are template columns.
    The IDs of those buttons are im01 to im31.

    By putting a OnClick="DoSomething" part in the HTML source, I can use sub
    DoSomething to figure out which button ID has been clicked on.
    Then I know the column.
    Now comes my frustrating part: how can I get the row index, because with 25
    rows of different names, in each column (01 to 31) there is a imagebutton,
    so each row has buttons named im01 to im31.

    Once I know which button exaclty was clicked on, I can do something with the
    image of the button.

    Please help me with this or I will not be able to sleep normal ever
    again....

    rg.
    Eric
    EMW, May 31, 2004
    #1
    1. Advertising

  2. If you keep one of the columns as the name of the engineer, you only need to
    reference the name of the engineer to find out where you are in the grid.
    you wouldn 't need which row you are on, on the column index representing
    the engineer's name.

    I'm not great fan of your design because different engineers are on call
    different days and it is problematic to hide columns based on row
    information for different rows. It may be better to have 6 columns
    initially, the extra column containing the engineers name and the final
    colum containing a calendar image. So for row 10, with engineer john doe,
    the user clicks the calendar button next to john doe and you go get the data
    based on row index = john doe.

    --
    Regards,
    Alvin Bruney
    [ASP.NET MVP http://mvp.support.microsoft.com/default.aspx]
    Got tidbits? Get it here... http://tinyurl.com/27cok
    "EMW" <SomeOne@MicroSoftdotCom> wrote in message
    news:40bb7c04$0$41746$...
    > I'm really getting frustrated..
    >
    > I'm trying to create an interactive datagrid to be used in a sort of
    > planning tool.
    >
    > In my company we have 25 engineers and they run a 24/7 call duty once a
    > month.
    > Every week 6 engineers are on call duty according to a planning.
    >
    > At the moment an excel sheet is used to create the planning and comments
    > are
    > used to give extra information like one engineer starts at 8 am and
    > another
    > will take over from 5pm to 11pm and then the former engineer is
    > continueing
    > his watch.
    > This because they also have private lives ;)
    >
    > What I'm now trying to create is a page, written in ASP.NET, with a
    > datagrid
    > as the excel-like sheet.
    > The first four columns are bound to some information in a XML file (names,
    > etc..)
    > Then 31 columns for each day in the month. Ofcourse the days that are not
    > applicable in a month are made hidden.
    > In those 31 columns I put an imagebutton, the columns are template
    > columns.
    > The IDs of those buttons are im01 to im31.
    >
    > By putting a OnClick="DoSomething" part in the HTML source, I can use sub
    > DoSomething to figure out which button ID has been clicked on.
    > Then I know the column.
    > Now comes my frustrating part: how can I get the row index, because with
    > 25
    > rows of different names, in each column (01 to 31) there is a imagebutton,
    > so each row has buttons named im01 to im31.
    >
    > Once I know which button exaclty was clicked on, I can do something with
    > the
    > image of the button.
    >
    > Please help me with this or I will not be able to sleep normal ever
    > again....
    >
    > rg.
    > Eric
    >
    >
    Alvin Bruney [MVP], Jun 1, 2004
    #2
    1. Advertising

  3. EMW

    Jim Corey Guest

    If you're designing from an existing spreadsheet, you might want to look
    at this:
    http://www.exceleverywhere.com/home/


    Otherwise, this is a similar way to use LinkButtons (I would think
    ImageButtons work the same way)

    Protected Sub DataGrid1_ItemCommand(ByVal source As Object, ByVal e
    As System.Web.UI.WebControls.DataGridCommandEventArgs) Handles
    DataGrid1.ItemCommand

    Dim oLinkButton As LinkButton = CType(e.CommandSource,
    LinkButton)
    Dim sID As String = oLinkButton.ID
    Select Case sID
    Case "01"
    ....


    HTH,
    Jim



    *** Sent via Developersdex http://www.developersdex.com ***
    Don't just participate in USENET...get rewarded for it!
    Jim Corey, Jun 1, 2004
    #3
  4. EMW

    EMW Guest

    Thanks for replying.

    I'm not sure what you mean about "to reference the name of the engineer to
    find out where you are in the grid" part.
    Could you please explain a little bit more, some code(vb.net) would be
    great.

    As for the second part: By showing all the engineers of which there are 6 on
    call every month, everybody can see who is on call and by switching months,
    they can see who are next in line and so on.
    This is only needed for the planning-design part, because the manager needs
    to be able to select who is on call, make the changes for the ones with a
    private life and add comments to it about this.

    rg,
    Eric


    "Alvin Bruney [MVP]" <vapor at steaming post office> schreef in bericht
    news:...
    > If you keep one of the columns as the name of the engineer, you only need

    to
    > reference the name of the engineer to find out where you are in the grid.
    > you wouldn 't need which row you are on, on the column index representing
    > the engineer's name.
    >
    > I'm not great fan of your design because different engineers are on call
    > different days and it is problematic to hide columns based on row
    > information for different rows. It may be better to have 6 columns
    > initially, the extra column containing the engineers name and the final
    > colum containing a calendar image. So for row 10, with engineer john doe,
    > the user clicks the calendar button next to john doe and you go get the

    data
    > based on row index = john doe.
    >
    > --
    > Regards,
    > Alvin Bruney
    > [ASP.NET MVP http://mvp.support.microsoft.com/default.aspx]
    > Got tidbits? Get it here... http://tinyurl.com/27cok
    > "EMW" <SomeOne@MicroSoftdotCom> wrote in message
    > news:40bb7c04$0$41746$...
    > > I'm really getting frustrated..
    > >
    > > I'm trying to create an interactive datagrid to be used in a sort of
    > > planning tool.
    > >
    > > In my company we have 25 engineers and they run a 24/7 call duty once a
    > > month.
    > > Every week 6 engineers are on call duty according to a planning.
    > >
    > > At the moment an excel sheet is used to create the planning and comments
    > > are
    > > used to give extra information like one engineer starts at 8 am and
    > > another
    > > will take over from 5pm to 11pm and then the former engineer is
    > > continueing
    > > his watch.
    > > This because they also have private lives ;)
    > >
    > > What I'm now trying to create is a page, written in ASP.NET, with a
    > > datagrid
    > > as the excel-like sheet.
    > > The first four columns are bound to some information in a XML file

    (names,
    > > etc..)
    > > Then 31 columns for each day in the month. Ofcourse the days that are

    not
    > > applicable in a month are made hidden.
    > > In those 31 columns I put an imagebutton, the columns are template
    > > columns.
    > > The IDs of those buttons are im01 to im31.
    > >
    > > By putting a OnClick="DoSomething" part in the HTML source, I can use

    sub
    > > DoSomething to figure out which button ID has been clicked on.
    > > Then I know the column.
    > > Now comes my frustrating part: how can I get the row index, because with
    > > 25
    > > rows of different names, in each column (01 to 31) there is a

    imagebutton,
    > > so each row has buttons named im01 to im31.
    > >
    > > Once I know which button exaclty was clicked on, I can do something with
    > > the
    > > image of the button.
    > >
    > > Please help me with this or I will not be able to sleep normal ever
    > > again....
    > >
    > > rg.
    > > Eric
    > >
    > >

    >
    >
    EMW, Jun 1, 2004
    #4
  5. so, if you put the engineers name in a row like so
    col0 col1 col2 1 2 3
    john x x
    Jacob x x
    Anna x x

    When you click on your button to find data, you can grab the data
    where e.item.cells[0] == "john" in your itemdatabound.
    --
    Regards,
    Alvin Bruney
    [ASP.NET MVP http://mvp.support.microsoft.com/default.aspx]
    Got tidbits? Get it here... http://tinyurl.com/27cok
    "EMW" <SomeOne@MicroSoftdotCom> wrote in message
    news:40bcadbf$0$41748$...
    > Thanks for replying.
    >
    > I'm not sure what you mean about "to reference the name of the engineer to
    > find out where you are in the grid" part.
    > Could you please explain a little bit more, some code(vb.net) would be
    > great.
    >
    > As for the second part: By showing all the engineers of which there are 6
    > on
    > call every month, everybody can see who is on call and by switching
    > months,
    > they can see who are next in line and so on.
    > This is only needed for the planning-design part, because the manager
    > needs
    > to be able to select who is on call, make the changes for the ones with a
    > private life and add comments to it about this.
    >
    > rg,
    > Eric
    >
    >
    > "Alvin Bruney [MVP]" <vapor at steaming post office> schreef in bericht
    > news:...
    >> If you keep one of the columns as the name of the engineer, you only need

    > to
    >> reference the name of the engineer to find out where you are in the grid.
    >> you wouldn 't need which row you are on, on the column index representing
    >> the engineer's name.
    >>
    >> I'm not great fan of your design because different engineers are on call
    >> different days and it is problematic to hide columns based on row
    >> information for different rows. It may be better to have 6 columns
    >> initially, the extra column containing the engineers name and the final
    >> colum containing a calendar image. So for row 10, with engineer john doe,
    >> the user clicks the calendar button next to john doe and you go get the

    > data
    >> based on row index = john doe.
    >>
    >> --
    >> Regards,
    >> Alvin Bruney
    >> [ASP.NET MVP http://mvp.support.microsoft.com/default.aspx]
    >> Got tidbits? Get it here... http://tinyurl.com/27cok
    >> "EMW" <SomeOne@MicroSoftdotCom> wrote in message
    >> news:40bb7c04$0$41746$...
    >> > I'm really getting frustrated..
    >> >
    >> > I'm trying to create an interactive datagrid to be used in a sort of
    >> > planning tool.
    >> >
    >> > In my company we have 25 engineers and they run a 24/7 call duty once a
    >> > month.
    >> > Every week 6 engineers are on call duty according to a planning.
    >> >
    >> > At the moment an excel sheet is used to create the planning and
    >> > comments
    >> > are
    >> > used to give extra information like one engineer starts at 8 am and
    >> > another
    >> > will take over from 5pm to 11pm and then the former engineer is
    >> > continueing
    >> > his watch.
    >> > This because they also have private lives ;)
    >> >
    >> > What I'm now trying to create is a page, written in ASP.NET, with a
    >> > datagrid
    >> > as the excel-like sheet.
    >> > The first four columns are bound to some information in a XML file

    > (names,
    >> > etc..)
    >> > Then 31 columns for each day in the month. Ofcourse the days that are

    > not
    >> > applicable in a month are made hidden.
    >> > In those 31 columns I put an imagebutton, the columns are template
    >> > columns.
    >> > The IDs of those buttons are im01 to im31.
    >> >
    >> > By putting a OnClick="DoSomething" part in the HTML source, I can use

    > sub
    >> > DoSomething to figure out which button ID has been clicked on.
    >> > Then I know the column.
    >> > Now comes my frustrating part: how can I get the row index, because
    >> > with
    >> > 25
    >> > rows of different names, in each column (01 to 31) there is a

    > imagebutton,
    >> > so each row has buttons named im01 to im31.
    >> >
    >> > Once I know which button exaclty was clicked on, I can do something
    >> > with
    >> > the
    >> > image of the button.
    >> >
    >> > Please help me with this or I will not be able to sleep normal ever
    >> > again....
    >> >
    >> > rg.
    >> > Eric
    >> >
    >> >

    >>
    >>

    >
    >
    Alvin Bruney [MVP], Jun 1, 2004
    #5
  6. EMW

    EMW Guest

    I get what you mean now, but it is not what I meant.
    The thing is that everytime the manager clicks on a imagebutton in a cell, I
    need to know exactly which cell it is.
    Because the imagebutten can have three states (with pictures) off, on and on
    with an exclamation mark to show that there is more information stored for
    the perticular cell.

    I am beginning to think this is not possible.

    Would this be a possiblity:

    When the manager clicks on a button on my aspx page, an windows excutable is
    transferred to his/her computer, which automaticly starts, gives the manager
    full control on how to fill in the planning (and me with programming it),
    then the excutable uploads the outcome in an xml file back to the server and
    finally the executable is stopped, deleted if possible.

    It's only at the local intranet so the transfering would not be a problem.

    rg,
    Eric



    "Alvin Bruney [MVP]" <vapor at steaming post office> schreef in bericht
    news:...
    > so, if you put the engineers name in a row like so
    > col0 col1 col2 1 2 3
    > john x x
    > Jacob x x
    > Anna x x
    >
    > When you click on your button to find data, you can grab the data
    > where e.item.cells[0] == "john" in your itemdatabound.
    > --
    > Regards,
    > Alvin Bruney
    > [ASP.NET MVP http://mvp.support.microsoft.com/default.aspx]
    > Got tidbits? Get it here... http://tinyurl.com/27cok
    > "EMW" <SomeOne@MicroSoftdotCom> wrote in message
    > news:40bcadbf$0$41748$...
    > > Thanks for replying.
    > >
    > > I'm not sure what you mean about "to reference the name of the engineer

    to
    > > find out where you are in the grid" part.
    > > Could you please explain a little bit more, some code(vb.net) would be
    > > great.
    > >
    > > As for the second part: By showing all the engineers of which there are

    6
    > > on
    > > call every month, everybody can see who is on call and by switching
    > > months,
    > > they can see who are next in line and so on.
    > > This is only needed for the planning-design part, because the manager
    > > needs
    > > to be able to select who is on call, make the changes for the ones with

    a
    > > private life and add comments to it about this.
    > >
    > > rg,
    > > Eric
    > >
    > >
    > > "Alvin Bruney [MVP]" <vapor at steaming post office> schreef in bericht
    > > news:...
    > >> If you keep one of the columns as the name of the engineer, you only

    need
    > > to
    > >> reference the name of the engineer to find out where you are in the

    grid.
    > >> you wouldn 't need which row you are on, on the column index

    representing
    > >> the engineer's name.
    > >>
    > >> I'm not great fan of your design because different engineers are on

    call
    > >> different days and it is problematic to hide columns based on row
    > >> information for different rows. It may be better to have 6 columns
    > >> initially, the extra column containing the engineers name and the final
    > >> colum containing a calendar image. So for row 10, with engineer john

    doe,
    > >> the user clicks the calendar button next to john doe and you go get the

    > > data
    > >> based on row index = john doe.
    > >>
    > >> --
    > >> Regards,
    > >> Alvin Bruney
    > >> [ASP.NET MVP http://mvp.support.microsoft.com/default.aspx]
    > >> Got tidbits? Get it here... http://tinyurl.com/27cok
    > >> "EMW" <SomeOne@MicroSoftdotCom> wrote in message
    > >> news:40bb7c04$0$41746$...
    > >> > I'm really getting frustrated..
    > >> >
    > >> > I'm trying to create an interactive datagrid to be used in a sort of
    > >> > planning tool.
    > >> >
    > >> > In my company we have 25 engineers and they run a 24/7 call duty once

    a
    > >> > month.
    > >> > Every week 6 engineers are on call duty according to a planning.
    > >> >
    > >> > At the moment an excel sheet is used to create the planning and
    > >> > comments
    > >> > are
    > >> > used to give extra information like one engineer starts at 8 am and
    > >> > another
    > >> > will take over from 5pm to 11pm and then the former engineer is
    > >> > continueing
    > >> > his watch.
    > >> > This because they also have private lives ;)
    > >> >
    > >> > What I'm now trying to create is a page, written in ASP.NET, with a
    > >> > datagrid
    > >> > as the excel-like sheet.
    > >> > The first four columns are bound to some information in a XML file

    > > (names,
    > >> > etc..)
    > >> > Then 31 columns for each day in the month. Ofcourse the days that are

    > > not
    > >> > applicable in a month are made hidden.
    > >> > In those 31 columns I put an imagebutton, the columns are template
    > >> > columns.
    > >> > The IDs of those buttons are im01 to im31.
    > >> >
    > >> > By putting a OnClick="DoSomething" part in the HTML source, I can use

    > > sub
    > >> > DoSomething to figure out which button ID has been clicked on.
    > >> > Then I know the column.
    > >> > Now comes my frustrating part: how can I get the row index, because
    > >> > with
    > >> > 25
    > >> > rows of different names, in each column (01 to 31) there is a

    > > imagebutton,
    > >> > so each row has buttons named im01 to im31.
    > >> >
    > >> > Once I know which button exaclty was clicked on, I can do something
    > >> > with
    > >> > the
    > >> > image of the button.
    > >> >
    > >> > Please help me with this or I will not be able to sleep normal ever
    > >> > again....
    > >> >
    > >> > rg.
    > >> > Eric
    > >> >
    > >> >
    > >>
    > >>

    > >
    > >

    >
    >
    EMW, Jun 1, 2004
    #6
  7. No, it's possible. How are you adding the images?

    If you add the images at runtime, then you can set the image id to a unique
    identifier. Your click event would cast the sender argument to an
    imagecontrol and extract the unique identifier out from it and you would
    know where you are.

    image i = (image)sender
    string s = i.ID

    It just depends on how you are adding the buttons.
    --
    Regards,
    Alvin Bruney
    [ASP.NET MVP http://mvp.support.microsoft.com/default.aspx]
    Got tidbits? Get it here... http://tinyurl.com/27cok
    "EMW" <SomeOne@MicroSoftdotCom> wrote in message
    news:40bccc67$0$41754$...
    >I get what you mean now, but it is not what I meant.
    > The thing is that everytime the manager clicks on a imagebutton in a cell,
    > I
    > need to know exactly which cell it is.
    > Because the imagebutten can have three states (with pictures) off, on and
    > on
    > with an exclamation mark to show that there is more information stored for
    > the perticular cell.
    >
    > I am beginning to think this is not possible.
    >
    > Would this be a possiblity:
    >
    > When the manager clicks on a button on my aspx page, an windows excutable
    > is
    > transferred to his/her computer, which automaticly starts, gives the
    > manager
    > full control on how to fill in the planning (and me with programming it),
    > then the excutable uploads the outcome in an xml file back to the server
    > and
    > finally the executable is stopped, deleted if possible.
    >
    > It's only at the local intranet so the transfering would not be a problem.
    >
    > rg,
    > Eric
    >
    >
    >
    > "Alvin Bruney [MVP]" <vapor at steaming post office> schreef in bericht
    > news:...
    >> so, if you put the engineers name in a row like so
    >> col0 col1 col2 1 2 3
    >> john x x
    >> Jacob x x
    >> Anna x x
    >>
    >> When you click on your button to find data, you can grab the data
    >> where e.item.cells[0] == "john" in your itemdatabound.
    >> --
    >> Regards,
    >> Alvin Bruney
    >> [ASP.NET MVP http://mvp.support.microsoft.com/default.aspx]
    >> Got tidbits? Get it here... http://tinyurl.com/27cok
    >> "EMW" <SomeOne@MicroSoftdotCom> wrote in message
    >> news:40bcadbf$0$41748$...
    >> > Thanks for replying.
    >> >
    >> > I'm not sure what you mean about "to reference the name of the engineer

    > to
    >> > find out where you are in the grid" part.
    >> > Could you please explain a little bit more, some code(vb.net) would be
    >> > great.
    >> >
    >> > As for the second part: By showing all the engineers of which there are

    > 6
    >> > on
    >> > call every month, everybody can see who is on call and by switching
    >> > months,
    >> > they can see who are next in line and so on.
    >> > This is only needed for the planning-design part, because the manager
    >> > needs
    >> > to be able to select who is on call, make the changes for the ones with

    > a
    >> > private life and add comments to it about this.
    >> >
    >> > rg,
    >> > Eric
    >> >
    >> >
    >> > "Alvin Bruney [MVP]" <vapor at steaming post office> schreef in bericht
    >> > news:...
    >> >> If you keep one of the columns as the name of the engineer, you only

    > need
    >> > to
    >> >> reference the name of the engineer to find out where you are in the

    > grid.
    >> >> you wouldn 't need which row you are on, on the column index

    > representing
    >> >> the engineer's name.
    >> >>
    >> >> I'm not great fan of your design because different engineers are on

    > call
    >> >> different days and it is problematic to hide columns based on row
    >> >> information for different rows. It may be better to have 6 columns
    >> >> initially, the extra column containing the engineers name and the
    >> >> final
    >> >> colum containing a calendar image. So for row 10, with engineer john

    > doe,
    >> >> the user clicks the calendar button next to john doe and you go get
    >> >> the
    >> > data
    >> >> based on row index = john doe.
    >> >>
    >> >> --
    >> >> Regards,
    >> >> Alvin Bruney
    >> >> [ASP.NET MVP http://mvp.support.microsoft.com/default.aspx]
    >> >> Got tidbits? Get it here... http://tinyurl.com/27cok
    >> >> "EMW" <SomeOne@MicroSoftdotCom> wrote in message
    >> >> news:40bb7c04$0$41746$...
    >> >> > I'm really getting frustrated..
    >> >> >
    >> >> > I'm trying to create an interactive datagrid to be used in a sort of
    >> >> > planning tool.
    >> >> >
    >> >> > In my company we have 25 engineers and they run a 24/7 call duty
    >> >> > once

    > a
    >> >> > month.
    >> >> > Every week 6 engineers are on call duty according to a planning.
    >> >> >
    >> >> > At the moment an excel sheet is used to create the planning and
    >> >> > comments
    >> >> > are
    >> >> > used to give extra information like one engineer starts at 8 am and
    >> >> > another
    >> >> > will take over from 5pm to 11pm and then the former engineer is
    >> >> > continueing
    >> >> > his watch.
    >> >> > This because they also have private lives ;)
    >> >> >
    >> >> > What I'm now trying to create is a page, written in ASP.NET, with a
    >> >> > datagrid
    >> >> > as the excel-like sheet.
    >> >> > The first four columns are bound to some information in a XML file
    >> > (names,
    >> >> > etc..)
    >> >> > Then 31 columns for each day in the month. Ofcourse the days that
    >> >> > are
    >> > not
    >> >> > applicable in a month are made hidden.
    >> >> > In those 31 columns I put an imagebutton, the columns are template
    >> >> > columns.
    >> >> > The IDs of those buttons are im01 to im31.
    >> >> >
    >> >> > By putting a OnClick="DoSomething" part in the HTML source, I can
    >> >> > use
    >> > sub
    >> >> > DoSomething to figure out which button ID has been clicked on.
    >> >> > Then I know the column.
    >> >> > Now comes my frustrating part: how can I get the row index, because
    >> >> > with
    >> >> > 25
    >> >> > rows of different names, in each column (01 to 31) there is a
    >> > imagebutton,
    >> >> > so each row has buttons named im01 to im31.
    >> >> >
    >> >> > Once I know which button exaclty was clicked on, I can do something
    >> >> > with
    >> >> > the
    >> >> > image of the button.
    >> >> >
    >> >> > Please help me with this or I will not be able to sleep normal ever
    >> >> > again....
    >> >> >
    >> >> > rg.
    >> >> > Eric
    >> >> >
    >> >> >
    >> >>
    >> >>
    >> >
    >> >

    >>
    >>

    >
    >
    Alvin Bruney [MVP], Jun 1, 2004
    #7
  8. EMW

    EMW Guest

    I added the imagebuttons in the ItemCommand part of the TemplateColumn at
    design time, but I guess it would be better do add them at runtime?

    rg,
    Eric


    "Alvin Bruney [MVP]" <vapor at steaming post office> schreef in bericht
    news:%...
    > No, it's possible. How are you adding the images?
    >
    > If you add the images at runtime, then you can set the image id to a

    unique
    > identifier. Your click event would cast the sender argument to an
    > imagecontrol and extract the unique identifier out from it and you would
    > know where you are.
    >
    > image i = (image)sender
    > string s = i.ID
    >
    > It just depends on how you are adding the buttons.
    > --
    > Regards,
    > Alvin Bruney
    > [ASP.NET MVP http://mvp.support.microsoft.com/default.aspx]
    > Got tidbits? Get it here... http://tinyurl.com/27cok
    > "EMW" <SomeOne@MicroSoftdotCom> wrote in message
    > news:40bccc67$0$41754$...
    > >I get what you mean now, but it is not what I meant.
    > > The thing is that everytime the manager clicks on a imagebutton in a

    cell,
    > > I
    > > need to know exactly which cell it is.
    > > Because the imagebutten can have three states (with pictures) off, on

    and
    > > on
    > > with an exclamation mark to show that there is more information stored

    for
    > > the perticular cell.
    > >
    > > I am beginning to think this is not possible.
    > >
    > > Would this be a possiblity:
    > >
    > > When the manager clicks on a button on my aspx page, an windows

    excutable
    > > is
    > > transferred to his/her computer, which automaticly starts, gives the
    > > manager
    > > full control on how to fill in the planning (and me with programming

    it),
    > > then the excutable uploads the outcome in an xml file back to the server
    > > and
    > > finally the executable is stopped, deleted if possible.
    > >
    > > It's only at the local intranet so the transfering would not be a

    problem.
    > >
    > > rg,
    > > Eric
    > >
    > >
    > >
    > > "Alvin Bruney [MVP]" <vapor at steaming post office> schreef in bericht
    > > news:...
    > >> so, if you put the engineers name in a row like so
    > >> col0 col1 col2 1 2 3
    > >> john x x
    > >> Jacob x x
    > >> Anna x x
    > >>
    > >> When you click on your button to find data, you can grab the data
    > >> where e.item.cells[0] == "john" in your itemdatabound.
    > >> --
    > >> Regards,
    > >> Alvin Bruney
    > >> [ASP.NET MVP http://mvp.support.microsoft.com/default.aspx]
    > >> Got tidbits? Get it here... http://tinyurl.com/27cok
    > >> "EMW" <SomeOne@MicroSoftdotCom> wrote in message
    > >> news:40bcadbf$0$41748$...
    > >> > Thanks for replying.
    > >> >
    > >> > I'm not sure what you mean about "to reference the name of the

    engineer
    > > to
    > >> > find out where you are in the grid" part.
    > >> > Could you please explain a little bit more, some code(vb.net) would

    be
    > >> > great.
    > >> >
    > >> > As for the second part: By showing all the engineers of which there

    are
    > > 6
    > >> > on
    > >> > call every month, everybody can see who is on call and by switching
    > >> > months,
    > >> > they can see who are next in line and so on.
    > >> > This is only needed for the planning-design part, because the manager
    > >> > needs
    > >> > to be able to select who is on call, make the changes for the ones

    with
    > > a
    > >> > private life and add comments to it about this.
    > >> >
    > >> > rg,
    > >> > Eric
    > >> >
    > >> >
    > >> > "Alvin Bruney [MVP]" <vapor at steaming post office> schreef in

    bericht
    > >> > news:...
    > >> >> If you keep one of the columns as the name of the engineer, you only

    > > need
    > >> > to
    > >> >> reference the name of the engineer to find out where you are in the

    > > grid.
    > >> >> you wouldn 't need which row you are on, on the column index

    > > representing
    > >> >> the engineer's name.
    > >> >>
    > >> >> I'm not great fan of your design because different engineers are on

    > > call
    > >> >> different days and it is problematic to hide columns based on row
    > >> >> information for different rows. It may be better to have 6 columns
    > >> >> initially, the extra column containing the engineers name and the
    > >> >> final
    > >> >> colum containing a calendar image. So for row 10, with engineer john

    > > doe,
    > >> >> the user clicks the calendar button next to john doe and you go get
    > >> >> the
    > >> > data
    > >> >> based on row index = john doe.
    > >> >>
    > >> >> --
    > >> >> Regards,
    > >> >> Alvin Bruney
    > >> >> [ASP.NET MVP http://mvp.support.microsoft.com/default.aspx]
    > >> >> Got tidbits? Get it here... http://tinyurl.com/27cok
    > >> >> "EMW" <SomeOne@MicroSoftdotCom> wrote in message
    > >> >> news:40bb7c04$0$41746$...
    > >> >> > I'm really getting frustrated..
    > >> >> >
    > >> >> > I'm trying to create an interactive datagrid to be used in a sort

    of
    > >> >> > planning tool.
    > >> >> >
    > >> >> > In my company we have 25 engineers and they run a 24/7 call duty
    > >> >> > once

    > > a
    > >> >> > month.
    > >> >> > Every week 6 engineers are on call duty according to a planning.
    > >> >> >
    > >> >> > At the moment an excel sheet is used to create the planning and
    > >> >> > comments
    > >> >> > are
    > >> >> > used to give extra information like one engineer starts at 8 am

    and
    > >> >> > another
    > >> >> > will take over from 5pm to 11pm and then the former engineer is
    > >> >> > continueing
    > >> >> > his watch.
    > >> >> > This because they also have private lives ;)
    > >> >> >
    > >> >> > What I'm now trying to create is a page, written in ASP.NET, with

    a
    > >> >> > datagrid
    > >> >> > as the excel-like sheet.
    > >> >> > The first four columns are bound to some information in a XML file
    > >> > (names,
    > >> >> > etc..)
    > >> >> > Then 31 columns for each day in the month. Ofcourse the days that
    > >> >> > are
    > >> > not
    > >> >> > applicable in a month are made hidden.
    > >> >> > In those 31 columns I put an imagebutton, the columns are template


    > >> >> > columns.
    > >> >> > The IDs of those buttons are im01 to im31.
    > >> >> >
    > >> >> > By putting a OnClick="DoSomething" part in the HTML source, I can
    > >> >> > use
    > >> > sub
    > >> >> > DoSomething to figure out which button ID has been clicked on.
    > >> >> > Then I know the column.
    > >> >> > Now comes my frustrating part: how can I get the row index,

    because
    > >> >> > with
    > >> >> > 25
    > >> >> > rows of different names, in each column (01 to 31) there is a
    > >> > imagebutton,
    > >> >> > so each row has buttons named im01 to im31.
    > >> >> >
    > >> >> > Once I know which button exaclty was clicked on, I can do

    something
    > >> >> > with
    > >> >> > the
    > >> >> > image of the button.
    > >> >> >
    > >> >> > Please help me with this or I will not be able to sleep normal

    ever
    > >> >> > again....
    > >> >> >
    > >> >> > rg.
    > >> >> > Eric
    > >> >> >
    > >> >> >
    > >> >>
    > >> >>
    > >> >
    > >> >
    > >>
    > >>

    > >
    > >

    >
    >
    EMW, Jun 1, 2004
    #8
  9. "EMW" <SomeOne@MicroSoftdotCom> wrote in message
    news:40bb7c04$0$41746$...
    > I'm really getting frustrated..
    >
    > By putting a OnClick="DoSomething" part in the HTML source, I can use sub
    > DoSomething to figure out which button ID has been clicked on.
    > Then I know the column.
    > Now comes my frustrating part: how can I get the row index, because with

    25
    > rows of different names, in each column (01 to 31) there is a imagebutton,
    > so each row has buttons named im01 to im31.


    You can pass parameters to your DoSomething function:

    <tag onclick="DoSomething(1, 2)" /> <!-- Row 1, column 2 -->
    --
    John Saunders
    johnwsaundersiii at hotmail
    John Saunders, Jun 1, 2004
    #9
  10. EMW

    EMW Guest

    It wouldn't be that simple, would it?
    If it works, I have been searching for days for a solution....

    rg,
    Eric

    "John Saunders" <> schreef in bericht
    news:...
    > "EMW" <SomeOne@MicroSoftdotCom> wrote in message
    > news:40bb7c04$0$41746$...
    > > I'm really getting frustrated..
    > >
    > > By putting a OnClick="DoSomething" part in the HTML source, I can use

    sub
    > > DoSomething to figure out which button ID has been clicked on.
    > > Then I know the column.
    > > Now comes my frustrating part: how can I get the row index, because with

    > 25
    > > rows of different names, in each column (01 to 31) there is a

    imagebutton,
    > > so each row has buttons named im01 to im31.

    >
    > You can pass parameters to your DoSomething function:
    >
    > <tag onclick="DoSomething(1, 2)" /> <!-- Row 1, column 2 -->
    > --
    > John Saunders
    > johnwsaundersiii at hotmail
    >
    >
    EMW, Jun 1, 2004
    #10
  11. yes it's that simple.

    --
    Regards,
    Alvin Bruney
    [ASP.NET MVP http://mvp.support.microsoft.com/default.aspx]
    Got tidbits? Get it here... http://tinyurl.com/27cok
    "EMW" <SomeOne@MicroSoftdotCom> wrote in message
    news:40bce76e$0$41757$...
    > It wouldn't be that simple, would it?
    > If it works, I have been searching for days for a solution....
    >
    > rg,
    > Eric
    >
    > "John Saunders" <> schreef in bericht
    > news:...
    >> "EMW" <SomeOne@MicroSoftdotCom> wrote in message
    >> news:40bb7c04$0$41746$...
    >> > I'm really getting frustrated..
    >> >
    >> > By putting a OnClick="DoSomething" part in the HTML source, I can use

    > sub
    >> > DoSomething to figure out which button ID has been clicked on.
    >> > Then I know the column.
    >> > Now comes my frustrating part: how can I get the row index, because
    >> > with

    >> 25
    >> > rows of different names, in each column (01 to 31) there is a

    > imagebutton,
    >> > so each row has buttons named im01 to im31.

    >>
    >> You can pass parameters to your DoSomething function:
    >>
    >> <tag onclick="DoSomething(1, 2)" /> <!-- Row 1, column 2 -->
    >> --
    >> John Saunders
    >> johnwsaundersiii at hotmail
    >>
    >>

    >
    >
    Alvin Bruney [MVP], Jun 1, 2004
    #11
  12. EMW

    EMW Guest

    Ok, I now have for each during runtime added iamgebutton a separate ID and
    argument.

    How can I put the OnClick part in the HTML during runtime?
    If I have this I have what I wanted!! (I'm getting happy again!)

    rg,
    Eric


    "Alvin Bruney [MVP]" <vapor at steaming post office> schreef in bericht
    news:...
    > yes it's that simple.
    >
    > --
    > Regards,
    > Alvin Bruney
    > [ASP.NET MVP http://mvp.support.microsoft.com/default.aspx]
    > Got tidbits? Get it here... http://tinyurl.com/27cok
    > "EMW" <SomeOne@MicroSoftdotCom> wrote in message
    > news:40bce76e$0$41757$...
    > > It wouldn't be that simple, would it?
    > > If it works, I have been searching for days for a solution....
    > >
    > > rg,
    > > Eric
    > >
    > > "John Saunders" <> schreef in bericht
    > > news:...
    > >> "EMW" <SomeOne@MicroSoftdotCom> wrote in message
    > >> news:40bb7c04$0$41746$...
    > >> > I'm really getting frustrated..
    > >> >
    > >> > By putting a OnClick="DoSomething" part in the HTML source, I can use

    > > sub
    > >> > DoSomething to figure out which button ID has been clicked on.
    > >> > Then I know the column.
    > >> > Now comes my frustrating part: how can I get the row index, because
    > >> > with
    > >> 25
    > >> > rows of different names, in each column (01 to 31) there is a

    > > imagebutton,
    > >> > so each row has buttons named im01 to im31.
    > >>
    > >> You can pass parameters to your DoSomething function:
    > >>
    > >> <tag onclick="DoSomething(1, 2)" /> <!-- Row 1, column 2 -->
    > >> --
    > >> John Saunders
    > >> johnwsaundersiii at hotmail
    > >>
    > >>

    > >
    > >

    >
    >
    EMW, Jun 2, 2004
    #12
  13. EMW

    EMW Guest

    Ok I now have a datagrid with lots of imagebuttons added during runtime and
    each button as it's own ID and Argument.
    One last thing: How can I add the OnClick="" part in the HTML for eacht
    button?


    rg,
    Eric


    "Alvin Bruney [MVP]" <vapor at steaming post office> schreef in bericht
    news:...
    > yes it's that simple.
    >
    > --
    > Regards,
    > Alvin Bruney
    > [ASP.NET MVP http://mvp.support.microsoft.com/default.aspx]
    > Got tidbits? Get it here... http://tinyurl.com/27cok
    > "EMW" <SomeOne@MicroSoftdotCom> wrote in message
    > news:40bce76e$0$41757$...
    > > It wouldn't be that simple, would it?
    > > If it works, I have been searching for days for a solution....
    > >
    > > rg,
    > > Eric
    > >
    > > "John Saunders" <> schreef in bericht
    > > news:...
    > >> "EMW" <SomeOne@MicroSoftdotCom> wrote in message
    > >> news:40bb7c04$0$41746$...
    > >> > I'm really getting frustrated..
    > >> >
    > >> > By putting a OnClick="DoSomething" part in the HTML source, I can use

    > > sub
    > >> > DoSomething to figure out which button ID has been clicked on.
    > >> > Then I know the column.
    > >> > Now comes my frustrating part: how can I get the row index, because
    > >> > with
    > >> 25
    > >> > rows of different names, in each column (01 to 31) there is a

    > > imagebutton,
    > >> > so each row has buttons named im01 to im31.
    > >>
    > >> You can pass parameters to your DoSomething function:
    > >>
    > >> <tag onclick="DoSomething(1, 2)" /> <!-- Row 1, column 2 -->
    > >> --
    > >> John Saunders
    > >> johnwsaundersiii at hotmail
    > >>
    > >>

    > >
    > >

    >
    >
    EMW, Jun 2, 2004
    #13
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. sangram
    Replies:
    16
    Views:
    1,966
  2. Johny
    Replies:
    8
    Views:
    385
  3. .NET Follower
    Replies:
    0
    Views:
    114
    .NET Follower
    Feb 9, 2004
  4. Charles Taylor
    Replies:
    0
    Views:
    119
    Charles Taylor
    Oct 24, 2005
  5. GMI
    Replies:
    3
    Views:
    484
    Tad McClellan
    Jun 19, 2005
Loading...

Share This Page