Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
127 views
I have a form where I'm using an AutoCompleteBox to allow users to select a client from the database and create some information to attach to that client. If the client doesn't already exist, I have a quick input form on the same page that allows them to add the new client to the database. This triggers a server-side event that inserts the client info and returns the Client Name and an automatically generated Client ID that I use to create a token for AutoCompleteBox.

I'm using the OnClientEntryAdded & OnClientEntryRemoved events to control whether the Add Client form inputs are enabled or disabled. Basically, if a token exists, they cannot add a new client to the database. This works if I load a token through the AutoCompleteBox. The input fields are cleared and disabled when a token is loaded and reenabled if all tokens are removed from the AutoCompleteBox.

The issues occurs when I fire the server-side click event for the Add Client information. I insert the new record and create a token that I add to the AutoCompleteBox then the OnClientEntryAdded event automatically fires once all the server-side events are complete. The logical operator shown below in my sample script works. It correctly finds that the AutoCompleteBox now has 1 entry but then when it tries to clear and disable the textbox, it throws a null or undefined object error. The best I can determine, is that the OnClientEntryAdded is fired before the textboxes are available in the DOM but I have no idea how to workaround this. Any help is appreciated.

function NewClientInputsToggle(sender, eventArgs) {
    if ($find("<%= racClientSearch.ClientID %>").get_entries().get_count() == 0) {
        $find("<%= txtNewClient.ClientID %>").enable();
    }
    else {
        $find("<%= txtNewClient.ClientID %>").clear();
        $find("<%= txtNewClient.ClientID %>").disable();
     }
}
Nencho
Telerik team
 answered on 07 Nov 2014
2 answers
173 views
Hi Team,

I have a grid with some rows in it.When I expand each row I am displaying three tabs in it.
On click of on of the tabs(detail tab in the aspx file) I am loading the data in to the textboxes.
I wanted to edit this textboxes after the data is loaded in to the textboxes.ASPX FILE:<telerik:RadGrid ID="DischargeRadGrid"   OnItemDataBound="DsichargeRadGridFormat_OnItemDataBound" runat="server" AutoGenerateColumns="false"
                            CssClass="TransferGridPanel" Height="370px" Width="500px" OnItemCommand="DischargeRadGrid_ItemCommand"
                            OnBatchEditCommand="DischargeRadGrid_BatchEditCommand">
                           <MasterTableView ShowHeadersWhenNoRecords="true" CommandItemDisplay="Top" EditMode="Batch" DataKeyNames="Discharge_ID">
                            <CommandItemSettings ShowRefreshButton="false" AddNewRecordText="Add NewDelivery" />
                               <BatchEditingSettings EditType="Cell" />
                            <NestedViewTemplate>
                             <telerik:RadTabStrip runat="server" ID="DischargeTabStrip" MultiPageID="DischargeMultipage" ClickSelectedTab="True"
                                 SelectedIndex="0" OnTabClick="DischargeTabStip_TabClick">
                        <Tabs>
                            <telerik:RadTab runat="server" Text="Details" PageViewID="DischargePageViewDetails">
                            </telerik:RadTab>
                            <telerik:RadTab runat="server" Text="Compartments" PageViewID="DischargePageViewCompartments">
                            </telerik:RadTab>
                            <telerik:RadTab runat="server" Text="Products" PageViewID="DischargePageViewProducts">
                            </telerik:RadTab>
                        </Tabs>
                    </telerik:RadTabStrip>
                    <telerik:RadMultiPage runat="server" ID="DischargeMultipage" SelectedIndex="0" RenderSelectedPageOnly="false">
                        <telerik:RadPageView runat="server" ID="DischargePageViewDetails">
                            <div class="contactWrap">
                                <table cellpadding="0" cellspacing="0">
                                <tr>
                                    <td>
                                            <asp:Label runat="server" ID="lbl_ShipTo" Text='ShipTo:' Font-Bold="true"></asp:Label></td>
                                    <td>
                                            <asp:TextBox runat="server" ID="txt_ShipToValue" Enabled="false"></asp:TextBox></td>
                                    </tr>
                                    <tr>
                                    <td>
                                            <asp:Label runat="server" ID="lbl_SiteName" Text='Name:' Font-Bold="true"></asp:Label></td>
                                    <td>
                                            <asp:TextBox runat="server" ID="txt_SiteNameValue" Enabled="false"></asp:TextBox></td>
                                </tr>
                                <tr>
                                    <td>
                                            <asp:Label runat="server" ID="lbl_Address" Text='Address:' Font-Bold="true"></asp:Label></td>
                                    <td>
                                            <asp:TextBox runat="server" ID="txt_AddressValue" Enabled="false" TextMode="MultiLine"></asp:TextBox></td>
                                    </tr>                                    <tr>
                                    <td>
                                            <asp:Label runat="server" ID="lbl_SplInstruction" Text='SpecialInstructions:' Font-Bold="true"></asp:Label></td>
                                    <td>
                                            <asp:TextBox runat="server" ID="txt_SplInstructionValue" Enabled="false"></asp:TextBox></td>
                                    </tr>                                    <tr>
                                    <td>
                                            <asp:Label runat="server" ID="lbl_PONumber" Text='PONumber:' Font-Bold="true"></asp:Label></td>
                                    <td>
                                            <asp:TextBox runat="server" ID="txt_PONumberValue"  Enabled="false"></asp:TextBox>
                                            <asp:ImageButton ImageUrl="~/images/PenEditIcon.gif" runat="server" ID="btn_editPONumber"  OnClick="btn_editPONumber_Click"></asp:ImageButton>                                    </td>
                                </tr>
                                 
                                   
                            </table>
                            </div>
                        </telerik:RadPageView>
                        <telerik:RadPageView runat="server" ID="DischargePageViewCompartments">
                            <telerik:RadGrid ID="CompartmentLevelDischargeRadGrid" runat="server" AutoGenerateColumns="false"
                                CssClass="TransferGridPanel" Height="233px" Width="475px" OnItemDataBound="CompartmentLevelDischargeRadGrid_ItemDataBound">
                                <MasterTableView ShowHeadersWhenNoRecords="true">
                                    <Columns>
                                        <telerik:GridBoundColumn UniqueName="ItemNo" DataField="CompartmentIndex" HeaderText="Comp No.">
                                        </telerik:GridBoundColumn>
                                       
                                        <telerik:GridBoundColumn UniqueName="PlannedDischargeProd" DataField="PlannedProductName" HeaderText="Planned Product">
                                        </telerik:GridBoundColumn>
                                        <telerik:GridBoundColumn UniqueName="ActualDischargeProd" DataField="ActualProductName" HeaderText="Actual Product">
                                        </telerik:GridBoundColumn>
                                        <telerik:GridBoundColumn UniqueName="PlannedDischargeQty" DataField="PlannedQuantity" HeaderText="Planned Quantity">
                                        </telerik:GridBoundColumn>
                                        <telerik:GridBoundColumn UniqueName="ActualDischargeQty" DataField="ActualQuantity" HeaderText="Actual Quantity">
                                        </telerik:GridBoundColumn>
                                        <telerik:GridBoundColumn UniqueName="PlannedTank" DataField="TankIndex" HeaderText="Planned Tank">
                                        </telerik:GridBoundColumn>
                                        <telerik:GridBoundColumn UniqueName="ActualTank" DataField="ActualTankIndex" HeaderText="Actual Tank">
                                        </telerik:GridBoundColumn>
                                        <telerik:GridBoundColumn UniqueName="LeftOnBoard" DataField="LOB" HeaderText="LOB">
                                        </telerik:GridBoundColumn>
                                        <telerik:GridBoundColumn UniqueName="Adjustment" DataField="Adjustment" HeaderText="Adjustment">
                                        </telerik:GridBoundColumn>
                                    </Columns>
                                </MasterTableView>
                            </telerik:RadGrid>
                        </telerik:RadPageView>
                    <telerik:RadPageView runat="server" ID="DischargePageViewProducts">
                    <telerik:RadGrid ID="ProductLevelDischargeRadGrid" runat="server" AutoGenerateColumns="false"
                                CssClass="TransferGridPanel" Height="233px" Width="475px" OnItemDataBound="ProductLevelDischargeRadGrid_ItemDataBound">
                            <MasterTableView ShowHeadersWhenNoRecords="true">
                                <Columns>
                                    <telerik:GridBoundColumn UniqueName="PlannedDischargeProd" DataField="PlannedProductName" HeaderText="Planned Product" Visible="false">
                                        </telerik:GridBoundColumn>                                       
                                        <telerik:GridBoundColumn UniqueName="ActualDischargeProd" DataField="ActualProductName" HeaderText="Actual Product">
                                        </telerik:GridBoundColumn>
                                        <telerik:GridBoundColumn UniqueName="PlannedDischargeQty" DataField="PlannedQuantity" HeaderText="Planned Quantity">
                                        </telerik:GridBoundColumn>
                                        <telerik:GridBoundColumn UniqueName="ActualDischargeQty" DataField="ActualQuantity" HeaderText="Actual Quantity">
                                        </telerik:GridBoundColumn>                                       
                                        <telerik:GridBoundColumn UniqueName="ActualTank" DataField="ActualTankIndex" HeaderText="Actual Tank">
                                        </telerik:GridBoundColumn>
                                        <telerik:GridBoundColumn UniqueName="CaluculatedDifference" DataField="CaluculatedDifference" HeaderText="Caluculated Difference">
                                        </telerik:GridBoundColumn>
                                        <telerik:GridBoundColumn UniqueName="PreDip" DataField="PreDip" HeaderText="PreDip">
                                        </telerik:GridBoundColumn>
                                        <telerik:GridBoundColumn UniqueName="PostDip" DataField="PostDip" HeaderText="PostDip">
                                        </telerik:GridBoundColumn>
                                        <telerik:GridBoundColumn UniqueName="PreSMR" DataField="PreSMR" HeaderText="SMR Start">
                                        </telerik:GridBoundColumn>
                                        <telerik:GridBoundColumn UniqueName="PostSMR" DataField="PostSMR" HeaderText="SMR End">
                                        </telerik:GridBoundColumn>
                                        <telerik:GridBoundColumn UniqueName="LeftOnBoard" DataField="LOB" HeaderText="LOB">
                                    </telerik:GridBoundColumn>
                                        <telerik:GridBoundColumn UniqueName="Adjustment" DataField="Adjustment" HeaderText="Adjustment">
                                    </telerik:GridBoundColumn>
                                    </Columns>
                                </MasterTableView>
                            </telerik:RadGrid>
                    </telerik:RadPageView>
                    </telerik:RadMultiPage>
                    </NestedViewTemplate>                                <Columns>
                                    <telerik:GridBoundColumn  UniqueName="DeliveryNo" DataField="Discharge_ID">
                                        <ColumnValidationSettings EnableRequiredFieldValidation="true">
                                            <RequiredFieldValidator ForeColor="Red" Text="*This field is required" Display="Dynamic">                               
                                            </RequiredFieldValidator>
                                        </ColumnValidationSettings>
                                    </telerik:GridBoundColumn>
                                    <telerik:GridBoundColumn  UniqueName="ShipTo"
                                        DataField="Site_ID">
                                        <ColumnValidationSettings EnableRequiredFieldValidation="true">
                                            <RequiredFieldValidator ForeColor="Red" Text="*This field is required" Display="Dynamic">                               
                                            </RequiredFieldValidator>
                                        </ColumnValidationSettings>
                                    </telerik:GridBoundColumn>
                                    <telerik:GridBoundColumn  UniqueName="ShipToName"
                                        DataField="SiteAddress" ReadOnly="true">
                                    </telerik:GridBoundColumn>
                                    <telerik:GridBoundColumn  UniqueName="DischargeStart"
                                        DataField="DischargeStartTime" ReadOnly="true">
                                    </telerik:GridBoundColumn>
                                    <telerik:GridBoundColumn  UniqueName="DischargeEnd"
                                        DataField="DischargeEndTime">
                                    </telerik:GridBoundColumn>
                                </Columns>
                            </MasterTableView>
                            <ClientSettings>                           
                           
                            <Scrolling AllowScroll="true"/></ClientSettings>
                        </telerik:RadGrid>ASPX.CS FILEprotected void DischargeTabStip_TabClick(object sender, RadTabStripEventArgs e)
 {
 //AddPageView(e.Tab.Text);
e.Tab.PageView.Selected = true;
 string selectedtabindex = e.Tab.Text;
 Session["tabindex"] = e.Tab.Text;
 Int64 shipmentID = Convert.ToInt64(ShiftTreeView.SelectedNode.Value);
 //Int64 load = 0;
 //load = Convert.ToInt64(Session[_lastLoadingSelect1].ToString());
 Int64 discharge = 0;
 discharge = Convert.ToInt64(Session[_lastDischargeSelect1].ToString());
 switch (selectedtabindex)
 {
 case "Details":
 {
RadPageView page = (RadPageView)e.Tab.PageView;
ImageButton btneditPONumber = (ImageButton)page.FindControl("btn_editPONumber");
btneditPONumber.Click += new System.Web.UI.ImageClickEventHandler(btn_editPONumber_Click);  List<DischargeEntity> dischargeDetails = new List<DischargeEntity>();
dischargeDetails = dischargeManager.GetDischargeDetailsByDischargeId(discharge);//.GetDischargeByID(discharge);
 Session[_sesDischargeList] = dischargeDetails;
 //Label lblShipTo = (Label)page.FindControl("lbl_ShipToValue");
 //Label lblSiteName = (Label)page.FindControl("lbl_SiteNameValue");
 //Label lblAddress = (Label)page.FindControl("lbl_AddressValue");
 //Label lblSplInstructions = (Label)page.FindControl("lbl_SplInstructionValue");
 //Label lblPONumber = (Label)page.FindControl("lbl_PONumberValue");TextBox txtShipTo = (TextBox)page.FindControl("txt_ShipToValue");
TextBox txtSiteName = (TextBox)page.FindControl("txt_SiteNameValue");
TextBox txtAddress = (TextBox)page.FindControl("txt_AddressValue");
TextBox txtSplInstructions = (TextBox)page.FindControl("txt_SplInstructionValue");
TextBox txtPONumber = (TextBox)page.FindControl("txt_PONumberValue");
 if (dischargeDetails.Count > 0)
 {
txtShipTo.Text = dischargeDetails[0].Site_ID.ToString();
txtSiteName.Text = dischargeDetails[0].SiteName;
txtAddress.Text = dischargeDetails[0].SiteAddress + dischargeDetails[0].SiteName2;
txtSplInstructions.Text = dischargeDetails[0].DeliveryWindow;
txtPONumber.Text = dischargeDetails[0].PONumber.ToString();
 }
 else
 {
txtShipTo.Text = MyGlobal.SDP_GUI_RADGRID_NO_RECORDS_FOUND;
txtSiteName.Text = MyGlobal.SDP_GUI_RADGRID_NO_RECORDS_FOUND;
txtAddress.Text = MyGlobal.SDP_GUI_RADGRID_NO_RECORDS_FOUND;
txtSplInstructions.Text = MyGlobal.SDP_GUI_RADGRID_NO_RECORDS_FOUND;
txtPONumber.Text = MyGlobal.SDP_GUI_RADGRID_NO_RECORDS_FOUND;
 } break;
 }
 case "Compartments":
 {
RadPageView page = (RadPageView)e.Tab.PageView;
RadGrid grdDisharge = (RadGrid)page.FindControl("CompartmentLevelDischargeRadGrid"); //List<DischargeDetailExtraEntity> dischargeTabListinstance = new List<DischargeDetailExtraEntity>();
 //dischargeTabListinstance = dischargeDetailManager.GetDischargeDetailWSListByDischargeId(discharge);
 //Session["_storeCompartmentDischargeTable"] = dischargeTabListinstance;
 List<DischargeDetailExtraEntity> dischargeTabListinstance = (List<DischargeDetailExtraEntity>)Session["_storeCompartmentDischargeTable"];
grdDisharge.DataSource = dischargeTabListinstance;
grdDisharge.DataBind();
 break;
 }
 case "Products":
 {
RadPageView page = (RadPageView)e.Tab.PageView;
RadGrid grdDishargeProducts = (RadGrid)page.FindControl("ProductLevelDischargeRadGrid");
 //List<DischargeDetailExtraEntity> ProductTabinstance = new List<DischargeDetailExtraEntity>();
 //ProductTabinstance = dischargeDetailManager.GetDischargeDetailByDischargeIdAtProductlevel(discharge);
 //Session["_storeProductDischargeTable"] = ProductTabinstance;
 List<DischargeDetailExtraEntity> ProductTabinstance = (List<DischargeDetailExtraEntity>)Session["_storeProductDischargeTable"];
grdDishargeProducts.DataSource = ProductTabinstance;
grdDishargeProducts.DataBind();
 break;
 }
 }
 }
protected void btn_editPONumber_Click(object sender, System.Web.UI.ImageClickEventArgs e)
    {
        DischargeDal dischargedal=new DischargeDal();
        RadTabStrip rad = (RadTabStrip)DischargeRadGrid.Page.FindControl("DischargeTabStrip");
        ImageButton btneditPONumber = (ImageButton)DischargeRadGrid.Page.FindControl("btn_editPONumber");
        TextBox txtPONumber = (TextBox)DischargeRadGrid.Page.FindControl("txt_PONumberValue");
       //DischargeTabStrip.
       List<DischargeEntity> currentList = (List<DischargeEntity>)Session[_sesDischargeList];
       //DischargeEntity de = currentList[(Int32)Session[_vsCurrentDischargeIndex]];
       DischargeEntity de = currentList[0];
       Int64 discharge = 0;
       discharge = Convert.ToInt64(Session[_lastDischargeSelect1].ToString());
       if (!editableMode)
        {
            return;
        }
       if (btneditPONumber.ImageUrl.EndsWith("PenEditIcon.gif"))
        {
            if (!(Boolean)de.Planned)
            {
                txtPONumber.Enabled = true;
            }
            else
            {
                txtPONumber.Enabled = false;
            }
           
            btneditPONumber.ImageUrl = "~/images/UpdateTick.gif";
            //ChkBox_UpdateShipment.Checked = false;
        }
        else if (btneditPONumber.ImageUrl.EndsWith("UpdateTick.gif"))
        {
            var dischargeEntity = new DischargeEntity
            {
                Discharge_ID = discharge,
                PONumber=Convert.ToInt64(txtPONumber),            };
            dischargeEntity.Discharge_ID = dischargedal.UpdatePONumberByDischargeId(dischargeEntity).Discharge_ID;
        }
        btneditPONumber.ImageUrl = "~/images/PenEditIcon.gif";
        txtPONumber.Enabled = false;
    }
Please check the above code i have written in the btn_editPONumber_Click method.in that method i am unable to the control for the imagebutton and textbox.
How to find the control for the image button and textbox in this method.
Sudhakar
Top achievements
Rank 1
 answered on 07 Nov 2014
2 answers
105 views
Hello,

I'm urgently trying to bind a RadTreeList to an EntityDataSource.

    <telerik:RadTreeList runat="server" DataKeyNames="Id" ParentDataKeyNames="TreeElementId" DataSourceID="MediaAssetGroups" AutoGenerateColumns="false" ID="rtlCategories" OnItemInserted="rtlCategories_ItemInserted">
        <Columns>
            <telerik:TreeListBoundColumn DataField="Id" HeaderText="ID" ReadOnly="false"
                UniqueName="EmployeeID" HeaderStyle-Width="60px" ForceExtractValue="Always" Visible="false">
            </telerik:TreeListBoundColumn>
            <telerik:TreeListBoundColumn DataField="Name" HeaderText="Name" ReadOnly="false"
                Visible="true">
            </telerik:TreeListBoundColumn>
            <telerik:TreeListBoundColumn DataField="Description" HeaderText="Beschreibung" ReadOnly="false"
                Visible="true">
            </telerik:TreeListBoundColumn>
            <telerik:TreeListCheckBoxColumn DataField="IsGlobalCategory" DefaultInsertValue="true" HeaderText="Globale Kategorie">
            </telerik:TreeListCheckBoxColumn>
            <telerik:TreeListCheckBoxColumn DataField="ContainsGlobalContent" DefaultInsertValue="false" HeaderText="Globaler Inhalt" Visible="true">
            </telerik:TreeListCheckBoxColumn>
            <telerik:TreeListCheckBoxColumn DataField="IsActive" DefaultInsertValue="true" HeaderText="Aktiv">
            </telerik:TreeListCheckBoxColumn>
            <telerik:TreeListCheckBoxColumn DataField="IsDeleted" DefaultInsertValue="false" HeaderText="Gelöscht" Visible="false">
            </telerik:TreeListCheckBoxColumn>
            <telerik:TreeListBoundColumn DataField="TreeElementId" ReadOnly="false">
            </telerik:TreeListBoundColumn>
            <telerik:TreeListBoundColumn DataField="UserId" HeaderText="Creator" ReadOnly="false"
                Visible="false" />

            <telerik:TreeListDateTimeColumn DataField="CreationDate" HeaderText="Erstelldatum" ReadOnly="false" Visible="false"></telerik:TreeListDateTimeColumn>
            <telerik:TreeListEditCommandColumn UniqueName="InsertCommandColumn" ButtonType="ImageButton" HeaderStyle-Width="80px" ItemStyle-HorizontalAlign="Center">
            </telerik:TreeListEditCommandColumn>
        </Columns>
        <EditFormSettings EditFormType="Template" PopUpSettings-Width="700px">
            <FormTemplate>
                <asp:TextBox ID="userid1" runat="server" Text='<%# Bind("UserId") %>' Visible="false"></asp:TextBox>

                <telerik:RadDateTimePicker ID="creationdate1" runat="server" SelectedDate='<%# Bind("CreationDate") %>' Visible="false"></telerik:RadDateTimePicker>
                <asp:ValidationSummary runat="server" HeaderText="Bei Ihrer Eingabe gab es Fehler:" />
                <asp:Table runat="server">
                    <asp:TableRow>
                        <asp:TableHeaderCell>
                            Name
                        </asp:TableHeaderCell>
                        <asp:TableCell>
                            <asp:TextBox ID="tbName" runat="server" Text='<%# Bind("Name") %>' />
                            <asp:RequiredFieldValidator runat="server" ControlToValidate="tbName" ErrorMessage="Name muss angegeben werden.">
                                    *
                            </asp:RequiredFieldValidator>
                        </asp:TableCell>
                    </asp:TableRow>
                    <asp:TableRow>
                        <asp:TableHeaderCell>
                            Beschreibung
                        </asp:TableHeaderCell>
                        <asp:TableCell>
                            <asp:TextBox ID="tbDescription" runat="server" Text='<%# Bind("Description") %>' Width="300" Height="200" TextMode="MultiLine" />
                            <asp:RequiredFieldValidator runat="server" ControlToValidate="tbDescription" ErrorMessage="Beschreibung muss angegeben werden.">
                                    *
                            </asp:RequiredFieldValidator>
                        </asp:TableCell>
                    </asp:TableRow>
                    <asp:TableRow>
                        <asp:TableHeaderCell>
                            Globale Kategorie
                        </asp:TableHeaderCell>
                        <asp:TableCell>
                            <asp:CheckBox ID="CheckBox1" runat="server" Checked='<%# Bind("IsGlobalCategory")%>'></asp:CheckBox>
                        </asp:TableCell>
                    </asp:TableRow>
                    <asp:TableRow>
                        <asp:TableHeaderCell>
                            Globaler Inhalt
                        </asp:TableHeaderCell>
                        <asp:TableCell>
                            <asp:CheckBox ID="cbIsActive" runat="server" Checked='<%# Bind("ContainsGlobalContent")%>'></asp:CheckBox>
                        </asp:TableCell>
                    </asp:TableRow>
                    <asp:TableRow>
                        <asp:TableHeaderCell>
                            Aktiviert
                        </asp:TableHeaderCell>
                        <asp:TableCell>
                            <asp:CheckBox ID="CheckBox2" runat="server" Checked='<%# Bind("IsActive")%>'></asp:CheckBox>
                        </asp:TableCell>
                    </asp:TableRow>
                    <asp:TableRow>
                        <asp:TableCell>
                            <asp:Button ID="btnUpdate2" Text='<%# (Container is TreeListEditFormInsertItem) ? "Insert" : "Update" %>'
                                runat="server" CommandName='<%# (Container is TreeListEditFormInsertItem) ? "PerformInsert" : "Update" %>'></asp:Button>
                        </asp:TableCell>
                        <asp:TableCell>

                            <asp:Button ID="btnCancel2" Text="Cancel" runat="server" CausesValidation="False"
                                CommandName="Cancel"></asp:Button>
                        </asp:TableCell>
                    </asp:TableRow>
                </asp:Table>
            </FormTemplate>
        </EditFormSettings>
    </telerik:RadTreeList>

    <asp:EntityDataSource ID="MediaAssetGroups" runat="server"
        ConnectionString="name=X_DatabaseContainer"
        DefaultContainerName="X_DatabaseContainer" EnableFlattening="False"
        EntitySetName="TreeElementSet" EntityTypeFilter="MediaCategory" EnableInsert="True" EnableDelete="True" EnableUpdate="True"
        Include="" OrderBy="it.Name ASC"
        Where="it.IsDeleted = false">
    </asp:EntityDataSource>

The Problem now is, that everything works fine except of inserting items below other items. Then the freshly created item will show up below root and not the selected parent.

The Id and the TreeElementId are of type Guid.

Has anybody a suggestion for this behaviour?
Kostadin
Telerik team
 answered on 07 Nov 2014
1 answer
57 views
Trying to bind a value to a radbutton that sits in my detailtable commantiemtemplate.  Code works but no values are ever put through, checekd to make sure there is data and the database returns a value but when I click on button and alert nothing comes through the event_args.  If I put on the main grid table it all works just fine but not on detail table.

<DetailTables>
                                       <telerik:GridTableView AutoGenerateColumns="false" Font-Size="9" Name="LeaseDates" BorderWidth="2px" DataKeyNames="intLeaseDateId" Width="30%" CommandItemDisplay="Top" >
                                           <ItemStyle HorizontalAlign="Center" BorderWidth="2px" /><AlternatingItemStyle BackColor="#B0C4DE"  HorizontalAlign="Center" /><HeaderStyle HorizontalAlign="Center" />
                                               <CommandItemStyle Height="25px" HorizontalAlign="Left" Font-Underline="true"  />
                                               <CommandItemTemplate>
                                                   <telerik:RadButton ID="btnDates" runat="server" ButtonType="SkinnedButton" Text="Manage Dates" AutoPostBack="false" OnClientClicked="LoadDates" CommandArgument='<%# Bind("intLeaseID")%>'></telerik:RadButton>
                                               </CommandItemTemplate>
                                               <Columns>
                                                   <telerik:GridBoundColumn HeaderText="Start Date" DataField="dtStartDate" UniqueName="Start" />
                                                   <telerik:GridBoundColumn HeaderText="End Date" DataField="dtEndDate" UniqueName="End" />
                                               </Columns>
 
 
 Protected Sub myradGrid_DetailTableDataBind(sender As Object, e As GridDetailTableDataBindEventArgs) Handles myradGrid.DetailTableDataBind
 
       sql = "Select intleaseDateId, intLeaseID, dtstartDate, dtEndDate from vw_LeaseDates where intLeaseID  = " & e.DetailTableView.ParentItem.GetDataKeyValue("intLeaseID") & ""
 
       e.DetailTableView.DataSource = getReader(sql)
   End Sub
 
 function LoadDates(sender, eventargs) {
               var radLease = $find("<%= radLease.ClientID%>");
               var LeaseId = sender.get_commandArgument();
               alert(LeaseId);
               radLease.setUrl("../TaccAdmin/Dates.aspx?Lease=" + LeaseId);
               radLease.set_width("700");
               radLease.set_height("400");
               radLease.show();
           }








Konstantin Dikov
Telerik team
 answered on 07 Nov 2014
7 answers
190 views
I have a telerik:RadDatePicker control in my ascx file. I need to make it accessible by associating a label. When I put in:

         
<telerik:RadDatePicker ID="RadDatePicker1" ShowPopupOnFocus="True" runat="server" ToolTip="Start Date" DateInput-Display="True" DateInput-Label="Start:">
</telerik:RadDatePicker>


I get two labels instead of one. (see attached image).

Here is the html it is producing:

<td>
    <label for="main_0_content_0_ctl03_RadDatePicker1_dateInput"   id="main_0_content_0_ctl03_RadDatePicker1_dateInput_Label">
Start:
    </label>
</td>
<td class="rcInputCell" style="width:100%;">
    <span id="main_0_content_0_ctl03_RadDatePicker1_dateInput_wrapper" class="riSingle RadInput RadInput_Default" style="display:block;width:100%;">
        <label class="riLabel" for="main_0_content_0_ctl03_RadDatePicker1_dateInput" id="main_0_content_0_ctl03_RadDatePicker1_dateInput_Label" style="width:40%;">
Start:
        </label>
        <span class="riContentWrapper" style="width:60%;">
        <input id="main_0_content_0_ctl03_RadDatePicker1_dateInput" name="main_0$content_0$ctl03$RadDatePicker1$dateInput" class="riTextBox riEnabled" type="text" />
        </span>
        <input id="main_0_content_0_ctl03_RadDatePicker1_dateInput_ClientState" name="main_0_content_0_ctl03_RadDatePicker1_dateInput_ClientState" type="hidden" />
    </span>
</td>
<td>
    <a title="Open the calendar popup." href="#" id="main_0_content_0_ctl03_RadDatePicker1_popupButton" class="rcCalPopup">
Open the calendar popup.
    </a>
    <div id="main_0_content_0_ctl03_RadDatePicker1_calendar_wrapper" style="display: none" >
        <table id="main_0_content_0_ctl03_RadDatePicker1_calendar" summary="Calendar" cellspacing="0" class="RadCalendar RadCalendar_Default">
...

Why?

Thanks,
Gregory
Viktor Tachev
Telerik team
 answered on 07 Nov 2014
9 answers
183 views
Hi Telerik community!

I'm a newbie working on a legacy Web Forms application. We are using Telerik:RadEditor to handle some remote file uploads. The problem is we have moved the storage of these files from a relative path on the webserver to a off-web-root storage path using a UNC path.

Our prior methodology used this call to set the DocumentManager paths

                string[] viewReadmeDocuments = new string[] { "~/Store/" + drpProducts.SelectedItem.Text + "/ReadmeFiles" };

                The locals debug output would be  "~/Store/My Product/ReadmeFiles".

When I try to update the path to use a UNC path, I get nothing.

                string storepath = "\\\\\\\\mystorageserver\\\\share";
                string[] deleteReadmeDocument = new string[] { storePath + "\\" + drpProducts.SelectedItem.Text + "\\ReadmeFiles" };

                 The locals debug output shows the proper path: "\\\\\\\\mystorageserver\\\\share\\My Product\\ReadmeFiles;

I am using version 2013.2.717.40 of Telerik.Web.UI.

Any help would be appreciated. Thank you.



Vessy
Telerik team
 answered on 07 Nov 2014
1 answer
306 views
Hi Guys,

There is an important Issue which i need to discuss with regard to RADTABSTRIP.

On Click of " Currently Selected TAB " which i am already viewing, the TAB_Click Event is not firing, but when i click the other tab, then the event is fired. But for my implementation, i require to click on same tab and tab_click event should fire.

AutoPostback is true.

Request your help in understanding as to why "Event is not fired" when you click the same tab which you are currently viewing.


Thanks in Advance,
Nencho
Telerik team
 answered on 07 Nov 2014
3 answers
103 views
Hi.

Actually i´m using a PivotGrid and when a FieldsWindow is displayed and the fields are offered to choose, some of them are created by the control.

How is possible to hide or desactivate them?

Thanks in advance.
Guillermo
Top achievements
Rank 1
 answered on 07 Nov 2014
7 answers
448 views
Hi,

On the page for the AutoCompleteBox (http://www.telerik.com/products/aspnet-ajax/autocomplete-box.aspx) where they talk about the Positioning, the entries have a flag and a text.
How can we do this ?
I did not find anything in the samples that look like it.

More specifically I would like to be able to change the background color of the entries based on a property of the entry. (ex: France would be blue, United States would be Green,...)
Boyan Dimitrov
Telerik team
 answered on 07 Nov 2014
3 answers
255 views
Hi all,

I currently have a list of objects in session memory.  I am wondering if there is an efficient way of rendering the changes of a specific object to a repeater without having to call DataBind() on the whole list.

John
Konstantin Dikov
Telerik team
 answered on 06 Nov 2014
Narrow your results
Selected tags
Tags
+? more
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?