--- Disregard.. I found that the code pasted here does work, but I was setting the event in the page_init
which for some reason doesn't work. Setting it on the aspx side:
works..
Anyone know why defining the event in the code behind wouldn't work?
---
Hi,
Is there any way to change the widths of the textboxes that are created when you allow the grid to auto generate the edit template, without having to build a custom template?
Currently they all come out the same size, and half are too long and the other half are too short...
I tried code from a post with the same question, but it doesn't seem to do anything...
Thanks,
Matt
RadGrid2.ItemCreated += new GridItemEventHandler(RadGrid2_ItemCreated);OnItemCreated="RadGrid2_ItemCreated">Anyone know why defining the event in the code behind wouldn't work?
---
Hi,
Is there any way to change the widths of the textboxes that are created when you allow the grid to auto generate the edit template, without having to build a custom template?
Currently they all come out the same size, and half are too long and the other half are too short...
I tried code from a post with the same question, but it doesn't seem to do anything...
protected void RadGrid2_ItemCreated(object sender, GridItemEventArgs e) { if ((e.Item is GridEditableItem) && (e.Item.IsInEditMode)) { GridEditableItem edititem = (GridEditableItem)e.Item; TextBox txtbx = (TextBox)edititem["Donor_ID"].Controls[0]; txtbx.Width = Unit.Pixel(50); } }Thanks,
Matt