Hi,
Iam using a RadListBox and 2 buttons Edit & Save.
On edit button click RadListBox is made visible and images and description are displyed in it.
On Save button click am saving a selected value to database.
Then again on Edit click , RadListBox is showing issues.its style is lost and full data is displyed without scroll.
and am not able to select data in the list also.
Please help
ASPX:
ASPX.CS
Iam using a RadListBox and 2 buttons Edit & Save.
On edit button click RadListBox is made visible and images and description are displyed in it.
On Save button click am saving a selected value to database.
Then again on Edit click , RadListBox is showing issues.its style is lost and full data is displyed without scroll.
and am not able to select data in the list also.
Please help
ASPX:
<telerik:RadListBox ID="RadLBPlantItemsImage" runat="server" Width="190" Height="200" DataKeyField="ImageName" DataValueField="ImageId" DataTextField="ImageDescription" OnItemDataBound="RadLBPlantItemsImage_ItemDataBound"> <ItemTemplate> <asp:Image ID="ImgFamily" runat="server" Width = "25px" Height = "25px" alt='<%# Container.Text %>' Imageurl='<%# DataBinder.Eval(Container.DataItem, "ImageName")%>' /> <%# DataBinder.Eval(Container.DataItem, "ImageDescription")%> </ItemTemplate> </telerik:RadListBox>
ASPX.CS
protected void Page_Load(object sender, EventArgs e) { if (!this.IsPostBack) { RadLBPlantItemsImage.Visible = false; BtnEdit.Visible = false; PlantItemNormal.Visible = false; this.LoadImageList(); } btnSave.Visible = false; RadLBPlantItemsImage.Visible = false; lblTagCode.Visible = true; txtTagCode.Visible = false; } protected void BtnEdit_Click(object sender, EventArgs e) { lblTagCode.Visible = false; txtTagCode.Visible = true; btnSave.Visible = true; RadLBPlantItemsImage.Visible = true; PlantItemNormal.Visible = false; this.LoadImageList(); } private void LoadImageList() { PhysicalObjFamilyTypeDto dto = new PhysicalObjFamilyTypeDto(); dto = PhysicalObjFamilyTypeManager.GetPlantItemFamilyTypeImages(dto); RadLBPlantItemsImage.DataSource = dto.PhysicalObjectFamilyTypeImageDetails; RadLBPlantItemsImage.DataBind(); RadLBPlantItemsImage.SelectedValue = HdRad.Value; }