datagrid - new record

  • Thread starter Thread starter thomas kern
  • Start date Start date
T

thomas kern

hello,

i would like to add a new record using a datagrid.
the numbers of my columns varies ( can be 4 columns or 10, differs every
time).
now i tried to put a textbox in the footer and do a autocolumn.

problem here is that i would have to add a template-column programmatically
or am i wrong?
and until now i have no idea how to add a template-column, i know how to add
normal columns
but not TC.

however, i think programmatically is a pain, arent there any other solutions
?

thanks alot
thomas
 
well, i figured some way to create a templatecolumn programmatically, as
long as no1 is posting an easier
solution i am going to use this one.

thanks
thomas
 
When you have a new record to add, if there are more columns in the new
record than the existing records, you can add the columns to the underlying
datatable. Then, add your new rows and re-bind the datagrid. I believe that
if you are using autcolumn generate this should work, but I haven't tried it
<g>.
 
Back
Top