This is a migrated thread and some comments may be shown as answers.

RadListBox issue after post back

1 Answer 124 Views
ListBox
This is a migrated thread and some comments may be shown as answers.
Sujina
Top achievements
Rank 1
Sujina asked on 12 Mar 2013, 09:41 AM
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:

 

 

 

 

 

<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;
      }

1 Answer, 1 is accepted

Sort by
0
Bozhidar
Telerik team
answered on 12 Mar 2013, 12:58 PM
Hi Sujina,

If you are using IE you might be experiencing this issue due to the stylesheet limit it poses. You can read about the issue, as well as how to resolve it in the following blog post:
http://blogs.telerik.com/aspnetmvcteam/posts/10-05-03/internet-explorer-css-limits.aspx

 

Greetings,
Bozhidar
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
Tags
ListBox
Asked by
Sujina
Top achievements
Rank 1
Answers by
Bozhidar
Telerik team
Share this question
or