Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > One last attempt...

Reply
Thread Tools

One last attempt...

 
 
EMW
Guest
Posts: n/a
 
      05-31-2004
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


 
Reply With Quote
 
 
 
 
Alvin Bruney [MVP]
Guest
Posts: n/a
 
      05-31-2004
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$(E-Mail Removed) i.nl...
> 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
>
>



 
Reply With Quote
 
 
 
 
Jim Corey
Guest
Posts: n/a
 
      06-01-2004


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!
 
Reply With Quote
 
EMW
Guest
Posts: n/a
 
      06-01-2004
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:(E-Mail Removed)...
> 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$(E-Mail Removed) i.nl...
> > 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
> >
> >

>
>



 
Reply With Quote
 
Alvin Bruney [MVP]
Guest
Posts: n/a
 
      06-01-2004
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$(E-Mail Removed) i.nl...
> 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:(E-Mail Removed)...
>> 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$(E-Mail Removed) i.nl...
>> > 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
>> >
>> >

>>
>>

>
>



 
Reply With Quote
 
EMW
Guest
Posts: n/a
 
      06-01-2004
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:(E-Mail Removed)...
> 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$(E-Mail Removed) i.nl...
> > 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:(E-Mail Removed)...
> >> 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$(E-Mail Removed) i.nl...
> >> > 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
> >> >
> >> >
> >>
> >>

> >
> >

>
>



 
Reply With Quote
 
Alvin Bruney [MVP]
Guest
Posts: n/a
 
      06-01-2004
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$(E-Mail Removed) i.nl...
>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:(E-Mail Removed)...
>> 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$(E-Mail Removed) i.nl...
>> > 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:(E-Mail Removed)...
>> >> 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$(E-Mail Removed) i.nl...
>> >> > 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
>> >> >
>> >> >
>> >>
>> >>
>> >
>> >

>>
>>

>
>



 
Reply With Quote
 
EMW
Guest
Posts: n/a
 
      06-01-2004
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:%(E-Mail Removed)...
> 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$(E-Mail Removed) i.nl...
> >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:(E-Mail Removed)...
> >> 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$(E-Mail Removed) i.nl...
> >> > 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:(E-Mail Removed)...
> >> >> 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$(E-Mail Removed) i.nl...
> >> >> > 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
> >> >> >
> >> >> >
> >> >>
> >> >>
> >> >
> >> >
> >>
> >>

> >
> >

>
>



 
Reply With Quote
 
John Saunders
Guest
Posts: n/a
 
      06-01-2004
"EMW" <SomeOne@MicroSoftdotCom> wrote in message
news:40bb7c04$0$41746$(E-Mail Removed) i.nl...
> 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


 
Reply With Quote
 
EMW
Guest
Posts: n/a
 
      06-01-2004
It wouldn't be that simple, would it?
If it works, I have been searching for days for a solution....

rg,
Eric

"John Saunders" <(E-Mail Removed)> schreef in bericht
news:(E-Mail Removed)...
> "EMW" <SomeOne@MicroSoftdotCom> wrote in message
> news:40bb7c04$0$41746$(E-Mail Removed) i.nl...
> > 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
>
>



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to replace the last (and only last) character in a string? Johny Python 8 05-03-2007 09:24 PM
how to delete last node of a Linked list if you only know the address of last node. sangram C Programming 16 12-01-2006 08:57 PM
Passed 70-272 last Friday ... now a MCDST at long last! Devo-McDuff MCDST 7 04-20-2006 09:23 PM
I think no one knows the answer of timeout in formsauth!!!!!! the one i posted last week.. .NET Follower ASP .Net Security 0 02-09-2004 09:43 AM



Advertisments