S
Scott McNair
Hi,
I've got a dataset that I'm generating through a webservice. I would like
to instantiate one of the tables in the set as a grid. Some of the columns
in that grid should be editable via a textbox control, and I'd also like to
have a checkbox to mark rows for delete, and some button controls to add
rows, update the data, or delete rows. Example:
DEL? FirstName LastName Birthdate ID (this is hidden)
---- ---------- ----------- ----------- ---
[X] [Han ] [Solo ] [2/27/1973] 1
[ ] [Leia ] [Organa ] [4/13/1971] 2
[ ] [Luke ] [Skywalker] [4/13/1971] 3
[DELETE SELECTED] [ADD NEW ROW] [UPDATE TABLE]
My immediate solution was to create a datagrid and then create some
template columns to contain the data. My problem is that I can't figure
out how databound columns can be templates, nor how template columns can be
databound. So I can either create columns with textboxes inside their
cells, or I can create columns with data in them, but not both.
I guess in a nutshell, my question is this: how do I create an editable,
bound datagrid? I've seen some examples of creating a class that inherits
ITemplate, but all the examples I've seen were in C# and although I can
comprehend C# on a basic level, large amounts of strange code can get me
lost. Plus, I'm not sure if those routes were the route I needed to take.
Please keep in mind the following:
* Since I'm pulling the data from a webservice, there's no way (that I know
of at least) to create the datasource and bind it at runtime; instead I
have to establish the connection manually inside the codebehind.
* I must be able to actually mine the changes to the datagrid on the
server, by iterating thru the rows and then sending the new data back up to
the webservice so that it can be updated at the data source. So the
textboxes should have function as well as form.
* I need the ability to do this thru AJAX (specifically thru the MagicAJAX
control at www.magicajax.net). The whole reason I'm having to research
this path is because my prior attempt (using an Infragistics grid) worked
perfectly EXCEPT for the fact that it would not work thru AJAX. If the MS
datagrid won't work, do you have any suggestions for datagrids that would?
Also, if you know of a better alternative to MagicAJAX that would work with
Infragistics, that would be a great help as well.
Warmest Regards,
Scott
I've got a dataset that I'm generating through a webservice. I would like
to instantiate one of the tables in the set as a grid. Some of the columns
in that grid should be editable via a textbox control, and I'd also like to
have a checkbox to mark rows for delete, and some button controls to add
rows, update the data, or delete rows. Example:
DEL? FirstName LastName Birthdate ID (this is hidden)
---- ---------- ----------- ----------- ---
[X] [Han ] [Solo ] [2/27/1973] 1
[ ] [Leia ] [Organa ] [4/13/1971] 2
[ ] [Luke ] [Skywalker] [4/13/1971] 3
[DELETE SELECTED] [ADD NEW ROW] [UPDATE TABLE]
My immediate solution was to create a datagrid and then create some
template columns to contain the data. My problem is that I can't figure
out how databound columns can be templates, nor how template columns can be
databound. So I can either create columns with textboxes inside their
cells, or I can create columns with data in them, but not both.
I guess in a nutshell, my question is this: how do I create an editable,
bound datagrid? I've seen some examples of creating a class that inherits
ITemplate, but all the examples I've seen were in C# and although I can
comprehend C# on a basic level, large amounts of strange code can get me
lost. Plus, I'm not sure if those routes were the route I needed to take.
Please keep in mind the following:
* Since I'm pulling the data from a webservice, there's no way (that I know
of at least) to create the datasource and bind it at runtime; instead I
have to establish the connection manually inside the codebehind.
* I must be able to actually mine the changes to the datagrid on the
server, by iterating thru the rows and then sending the new data back up to
the webservice so that it can be updated at the data source. So the
textboxes should have function as well as form.
* I need the ability to do this thru AJAX (specifically thru the MagicAJAX
control at www.magicajax.net). The whole reason I'm having to research
this path is because my prior attempt (using an Infragistics grid) worked
perfectly EXCEPT for the fact that it would not work thru AJAX. If the MS
datagrid won't work, do you have any suggestions for datagrids that would?
Also, if you know of a better alternative to MagicAJAX that would work with
Infragistics, that would be a great help as well.
Warmest Regards,
Scott