Telerik Forums
UI for ASP.NET AJAX Forum
2 answers
222 views
Hi all,

I would like to fire a javascript confirm popup when the user wants to change page (by setting a page number or by using previous / next page buttons).

Here is a quick description of the grid :

A user can update some input fields in a grid and a button below the grid lets the user save the values. I would like to prevent him from losing its updated data when he changes page by displaying a javascript confirm popup.

The confirm popup will ask if he really wants to change page and if it is the case, we lauch the postback and we change page. If not, the page change event is canceled and the user can save its values.


Thanks
TANSERI
Top achievements
Rank 1
 answered on 11 Sep 2013
6 answers
237 views
I have a hierarchical Telerik RadGrid that sometimes contains child entries that are empty. For these, I want to overwrite the default text "No child records to display" with something user locale specific.

So I can do this:

       
<telerik:RadGrid ID ="SettingsGrid" ... /><br>
            <mastertableview ... /><br>
                <DetailTables><br>
                    <telerik:GridTableView ... /><br>
                        <asp:Label ID="NoRecordLabel" runat="server" Text="whatever"/></div></NoRecordsTemplate>


Which causes the text "whatever" to appear when it should.

But I obviously want to do this dynamically, but I have failed in both of two ways:

1) By referencing my .resx file in the .ascx file. I import it's namespace and reference a certain resource as such:

    Text="<%$ Resx:SiteTextResources.Globals_Close %>"

(This works in other files in the same solution)

But this only produces empty text.

2) I haven't been successful at retrieving the Label programatically from the code behind. I looked at this: http://www.telerik.com/community/forums/aspnet-ajax/grid/how-to-access-controls-in-norecordstemplate.aspx but didn't get that approach to work, as I just can't seem to find the Label. I get an OutOfBoundsException, which I guess means the GetItems() method returns null.

Any ideas? Would appreciate it a lot!
C
Top achievements
Rank 1
 answered on 11 Sep 2013
1 answer
426 views
Hello,
We are trying Radgrid for our project requirements we have a specific requirement to disable selection of certain rows based on "True/False" values returned from a column in database. We want to have functionality to disable those rows for which a specific column is returning "False" and we want to enable this feature with hierarchy .
We tried going for Template field, GridSelectColumn and tried using "Selectable.Mode to None" but we were not able to achieve the results and we need a client side solution /using some inbuilt property for our problem as our grid would hold around 1 million records so handling such scenario on server side/codebehind is the scenario we want to avoid.
Kindly reply to suggest some ways /features we can achieve our requirement. We have enquired for professional license so we will be getting professional license this week , so please help us on achieving this requirement.


Thanks& Regards,
-Dinesh Kotwani

 

Jayesh Goyani
Top achievements
Rank 2
 answered on 11 Sep 2013
1 answer
69 views
Hi

Is it possible to change the number of time slots as well as time slot duration of a radscheduler?  If possible how?
Needha
Shinu
Top achievements
Rank 2
 answered on 11 Sep 2013
1 answer
70 views
I have a problem when trying to localize SPRadEditor control. I am changing language but it stays English anyway.
Telerik.Web.UI: Version=2013.2.717.35
RadEditorSharePoint: Version=6.7.1.0
 My actions:
Add telerik control to my cutom web part, change Language property to "de-DE":
<telerik:SPRadEditor ID="ContentInputTextBox" Language="de-DE" OnClientLoad="RadEditorLoad" CssClass="articleformcontrolfull" runat="server"><CssFiles><telerik:EditorCssFile Value="~/EditorContentArea.css" /></CssFiles></telerik:SPRadEditor>

Add language property to ConfigFile.xml and ListConfigFile.xml in C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\wpresources\RadEditorSharePoint\6.7.1.0__1f131a624888eeed\Resources folder:
<property name="Language">de-DE</property>

Deploy. After all those actions language for all elements stays English and don't changes.
What I am missing here? Or what I am doing wrongly? Thank you for your help.


Ianko
Telerik team
 answered on 11 Sep 2013
1 answer
109 views
hi there,

i have a problem finding the listview through javascript. it always returns null.
also i get an error on setting datasource : function not known.
i just included the 3 dll's in my bin folder. Serverside was working

javascript:
function pageLoad() {
    var listview = $find("rlvProducts");
    console.log(listview);
    listview.set_dataSource(products);
    listview.dataBind();
}

aspx:
<telerik:RadListView ID="rlvProducts" CssClass="test" runat="server">
                <ClientSettings>
                    <DataBinding ItemPlaceHolderID="iphProducts">
                        <LayoutTemplate>
                            <ul id="iphProducts">

                            </ul>
                        </LayoutTemplate>
                        <ItemTemplate>
                            <li>#= id #</li>
                        </ItemTemplate>
                    </DataBinding>
                </ClientSettings>
            </telerik:RadListView>

also i followed this guide:
http://blogs.telerik.com/aspnet-ajax/posts/12-02-06/client-side-databinding-with-radlistview-for-asp-net-ajax---part-1.aspx
Konstantin Dikov
Telerik team
 answered on 11 Sep 2013
7 answers
308 views
Hi

I want my web users to select only .jpg/.png files to be uploaded and set the AllowedFileExtensions property and found that it works rarely because of some browser limitations. So If the user selects an invalid file, I want to display an alert and bring the control back to its original state instead of displaying the selected file as an invalid one.( The one shown as Red). Please help.

Thanks
Dona.
Shinu
Top achievements
Rank 2
 answered on 11 Sep 2013
4 answers
291 views
Hi,

I have a radgrid that I want to remove some items  based on data on item databound. There were several computation happening on serveral columns in item databound. If the computed value of that record is equal to zero, it should no longer show. Any info on how can I accomplish this one..

Thanks in advance,
RJ
Princy
Top achievements
Rank 2
 answered on 11 Sep 2013
3 answers
82 views
Hi everyone.

I have a proyect of asp net  with more than 8 radchart on vs 2010..but i noticed than the performance is too slow..the vs use 25% of cpu...and change view between source code and view design is too slow on visual studio 2010, the performance is bad now on vs..how i can  do?. 
Petar Marchev
Telerik team
 answered on 11 Sep 2013
1 answer
104 views
In edit mode of the grid, there is a dropdownlist for user to select.

For new record, it will select default message "Please select" 
For existing record, it will databind the value from db to become selected value

I had added the requiredvalidator to make sure user had selected dropdownlist.
it works when user create a new record, it will display error message if user not select.

but it had error when user edit the record, even though the dropdownlist had selected value.
it still display error message


<%@ Page Title="" Language="VB" MasterPageFile="~/LRDB.master" AutoEventWireup="false" CodeFile="Admin_dictionary_BU.aspx.vb" Inherits="Admin_Admin_dictionary_BU" %>
 
<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder2" Runat="Server">
        <br />
        <strong><span class="style4">Business Unit</span><br /> </strong><br />
 
                                                            <telerik:RadCodeBlock ID="RadCodeBlock1" runat="server">
                                                            <script type="text/javascript">
                                                                function RowDblClick(sender, eventArgs) {
                                                                    sender.get_masterTableView().editItem(eventArgs.get_itemIndexHierarchical());
                                                                }
 
                                                                function conformbox() {
                                                                    var con = confirm("Are you sure want to delete?");
                                                                    if (con == true) {
                                                                        return true;
                                                                    }
                                                                    else {
                                                                        return false;
                                                                    }
                                                                }
                                                            </script>
                                                        </telerik:RadCodeBlock>
 
                                                        <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server">
                                                        </telerik:RadAjaxLoadingPanel>
                                                            <telerik:RadGrid ID="RadGrid_BU" runat="server" CellSpacing="0"
                                                            DataSourceID="LDS_BU" width="1000"  PageSize="15"
                                                                    GridLines="None" style="margin-top: 0px" AllowFilteringByColumn="True"
                                                                    AllowPaging="True" AllowSorting="True" AutoGenerateColumns="False"
                                                                    ShowStatusBar="True" AllowAutomaticDeletes="True" AllowAutomaticInserts="True"
                                                            AllowAutomaticUpdates="True">
                                                                    <GroupingSettings CaseSensitive="false" />
                                                                <MasterTableView AutoGenerateColumns="False"
                                                                    DataKeyNames="BU_ID" DataSourceID="LDS_BU"
                                                                    AllowFilteringByColumn="False" AllowPaging="False"
                                                                    CommandItemDisplay="Top" OverrideDataSourceControlSorting="true" >
 
                                                                    <CommandItemSettings ExportToPdfText="Export to PDF" />
                                                                    <RowIndicatorColumn FilterControlAltText="Filter RowIndicator column"
                                                                        Visible="True">
                                                                    </RowIndicatorColumn>
                                                                    <ExpandCollapseColumn FilterControlAltText="Filter ExpandColumn column"
                                                                        Visible="True">
                                                                    </ExpandCollapseColumn>
                                                                    <Columns>
                                                                        <telerik:GridEditCommandColumn UniqueName="EditCommandColumn">
                                                                        </telerik:GridEditCommandColumn>
                                                                        <telerik:GridBoundColumn DataField="BU_ID"
                                                                            FilterControlAltText="Filter BU_ID column" HeaderText="BU_ID"
                                                                            SortExpression="BU_ID" UniqueName="BU_ID" Visible="false">
                                                                        </telerik:GridBoundColumn>
                                                                        <telerik:GridBoundColumn DataField="BU_Name"
                                                                            FilterControlAltText="Filter BU_Name column" HeaderText="BU Name"
                                                                            SortExpression="BU_Name" UniqueName="BU_Name">
                                                                        </telerik:GridBoundColumn>
                                                                        <telerik:GridBoundColumn DataField="shortname"
                                                                            FilterControlAltText="Filter shortname column" HeaderText="Shortname"
                                                                            SortExpression="shortname" UniqueName="shortname">
                                                                        </telerik:GridBoundColumn>
                                                                        <telerik:GridBoundColumn DataField="bu_addr"
                                                                            FilterControlAltText="Filter bu_addr column" HeaderText="Address"
                                                                            SortExpression="bu_addr" UniqueName="bu_addr">
                                                                        </telerik:GridBoundColumn>
                                                                        <telerik:GridBoundColumn DataField="BU_Tel"
                                                                            FilterControlAltText="Filter BU_Tel column" HeaderText="Telephone"
                                                                            SortExpression="BU_Tel" UniqueName="BU_Tel">
                                                                        </telerik:GridBoundColumn>
                                                                        <telerik:GridBoundColumn DataField="BU_TelPre"
                                                                            FilterControlAltText="Filter BU_TelPre column" HeaderText="Telephone Prefix"
                                                                            SortExpression="BU_TelPre" UniqueName="BU_TelPre">
                                                                        </telerik:GridBoundColumn>
                                                                        <telerik:GridBoundColumn DataField="BU_Fax"
                                                                            FilterControlAltText="Filter BU_Fax column" HeaderText="Fax No."
                                                                            SortExpression="BU_Fax" UniqueName="BU_Fax">
                                                                        </telerik:GridBoundColumn>
                                                                        <telerik:GridBoundColumn DataField="BU_FaxPre"
                                                                            FilterControlAltText="Filter BU_FaxPre column" HeaderText="Fax No. Prefix"
                                                                            SortExpression="BU_FaxPre" UniqueName="BU_FaxPre">
                                                                        </telerik:GridBoundColumn>
                                                                        <telerik:GridBoundColumn DataField="BU_SpeedDial"
                                                                            FilterControlAltText="Filter BU_SpeedDial column" HeaderText="SpeedDial"
                                                                            SortExpression="BU_SpeedDial" UniqueName="BU_SpeedDial">
                                                                        </telerik:GridBoundColumn>
              
                                                                    </Columns>
                                                                    <EditFormSettings EditFormType="Template">
                                                                        <EditColumn FilterControlAltText="Filter EditCommandColumn1 column"
                                                                            UniqueName="EditCommandColumn1">
                                                                        </EditColumn>
                                                                    <FormTemplate>
 
                                                        <table id="Table2" cellspacing="2" cellpadding="1" width="50%" border="1" rules="none"
                                                            style="border-collapse: collapse;">
                                                            <tr class="EditFormHeader">
                                                            <td style="width:150px">
                                                            <asp:Label ID="Label5" Text="Company" runat="server"></asp:Label>                                                           
                                                            </td>
                                                            <td>
                                                                <telerik:RadDropDownList ID="rdl_company" runat="server" DataSourceID="LDS_Company"
                                                                 DataValueField="CompID" DataTextField="CompanyName" DefaultMessage="Please select..." >
                                                                </telerik:RadDropDownList>
                                                                <asp:RequiredFieldValidator ID="RequiredFieldValidator11" runat="server" ControlToValidate="rdl_company"
                                                                     ErrorMessage="Please select a Company." ></asp:RequiredFieldValidator>  
                                                            </td>
                                                            </tr>
                                                            <tr >
                                                            <td >
                                                            <asp:Label ID="lb" Text="BU Name" runat="server"></asp:Label>                                                           
                                                            </td>
                                                            <td>
                                                            <asp:TextBox ID="tb_BU_name" runat="server" Text='<%# Bind("BU_Name") %>' TabIndex="2"></asp:TextBox>                                                           
                                                            </td>
                                                            </tr>
                                                            <tr >
                                                            <td >
                                                            <asp:Label ID="Label1" Text="ShortName" runat="server"></asp:Label>                                                           
                                                            </td>
                                                            <td>
                                                            <asp:TextBox ID="tb_shortname" runat="server" Text='<%# Bind("shortname") %>' TabIndex="2"></asp:TextBox>                                                           
                                                            </td>
                                                            </tr>
                                                            <tr >
                                                            <td >
                                                            <asp:Label ID="Label2" Text="Address" runat="server"></asp:Label>                                                           
                                                            </td>
                                                            <td>
                                                            <asp:TextBox ID="tb_BU_addr" runat="server" Text='<%# Bind("BU_addr") %>' TabIndex="2" Width="300" TextMode="MultiLine"></asp:TextBox>                                                           
                                                            </td>
                                                            </tr>
                                                            <tr >
                                                            <td >
                                                            <asp:Label ID="Label3" Text="Telephone" runat="server"></asp:Label>                                                           
                                                            </td>
                                                            <td>
                                                            <asp:TextBox ID="tb_tel" runat="server" Text='<%# Bind("bu_tel") %>' TabIndex="2"></asp:TextBox>                                                           
                                                            <asp:RegularExpressionValidator ID="RegularExpressionValidator1" runat="server" Display="Dynamic"
                                                            ErrorMessage="Please, enter valid phone number." ValidationExpression="\d+" ControlToValidate="tb_tel">
                                                            </asp:RegularExpressionValidator>
                                                            </td>
                                                            </tr>
                                                            <tr >
                                                            <td >
                                                            <asp:Label ID="Label4" Text="Telephone Prefix" runat="server"></asp:Label>                                                           
                                                            </td>
                                                            <td>
                                                            <asp:TextBox ID="tb_telpre" runat="server" Text='<%# Bind("bu_telpre") %>' TabIndex="2"></asp:TextBox>                                                           
                                                            <asp:RegularExpressionValidator ID="RegularExpressionValidator2" runat="server" Display="Dynamic"
                                                            ErrorMessage="Please, enter valid phone number." ValidationExpression="\d+" ControlToValidate="tb_telpre">
                                                            </asp:RegularExpressionValidator>
                                                            </td>
                                                            </tr>
                                                            <tr >
                                                            <td >
                                                            <asp:Label ID="Label6" Text="Fax No." runat="server"></asp:Label>                                                           
                                                            </td>
                                                            <td>
                                                            <asp:TextBox ID="tb_fax" runat="server" Text='<%# Bind("bu_fax") %>' TabIndex="2"></asp:TextBox>                                                           
                                                            <asp:RegularExpressionValidator ID="RegularExpressionValidator3" runat="server" Display="Dynamic"
                                                            ErrorMessage="Please, enter valid phone number." ValidationExpression="\d+" ControlToValidate="tb_fax">
                                                            </asp:RegularExpressionValidator>
                                                            </td>
                                                            </tr>
                                                            <tr >
                                                            <td >
                                                            <asp:Label ID="Label7" Text="Fax No. Prefix" runat="server"></asp:Label>                                                           
                                                            </td>
                                                            <td>
                                                            <asp:TextBox ID="tb_faxpre" runat="server" Text='<%# Bind("bu_faxpre") %>' TabIndex="2"></asp:TextBox>                                                           
                                                            <asp:RegularExpressionValidator ID="RegularExpressionValidator4" runat="server" Display="Dynamic"
                                                            ErrorMessage="Please, enter valid phone number." ValidationExpression="\d+" ControlToValidate="tb_faxpre">
                                                            </asp:RegularExpressionValidator>
                                                            </td>
                                                            </tr>
                                                            <tr >
                                                            <td >
                                                            <asp:Label ID="Label8" Text="SpeedDial" runat="server"></asp:Label>                                                           
                                                            </td>
                                                            <td>
                                                            <asp:TextBox ID="tb_speeddial" runat="server" Text='<%# Bind("bu_speeddial") %>' TabIndex="2"></asp:TextBox>                                                           
                                                            <asp:RegularExpressionValidator ID="RegularExpressionValidator5" runat="server" Display="Dynamic"
                                                            ErrorMessage="Please, enter valid phone number." ValidationExpression="\d+" ControlToValidate="tb_speeddial">
                                                            </asp:RegularExpressionValidator>
                                                            </td>
                                                            </tr>
                                                               <tr>
                                                                <td align="right" colspan="2">
                                                                    <asp:Button ID="btnUpdate" Text='<%# IIf((TypeOf(Container) is GridEditFormInsertItem), "Insert", "Update") %>'
                                                                        runat="server" CommandName='<%# IIf((TypeOf(Container) is GridEditFormInsertItem), "PerformInsert", "Update")%>' >
                                                                    </asp:Button
                                                                    <asp:Button ID="btnDelete" Text="Delete" runat="server" CausesValidation="False"
                                                                        CommandName="Delete" OnClientClick="return conformbox();"></asp:Button>
                                                                    <asp:Button ID="btnCancel" Text="Cancel" runat="server" CausesValidation="False"
                                                                        CommandName="Cancel"></asp:Button>
 
                                                                </td>
                                                            </tr>
                                                        </table>
                                                    </FormTemplate>
                                                </EditFormSettings>
                                                                    <PagerStyle PageSizeControlType="RadComboBox" />
                                                                </MasterTableView>
                                                                <PagerStyle PageSizeControlType="RadComboBox" />
                                                                <FilterMenu EnableImageSprites="False">
                                                                </FilterMenu>
 
                                                        </telerik:RadGrid>
 
                                                <asp:LinqDataSource ID="LDS_Company"
                                                    runat="server" ContextTypeName="dcLRDBDataContext" EntityTypeName=""
                                                    TableName="db_Companies">
                                                </asp:LinqDataSource>
 
                                                        <asp:LinqDataSource ID="LDS_BU"
                                                    runat="server" ContextTypeName="dcLRDBDataContext" EntityTypeName=""
                                                    TableName="db_Business_units">
                                                </asp:LinqDataSource>
</asp:Content>


Code behind:

Imports System
Imports System.IO
Imports Telerik.Web.UI
Imports System.Web.UI
Imports Telerik.Web.UI.AsyncUpload
Imports System.Runtime.Serialization.Json
Imports System.Web.Services
Imports System.Runtime.Serialization
Imports System.Collections.Generic
Imports System.Drawing
Partial Class Admin_Admin_dictionary_BU
    Inherits System.Web.UI.Page
 
    Protected Sub RadGrid_BU_ItemCommand(ByVal source As Object, ByVal e As Telerik.Web.UI.GridCommandEventArgs) Handles RadGrid_BU.ItemCommand
        RadGrid_BU.MasterTableView.ClearEditItems()
 
        If e.CommandName = RadGrid.InitInsertCommandName Then   'Click Add New Record button           
            Dim editColumn As GridEditCommandColumn = CType(RadGrid_BU.MasterTableView.GetColumn("EditCommandColumn"), GridEditCommandColumn)
            editColumn.Visible = False
        ElseIf (e.CommandName = RadGrid.RebindGridCommandName AndAlso e.Item.OwnerTableView.IsItemInserted) Then
            e.Canceled = True
        Else
            Dim editColumn As GridEditCommandColumn = CType(RadGrid_BU.MasterTableView.GetColumn("EditCommandColumn"), GridEditCommandColumn)
            If Not editColumn.Visible Then  'Click Cancel button (both Insert and Update mode)
                editColumn.Visible = True
            End If
 
            Dim ddlComp_id As RadDropDownList = DirectCast(e.Item.FindControl("rdl_company"), RadDropDownList)
            Dim txt_bu_name As TextBox = DirectCast(e.Item.FindControl("tb_bu_name"), TextBox)
            Dim txt_shortname As TextBox = DirectCast(e.Item.FindControl("tb_shortname"), TextBox)
            Dim txt_address As TextBox = DirectCast(e.Item.FindControl("tb_bu_addr"), TextBox)
            Dim txt_tel As TextBox = DirectCast(e.Item.FindControl("tb_tel"), TextBox)
            Dim txt_telpre As TextBox = DirectCast(e.Item.FindControl("tb_telpre"), TextBox)
            Dim txt_fax As TextBox = DirectCast(e.Item.FindControl("tb_fax"), TextBox)
            Dim txt_faxpre As TextBox = DirectCast(e.Item.FindControl("tb_faxpre"), TextBox)
            Dim txt_speeddial As TextBox = DirectCast(e.Item.FindControl("tb_speeddial"), TextBox)
            Dim dc As New dcLRDBDataContext
 
            If e.CommandName = "PerformInsert" Then
 
                Dim newRecord1 As New db_Business_unit
                dc.db_Business_units.InsertOnSubmit(newRecord1)
                newRecord1.CompID = ddlComp_id.SelectedValue
                newRecord1.BU_Name = txt_bu_name.Text
                newRecord1.shortname = txt_shortname.Text
                newRecord1.BU_Tel = txt_tel.Text
                newRecord1.BU_TelPre = txt_telpre.Text
                newRecord1.BU_Fax = txt_fax.Text
                newRecord1.BU_FaxPre = txt_faxpre.Text
                newRecord1.BU_SpeedDial = txt_speeddial.Text
                newRecord1.BU_addr = txt_address.Text
                newRecord1.LastUpdateDate = DateTime.Now
                newRecord1.LastUpdateBy = HttpContext.Current.Session("UserID")
                dc.SubmitChanges()
 
                RadGrid_BU.MasterTableView.ClearEditItems()
                RadGrid_BU.DataBind()
 
            ElseIf e.CommandName = "Update" Then
                Dim lid As Integer = e.Item.OwnerTableView.DataKeyValues(e.Item.ItemIndex)("BU_ID")
 
                Dim rec = (From p In dc.db_Business_units Where p.BU_ID = lid).FirstOrDefault
                If Not rec Is Nothing Then
                    rec.CompID = ddlComp_id.SelectedValue
                    rec.BU_Name = txt_bu_name.Text
                    rec.shortname = txt_shortname.Text
                    rec.BU_addr = txt_address.Text
                    rec.BU_Tel = txt_tel.Text
                    rec.BU_TelPre = txt_telpre.Text
                    rec.BU_Fax = txt_fax.Text
                    rec.BU_FaxPre = txt_faxpre.Text
                    rec.BU_SpeedDial = txt_speeddial.Text
                    rec.LastUpdateBy = HttpContext.Current.Session("UserID")
                    rec.LastUpdateDate = DateTime.Now
                    dc.SubmitChanges()
                End If
 
                RadGrid_BU.MasterTableView.ClearEditItems()
                RadGrid_BU.DataBind()
            ElseIf e.CommandName = "Delete" Then
 
                Dim lid As Integer = e.Item.OwnerTableView.DataKeyValues(e.Item.ItemIndex)("BU_ID")
 
                Dim chk_rec = (From a In dc.db_Countries Where a.BU_ID = lid).Count
                If chk_rec > 0 Then
                    Page.ClientScript.RegisterStartupScript(Page.GetType(), "MessageBox", "alert('Cannot delete because this dictionary had been used.');", True)
                Else
 
                    Dim rec2 = (From p In dc.db_Business_units Where p.BU_ID = lid).FirstOrDefault
                    If Not IsNothing(rec2) Then
                        dc.db_Business_units.DeleteOnSubmit(rec2)
                        dc.SubmitChanges()
                    End If
                End If
 
 
 
 
 
                RadGrid_BU.MasterTableView.ClearEditItems()
                RadGrid_BU.DataBind()
            End If
 
            dc.Dispose()
        End If
    End Sub
 
    Private Sub RadGrid_BU_ItemDataBound(ByVal sender As Object, ByVal e As Telerik.Web.UI.GridItemEventArgs) Handles RadGrid_BU.ItemDataBound
 
        If (TypeOf e.Item Is GridEditableItem AndAlso e.Item.IsInEditMode) Then
            Dim item As GridEditableItem = e.Item
            Dim ddl As RadDropDownList = item.FindControl("rdl_company")
            ddl.SelectedValue = DataBinder.Eval(e.Item.DataItem, "CompID").ToString
        End If
 
    End Sub
End Class
Nencho
Telerik team
 answered on 11 Sep 2013
Narrow your results
Selected tags
Tags
+? more
Top users last month
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Hiba
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Hiba
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?