473,323 Members | 1,560 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,323 software developers and data experts.

One last attempt...

EMW
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
Nov 18 '05 #1
12 1272
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:40**********************@dreader2.news.tiscal 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

Nov 18 '05 #2


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!
Nov 18 '05 #3
EMW
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:Oq**************@TK2MSFTNGP09.phx.gbl...
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:40**********************@dreader2.news.tiscal 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


Nov 18 '05 #4
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:40**********************@dreader2.news.tiscal 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:Oq**************@TK2MSFTNGP09.phx.gbl...
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:40**********************@dreader2.news.tiscal 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
>
>



Nov 18 '05 #5
EMW
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:uH**************@TK2MSFTNGP09.phx.gbl...
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:40**********************@dreader2.news.tiscal 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:Oq**************@TK2MSFTNGP09.phx.gbl...
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:40**********************@dreader2.news.tiscal 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
>
>



Nov 18 '05 #6
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:40**********************@dreader2.news.tiscal 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:uH**************@TK2MSFTNGP09.phx.gbl...
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:40**********************@dreader2.news.tiscal 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:Oq**************@TK2MSFTNGP09.phx.gbl...
>> 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:40**********************@dreader2.news.tiscal 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
>> >
>> >
>>
>>
>
>



Nov 18 '05 #7
EMW
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:%2***************@TK2MSFTNGP12.phx.gbl...
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:40**********************@dreader2.news.tiscal 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:uH**************@TK2MSFTNGP09.phx.gbl...
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:40**********************@dreader2.news.tiscal 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:Oq**************@TK2MSFTNGP09.phx.gbl...
>> 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:40**********************@dreader2.news.tiscal 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
>> >
>> >
>>
>>
>
>



Nov 18 '05 #8
"EMW" <SomeOne@MicroSoftdotCom> wrote in message
news:40**********************@dreader2.news.tiscal 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
Nov 18 '05 #9
EMW
It wouldn't be that simple, would it?
If it works, I have been searching for days for a solution....

rg,
Eric

"John Saunders" <jo**************@notcoldmail.com> schreef in bericht
news:OK*************@TK2MSFTNGP12.phx.gbl...
"EMW" <SomeOne@MicroSoftdotCom> wrote in message
news:40**********************@dreader2.news.tiscal 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

Nov 18 '05 #10
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:40**********************@dreader2.news.tiscal i.nl...
It wouldn't be that simple, would it?
If it works, I have been searching for days for a solution....

rg,
Eric

"John Saunders" <jo**************@notcoldmail.com> schreef in bericht
news:OK*************@TK2MSFTNGP12.phx.gbl...
"EMW" <SomeOne@MicroSoftdotCom> wrote in message
news:40**********************@dreader2.news.tiscal 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


Nov 18 '05 #11
EMW
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:eg*************@tk2msftngp13.phx.gbl...
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:40**********************@dreader2.news.tiscal i.nl...
It wouldn't be that simple, would it?
If it works, I have been searching for days for a solution....

rg,
Eric

"John Saunders" <jo**************@notcoldmail.com> schreef in bericht
news:OK*************@TK2MSFTNGP12.phx.gbl...
"EMW" <SomeOne@MicroSoftdotCom> wrote in message
news:40**********************@dreader2.news.tiscal 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



Nov 18 '05 #12
EMW
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:eg*************@tk2msftngp13.phx.gbl...
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:40**********************@dreader2.news.tiscal i.nl...
It wouldn't be that simple, would it?
If it works, I have been searching for days for a solution....

rg,
Eric

"John Saunders" <jo**************@notcoldmail.com> schreef in bericht
news:OK*************@TK2MSFTNGP12.phx.gbl...
"EMW" <SomeOne@MicroSoftdotCom> wrote in message
news:40**********************@dreader2.news.tiscal 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



Nov 18 '05 #13

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: pyuk2005 | last post by:
The UK Python Conference for 2005 will take place at the Randolph Hotel, Oxford on 20-23 April 2005. This is the FINAL CALL for talks. The original deadline of 26th December has been extended...
1
by: Dustin D. | last post by:
If I attempt to crop a string using regular expressions and the () operator for grouping, Perl always seems to return the last match. For instance, if I have the following: my $test =...
15
by: Ridimz | last post by:
When use ifstream, how do I ignore the last line of a file if it doesn't contain any information? Thanks in advance, Ridimz
2
by: Les Juby | last post by:
Hi A clint has insisted we load a babbling brook sound clip to his home page but it needs to load last to avoid delays in loading images and other elements. Simply declaring it at page bottom...
7
by: smash2004 | last post by:
i have a select field with multiple enabled so user can select multiple options... is it possible to get option that was clicked last...i need this because i need to check if this option was...
3
by: Ricardo | last post by:
Hi all, I am trying to come up with a sql query (just one query) that returns all the columns for the last N records that were inserted into a table. I have a column in the table that has the...
20
by: Tom Warren | last post by:
Is there a formal name for the (Mc,Mac,O,Van...) part of a last name? Tom
10
by: Sean Berry | last post by:
I need to find the second to last occurence of a "." in a string. Basically I am taking a URL like http://this.is.mydomin.com/path/to/file.txt and want to extract /path/to/file.txt I...
32
by: James Curran | last post by:
I'd like to make the following proposal for a new feature for the C# language. I have no connection with the C# team at Microsoft. I'm posting it here to gather input to refine it, in an "open...
1
by: AdamOnAccess | last post by:
I'm in Access 2007. I built a feature that to saves the current list in a sub form to a separate table. It works like this: After entering a list of words in the subform, the user can choose to push...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.