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

radcombobox in radgrid

2 Answers 101 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Gurubaran Sethuraman
Top achievements
Rank 1
Gurubaran Sethuraman asked on 25 Nov 2010, 12:25 PM
Hi,

I have an issue in edititemtemplate of radgrid.I have a radcombobox on edit of radgrid.The issue is required field indicator "*" is appearing in the next line of the radcombox.i want this "*" and validation message to appear next to the radcombobox.i have tried many ways in HTML.But of no use.Any help would be greatly appreciated.

<

 

EditItemTemplate>

 

 

<telerik:RadComboBox Height="100px" Width="150px" Skin="WebBlue" ID="RadCboBusinessUnit" runat="server"

 

 

EnableVirtualScrolling="true" EmptyMessage="Please Select..." MarkFirstMatch="true" AllowCustomText="true" CausesValidation ="false"

 

 

Text ='<%# DataBinder.Eval(Container.DataItem,"BusinessUnit" )%>' AutoPostBack ="true" OnSelectedIndexChanged = "RadCboBusinessUnit_SelectedIndexChanged" >

 

 

</telerik:RadComboBox>

 

 

<span class="lbl_Mandatory">*</span>

 

 

 

<asp:RequiredFieldValidator ID="ValidateBusinessUnit" runat="server" ControlToValidate ="RadCboBusinessUnit" ErrorMessage="Value Is Required"></asp:RequiredFieldValidator>

 

 

</EditItemTemplate>

FYI -- The below code is actually causing out the issue.

 

<

 

telerik:AjaxSetting AjaxControlID="RadCboBusinessUnit">

 

 

<UpdatedControls>

 

 

<telerik:AjaxUpdatedControl ControlID="RadCboBusinessUnit" LoadingPanelID="RadAjaxLoadingPanel1" />

 

 

</UpdatedControls>

 

 

</telerik:AjaxSetting>

 

 

 



Thank You!
Gurubaran

2 Answers, 1 is accepted

Sort by
0
Accepted
Princy
Top achievements
Rank 2
answered on 26 Nov 2010, 05:11 AM
Hello Gurubaran,

Following is the sample code that I have tried in my application to achieve this. Give a try with this.

ASPX:
<telerik:GridTemplateColumn>
  <EditItemTemplate>
    <div>
       <div style="float: left">
         <telerik:RadComboBox Height="100px" Width="150px" Skin="WebBlue"
            ID="RadCboBusinessUnit" runat="server" EnableVirtualScrolling="true"
            EmptyMessage="Please Select..." MarkFirstMatch="true" AllowCustomText="true"
            CausesValidation="false" AutoPostBack="true">
         </telerik:RadComboBox>
       </div>
       <div style="float: left">
         <span class="lbl_Mandatory" style="float: left">*</span>
       </div>
       <div style="float: left">
         <asp:RequiredFieldValidator ID="ValidateBusinessUnit" runat="server"
           ControlToValidate="RadCboBusinessUnit" ErrorMessage="Value Is Required">
         </asp:RequiredFieldValidator>
       </div>
    </div>
  </EditItemTemplate>
</telerik:GridTemplateColumn>

Thanks,
Princy.
0
Gurubaran Sethuraman
Top achievements
Rank 1
answered on 26 Nov 2010, 08:46 AM
Cool! That worked perfectly.

Many Thanks
gurubaran
Tags
Grid
Asked by
Gurubaran Sethuraman
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 2
Gurubaran Sethuraman
Top achievements
Rank 1
Share this question
or