radgrid - RadComboBox DropDownList is dittached from its place -


there radgrid contains radcombobox along button next it.
when user key-in , click on button, data bind in radcombobox related key-in text , display in dropdownlist.

but dropdownlist appear far below radcombobox, disturbs & feel of page. please refer attached issue snapshot. enter image description here

i tried set expanddirection="down" property did not worked. tried set enablescreenboundarydetection="false", sticks dropdownlist @ bottom of page, when scroll page , dropdown stick @ bottom & scrolls page.

also, set highlighttemplateditems="true" not working @ all.

edit: html code:

 <telerik:radmultipage id="radmultipage6" runat="server" selectedindex="0" width="100%">     <telerik:radpageview id="radpageview5" runat="server" width="100%">                                                                                  <%--<telerik:radajaxpanel id="radajaxpanel5" runat="server">--%>         <telerik:radgrid id="rggstaccode" runat="server" autogeneratecolumns="false"              showfooter="true" groupingenabled="false" showstatusbar="true"                     allowautomaticinserts="false" allowautomaticupdates="false" allowautomaticdeletes="true"            onneeddatasource= "rggstaccode_needdatasource" onitemdatabound="rggstaccode_itemdatabound"                                oninsertcommand="rggstaccode_insertcommand" ondeletecommand="rggstaccode_deletecommand"            onupdatecommand="rggstaccode_updatecommand" enableembeddedskins="true" skin="outlook">          <mastertableview commanditemdisplay="top" autogeneratecolumns="false" datakeynames="accountcodeid"             insertitempageindexaction="showitemoncurrentpage" showfooter="true" showheaderswhennorecords="true">             <commanditemsettings addnewrecordtext="new" />              <columns>                 <telerik:grideditcommandcolumn uniquename="imagebutton1" buttontype="imagebutton"></telerik:grideditcommandcolumn>                  <telerik:gridtemplatecolumn uniquename="accountcode" headertext="account code">                   <itemtemplate>                      <asp:label id="lblaccode" text='<%# eval("accountcode") %>' runat="server"></asp:label>                   </itemtemplate>                   <edititemtemplate>                      <asp:label id="lblaccode2" runat="server" text='<%# eval("accountcode") + " - " + eval("accountdescription")%>' visible="false"></asp:label>                       <telerik:radcombobox id="ddlaccountcode" runat="server" height="200" width="260" dropdownwidth="310"                               enableloadondemand="true" onitemsrequested="ddlaccountcode_itemsrequested" enableitemcaching="true"                          showmoreresultsbox="true" enablevirtualscrolling="true" allowcustomtext="true" markfirstmatch="true"                        filter="contains" highlighttemplateditems="true" causesvalidation="true" appenddatabounditems="true"                         datatextfield="accountdescription" datavaluefield="accountcodeid"                        showdropdownontextboxclick="false"                        onclientdropdownopening="onclientdropdownopening" onclientitemsrequested="onclientitemsrequested">                                                          </telerik:radcombobox>                                     <asp:button id="btnsearch" runat="server" text="search" onclick="btnsearch_click" onclientclick="buttonclicked()" usesubmitbehavior="true" />&nbsp;                    </edititemtemplate>                 </telerik:gridtemplatecolumn>                 //other columns              </columns>               <editformsettings>                 <editcolumn buttontype="imagebutton" />              </editformsettings>              <pagerstyle alwaysvisible="true" pagesizecontroltype="radcombobox" />         </mastertableview>         </telerik:radgrid>     <%--</telerik:radajaxpanel>--%>     </telerik:radpageview>                                                                              </telerik:radmultipage> 

c# code:

protected void ddlaccountcode_itemsrequested(object sender, radcomboboxitemsrequestedeventargs e)     {         session["text"] = e.text;         session["numberofitems"] = e.numberofitems;          radcombobox combo = (radcombobox)sender;         combo.showdropdownontextboxclick = false;         combo.items.clear();         combo.highlighttemplateditems = true;     }      protected void btnsearch_click(object sender, eventargs e)     {         try         {             grideditableitem editeditem = (sender button).namingcontainer grideditableitem;              radcombobox combo = (radcombobox)editeditem.findcontrol("ddlaccountcode");             //clear previous items on every new search             combo.items.clear();             combo.opendropdownonload = true; // opens dropdown of radcombobox on button click             combo.highlighttemplateditems = true; // highlight searched text              //code related search in radcombobox             combo.databind();         }         catch (exception ex)         {         }     } 

please let me know how resolve 2 issues. please reply.

thanks in advance.

sorry can't replicate problem in environment....

here code using
.aspx

<telerik:radgrid id="rggstaccode" runat="server" autogeneratecolumns="false"        showfooter="true" groupingenabled="false" showstatusbar="true"               allowautomaticinserts="false" allowautomaticupdates="false" allowautomaticdeletes="true"      onneeddatasource="rggstaccode_needdatasource">         <mastertableview commanditemdisplay="top" autogeneratecolumns="false"          insertitempageindexaction="showitemoncurrentpage" showfooter="true" showheaderswhennorecords="true">             <commanditemsettings addnewrecordtext="new" />             <columns>                 <telerik:grideditcommandcolumn uniquename="imagebutton1" buttontype="imagebutton"></telerik:grideditcommandcolumn>                 <telerik:gridtemplatecolumn uniquename="accountcode" headertext="account code">                     <itemtemplate>                         <asp:label id="lblaccode" runat="server" text='<%# eval("accountcode") %>'></asp:label>                     </itemtemplate>                     <edititemtemplate>                         <asp:label id="lblaccode2" runat="server" text='<%# eval("accountcode") + " - " + eval("accountdescription")%>' visible="false"></asp:label>                         <telerik:radcombobox id="ddlaccountcode" runat="server" height="200" width="260" dropdownwidth="310"                                 enableitemcaching="true" showmoreresultsbox="true" enablevirtualscrolling="true" allowcustomtext="true"                           markfirstmatch="true" filter="contains" highlighttemplateditems="true" causesvalidation="true"                           appenddatabounditems="true" showdropdownontextboxclick="false" onitemsrequested="ddlaccountcode_itemsrequested">                         </telerik:radcombobox>                         <asp:button id="btnsearch" runat="server" text="search" onclick="btnsearch_click" />&nbsp;                      </edititemtemplate>                 </telerik:gridtemplatecolumn>                         </columns>         <editformsettings>             <editcolumn buttontype="imagebutton" />         </editformsettings>         <pagerstyle alwaysvisible="true" pagesizecontroltype="radcombobox" />     </mastertableview> </telerik:radgrid> 

.cs

protected void page_load(object sender, eventargs e) {     // check     if (!ispostback)     {         // variable         datatable dt = new datatable();         dt.columns.add("accountcode");         dt.columns.add("accountdescription");          (int = 0; < 10; i++) dt.rows.add("accountcode" + i, "accountdescription" + i);          viewstate["data"] = dt;          // bind         rggstaccode.datasource = dt;         rggstaccode.databind();          // dispose         dt.dispose();     } }  protected void rggstaccode_needdatasource(object sender, gridneeddatasourceeventargs e) {     rggstaccode.datasource = viewstate["data"] datatable; }  protected void ddlaccountcode_itemsrequested(object sender, radcomboboxitemsrequestedeventargs e) {     session["text"] = e.text;     session["numberofitems"] = e.numberofitems;      radcombobox combo = (radcombobox)sender;     combo.showdropdownontextboxclick = false;     combo.items.clear();     combo.highlighttemplateditems = true; }  protected void btnsearch_click(object sender, eventargs e) {     try     {         grideditableitem editeditem = (sender button).namingcontainer grideditableitem;          radcombobox combo = (radcombobox)editeditem.findcontrol("ddlaccountcode");         //clear previous items on every new search         combo.items.clear();         combo.opendropdownonload = true; // opens dropdown of radcombobox on button click         combo.highlighttemplateditems = true; // highlight searched text          //code related search in radcombobox         combo.datasource = viewstate["data"] datatable;         combo.datatextfield = "accountcode";         combo.datavaluefield = "accountcode";         combo.databind();     }     catch (exception ex)     {     } } 

result below
result


Comments

Popular posts from this blog

java - Date formats difference between yyyy-MM-dd'T'HH:mm:ss and yyyy-MM-dd'T'HH:mm:ssXXX -

c# - Get rid of xmlns attribute when adding node to existing xml -