Hi Experts,
For the framework components like <asp:gridview> there exists <EditItemTemplate> ... How can I get that with Telerik ?
What I try to do is to avoid "blinking " the grid when I click on Edit button ... So, I want to define a fixed width for the cells (wether they are in edit mode or normal mode).
| <asp:GridView ID="GridView1" runat="server"> |
| <Columns> |
| <asp:TemplateField> |
| <ItemTemplate> |
| <asp:TextBox Width="200px" runat="server" ID="aaa"></asp:TextBox> |
| </ItemTemplate> |
| <EditItemTemplate> |
| <asp:TextBox Width="200px" runat="server" ID="aaa"></asp:TextBox> |
| </EditItemTemplate> |
| </asp:TemplateField> |
| </Columns> |
| </asp:GridView> |
How can I do this with RadGrid ? This is indeed a simple question for you people ...
When I edit, I would like to limit the height of the cells. What I'm doing actually is :
| protected void RadGrid2_ItemDataBound(object sender, GridItemEventArgs e) |
| { |
| if (e.Item is GridDataItem && e.Item.IsInEditMode) |
| { |
| TextBox tbLastName = (e.Item as GridDataItem)["LastName"].Controls[0] as TextBox; |
| tbLastName.Height = Unit.Pixel(12); |
| //tbLastName.Width = Unit.Pixel(10); |
| tbLastName.Style["Font-size"] = "11px"; |
| tbLastName.Style["padding-top"] = "1px"; |
| TextBox tbFirstName = (e.Item as GridDataItem)["FirstName"].Controls[0] as TextBox; |
| tbFirstName.Height = Unit.Pixel(12); |
| tbFirstName.Style["Font-size"] = "11px"; |
| tbFirstName.Style["padding-top"] = "1px"; |
| TextBox tbTitle = (e.Item as GridDataItem)["Title"].Controls[0] as TextBox; |
| tbTitle.Height = Unit.Pixel(12); |
| tbTitle.Style["Font-size"] = "11px"; |
| tbTitle.Style["padding-top"] = "1px"; |
| } |
| } |
Thanks in advance,
RadTony The Newbie