edit/update in Datagrid

  • Thread starter Ignacio Martinez
  • Start date
I

Ignacio Martinez

Hey group!
I created a Datagrid with Edit/update commands, and it works great, but I
need to change the size of the textbox's that are shwon on my non-readonly
columns.
Is this possible? and Is it possible to get a binded dropdownlist instead of
a textbox on edit mode?

thanx in advance!
Ignacio
 
V

vMike

Try something like this (snip). you will have to play with it a bit as one
box seems to effect the size of the other.

Public Sub Display2_ItemDataBound(sender As Object, e As
DataGridItemEventArgs)

if display2.EditItemIndex > -1 then
if display2.EditItemIndex = e.item.itemindex then
ctype(e.Item.Cells(3).controls(0),textbox).Width = Unit.Pixel(35)
ctype(e.Item.Cells(6).controls(0),textbox).Width = Unit.Pixel(45)
ctype(e.Item.Cells(7).controls(0),textbox).Width = Unit.Pixel(35)
.....
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,057
Latest member
KetoBeezACVGummies

Latest Threads

Top