Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
113 views
I'm attempting to set the text value of the owner button on a ribbon bar split button using the following javascript:

$find("<%= MainRibbonBar.ClientID %>").findButtonByValue(button).get_owner().set_text("newtext");


When I do this, the text does not visibly change and when I examine the HTML I see the following:

<span class="rrbButtonMid rrbSplitButton">
<span class="rrbButtonIn">
<span class="rrbImagePlaceholder">
<img alt="Item Image" src="/Images/Icons/Save.png" class="rrbButtonImage" style="visibility: visible;">
</span>
<span class="rrbButtonText"><span class="rrbTextContent">newtext</span></span>
<span class="rrbButtonArrow"><span class="rrbIcon"></span><span class="rrbButtonText"><span class="rrbTextContent">oldtext</span></span>
</span>
</span>
</span>

As you can see, the first rrbTextContent span has indeed got the new text value, however, inside the rrbButtonArrow object there is another rrbTextContent object which still contains the old text.

Since this element appears on top, it entirely covers the updated text meaning that the command changes nothing.

How can I resolve this?  I only just noticed this issue after upgrading my telerik components so it's possible that this is the result of a recently introduced bug.  I may also have changed something somewhere myself that stopped this from working.
Ivan Danchev
Telerik team
 answered on 30 Mar 2015
7 answers
129 views
How do I update using RadGrid1_UpdateCommand for the below example.
http://demos.telerik.com/aspnet-ajax/toolbar/examples/applicationscenarios/gridcommanditem/defaultvb.aspx?product=grid

The values are updated in the radgrid but not to the database.

Protected Sub RadGrid1_UpdateCommand(ByVal sender As Object, ByVal e As Telerik.Web.UI.GridCommandEventArgs) Handles RadGrid1.UpdateCommand

'If e.CommandName = RadGrid.UpdateCommandName Then

If e.CommandName = "UpdateEdited" Then

If TypeOf e.Item Is GridDataItem Then

Dim editItem As GridDataItem = CType(e.Item, GridDataItem)

Dim id As String = editItem.GetDataKeyValue("FIRM_CODE").ToString()

If id IsNot Nothing Then

                    //I am stuck here. How do I fetch the values for COMET_DESCRIPTOR and COMET_TRANS_NOTES

 

Dim UpdateCommand As String = "update tablename set COMET_DESCRIPTOR = '@COMET_DESCRIPTOR', COMET_TRANS_NOTES ='@COMET_TRANS_NOTES' where FIRM_CODE = '" & id & "' and REF_YY||REF_MM ='@REF_YY'||'@REF_MM'"

End If

End If

End If

End Sub

Viktor Tachev
Telerik team
 answered on 30 Mar 2015
2 answers
237 views
General scenario: I have a radgrid using auto-generated in-place record editing. Datasources are LLBLgen entity collections. One of the columns is username (as in AD account name), but is a GridAutocompleteColumn with the users' display name as the DataTextField so it will be easier for user to make the correct selection. The autocomplete part works (mostly) correctly. What I thought would happen next is when user clicks Update link to confirm selection, the Adname value would be inserted into the grid (and therefore the backing table). But instead, the displayname is being inserted. What am I doing wrong?


<telerik:RadGrid ID="gridUserAssignment" runat="server" DataSourceID="llblgUserAssignmentData"
        AllowAutomaticUpdates="true" AutoGenerateEditColumn="true" AllowAutomaticDeletes="false" AutoGenerateDeleteColumn="false"
        OnNeedDataSource="gridUserAssignment_NeedDataSource"
        OnDeleteCommand="gridUserAssignment_DeleteCommand"
        OnEditCommand="gridUserAssignment_EditCommand"
        OnItemCommand="gridUserAssignment_ItemCommand"
        OnPdfExporting="gridUserAssignment_PdfExporting">
        <ClientSettings>
            <Selecting AllowRowSelect="True" />
        </ClientSettings>
        <MasterTableView AutoGenerateColumns="False" DataKeyNames="RoleId" DataSourceID="llblgUserAssignmentData" EditMode="InPlace"  CommandItemDisplay="Top" >
            <CommandItemSettings ShowExportToPdfButton="true" ShowExportToCsvButton="true" ShowAddNewRecordButton="False" ShowRefreshButton="false">
            </CommandItemSettings>
            <Columns>                    
                <telerik:GridTemplateColumn HeaderText="#" UniqueName="RowNumber" HeaderStyle-Width="3%">
                    <ItemTemplate>
                        <asp:Label runat="server" ID="lblRowNumberAccessUsers" Width="50px" Text='<%# Container.DataSetIndex+1 %>'></asp:Label>
                    </ItemTemplate>
                </telerik:GridTemplateColumn>
 
                <telerik:GridAutocompleteColumn DataField="Adname" FilterControlAltText="Filter Adname column" HeaderText="User AD Username" SortExpression="Adname" UniqueName="Adname"
                    DataSourceID="llblgADusers"
                    DataValueField="SAmaccountName"
                    DataTextField="SAmaccountName"
                    Filter="Contains"                           
                    InputType="Text"
                    SelectionMode="Single"
                    AllowCustomEntry="false"
                >
                <telerik:GridBoundColumn DataField="ADuserDetail.Title" ReadOnly="true" FilterControlAltText="Filter User Title column" HeaderText="User Title" SortExpression="Usertitle" UniqueName="Usertitle">
                </telerik:GridBoundColumn>
                <telerik:GridBoundColumn DataField="ADuserDetail.Email" ReadOnly="true" FilterControlAltText="Filter email column" HeaderText="User email" SortExpression="email" UniqueName="email">
                </telerik:GridBoundColumn>          
            </Columns
 
    </MasterTableView>          
</telerik:RadGrid>
<llblgenpro:LLBLGenProDataSource ID="llblgUserAssignmentData" runat="server" DataContainerType="EntityCollection" EntityCollectionTypeName="UserManagement.CollectionClasses.UserRoleUserCollection, UserManagement" >
</llblgenpro:LLBLGenProDataSource>
<llblgenpro:LLBLGenProDataSource ID="llblgADusers" runat="server" DataContainerType="EntityCollection" EntityCollectionTypeName="UserManagement.CollectionClasses.AduserDetailCollection, UserManagement" >
</llblgenpro:LLBLGenProDataSource>

Side note (I think): when in edit mode, when I start typing, if I pause for a small while, the autocomplete returns a set of matches but does not rerun and refresh the results as I type additional characters. For now, I get around this by typing really fast so the search gets the whole search string at once.
- Justin
Justin
Top achievements
Rank 1
 answered on 30 Mar 2015
2 answers
86 views
Situation:

I have a RadTooltipManager, containing a web user control (WUC). This WUC in turn contains a number of telerik controls. Among these controls, a RadButton and a RadCalendar. I want to have access to this RadCalendar's selected date property on the client, when clicking the RadButton.

So if I tie an OnClientClicked event to the button and put this event in the WUC. I get a reference error. I'm assuming this is because the <script> portion of the WUC isn't loaded when the button is loaded. (I load the control via Page.LoadControl on the containing page).

If I put the OnClientClicked function on the containing page, it loads just fine. Then comes, however, the problem of referring to the RadCalendar contained in the tooltip and WUC. Usually I'll do a $find() and enter the contorlname.ClientID, but that will give an error here, as the containing page is aware of no such control.

So my next idea was to use the telerik static client side library to get a reference to the control in question. And this seems to work! If I do a $telerik.radControls, I get an array of all the loaded controls on the page. Which seems to include those in the WUC.

How do I get access to the Telerik client side library from one of these objects?
C
Top achievements
Rank 1
 answered on 30 Mar 2015
4 answers
250 views
I am creating a RadGrid Dynamically in code behind based on a DataSet returned from a Stored Procedure. I have enabled Export to Excel, CSV and PDF Options.
The Exported Excel and CSV is missing the Multi-column headers. The PDF Export retains the Multi-Colum Headers.

I am using  ExcelML format while exporting to Excel. However when I use HTML format, Its showing Multi-Column Headers, but the export also contains hyperlinks ( in rows related to data and the column titles) and additional  controls( related to filter I guess). I have also used the setting ExportOnlyData to true.

Is there a way to remove the hyperlinks and additional controls. Also, Is there a way I could get the Multi-Column Headers in CSV.

Thanks,
Kiran
Kostadin
Telerik team
 answered on 30 Mar 2015
1 answer
170 views
Hi,

I want to setup a RadGrid Object with batch editing using multiple disconnected DataTable data sources. How do I making sorting work as it should on in the Template Columns containing RadComboBox/Label controls? The columns I want to sort alphabetically in the example below are Entrée, and Salad.

Rad Grid aspx:

001.<%@ Page Title="" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="TesterApp.Default" %>
002.<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
003.</asp:Content>
004.<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
005.    <form id="form1" runat="server">
006.             <asp:Label ID="GridStatusLabel" runat="server" Text="Nothing Yet" ForeColor="#33CC33"></asp:Label>
007.<br />
008.      <telerik:RadScriptManager ID="RadScriptManager1" runat="server"/>
009. 
010.      <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" MinDisplayTime="1000" Skin="Silk">
011.      </telerik:RadAjaxLoadingPanel>
012. 
013.      <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server" DefaultLoadingPanelID="RadAjaxLoadingPanel">
014.         <AjaxSettings>
015. 
016.            <telerik:AjaxSetting AjaxControlID="SampleGrid">
017.               <UpdatedControls>
018.                  <telerik:AjaxUpdatedControl ControlID="SampleGrid" LoadingPanelID="RadAjaxLoadingPanel1" />
019.                  <telerik:AjaxUpdatedControl ControlID="GridStatusLabel"/>
020.               </UpdatedControls>
021.            </telerik:AjaxSetting>
022. 
023.         </AjaxSettings>
024.      </telerik:RadAjaxManager>
025. 
026.      <telerik:RadGrid
027.         ID="SampleGrid"
028.         runat="server"
029.         AllowPaging="True"
030.         AllowSorting="True"
031.         ShowStatusBar="True"
032.         GroupPanelPosition="Top"
033. 
034.         AllowAutomaticUpdates="True"
035.         AllowAutomaticInserts="True"
036.         AllowAutomaticDeletes="True"
037. 
038.         OnNeedDataSource="SampleGrid_NeedDataSource"
039. 
040.         OnItemCommand="SampleGrid_ItemCommand"
041.         OnItemDataBound="SampleGrid_ItemDataBound"
042.         OnBatchEditCommand="SampleGrid_BatchEditCommand"
043. 
044.         Skin="Silk"
045.         Height="467px"
046.      >
047.           <MasterTableView
048.             DataKeyNames="PersonID"
049.             AutoGenerateColumns="false"
050.             EditMode="Batch"
051.             CommandItemStyle-Wrap="false" ItemStyle-Wrap="false"
052.             CommandItemDisplay="TopAndBottom"
053.             CommandItemSettings-ShowExportToExcelButton="true"
054.             CommandItemSettings-ShowExportToPdfButton="true"
055.            >
056.               <BatchEditingSettings
057.                   EditType="Cell"
058.                   OpenEditingEvent="DblClick"
059.                />
060.                    <Columns>
061.                        <telerik:GridBoundColumn
062.                            UniqueName="rgcPersonID"
063.                            DataField="PersonID"
064.                            DataType="System.Int32"
065.                            Display="False"
066.                        >
067.                        </telerik:GridBoundColumn>
068. 
069.                        <telerik:GridBoundColumn
070.                            UniqueName="rgcFirst"
071.                            DataField="First"
072.                            HeaderText="First Name"
073.                            >
074.                        </telerik:GridBoundColumn>
075. 
076.                        <telerik:GridBoundColumn
077.                            UniqueName="rgcInitial"
078.                            DataField= "Initial"
079.                            HeaderText="Mid Initial"
080.                            >
081.                        </telerik:GridBoundColumn>
082. 
083.                        <telerik:GridBoundColumn
084.                            UniqueName="rgcLast"
085.                            DataField= "Last"
086.                            HeaderText="Last Name"
087.                            >
088.                        </telerik:GridBoundColumn>
089. 
090.                        <telerik:GridBoundColumn
091.                            UniqueName="rgcProfession"
092.                            DataField= "Profession"
093.                            HeaderText="Profession"
094.                            ItemStyle-Wrap="false"
095.                            >
096.                        </telerik:GridBoundColumn>
097. 
098.                        <telerik:GridTemplateColumn
099.                            UniqueName="rgcEntree"
100.                            HeaderText="Entree"
101.                            HeaderToolTip="This person's favorite meal, of course!"
102.                            DataField="EntreeID"
103.                            AllowSorting="true"
104.                            SortExpression="EntreeID"
105.                            HeaderStyle-Width="90"
106.                            ItemStyle-Width="50px"
107.                            ItemStyle-HorizontalAlign="Center"
108.                            HeaderStyle-HorizontalAlign="Center"
109.                            Resizable="false"
110.                            ItemStyle-Wrap="false"
111.                        >
112.                            <ItemTemplate>
113.                                <asp:Label ID="lblEntree" runat="server" Text='<%# Eval("EntreeFaveID")%>' ></asp:Label>
114.                            </ItemTemplate>
115.                            <EditItemTemplate>
116.                                <telerik:RadComboBox
117.                                    UniqueName="rcbunEntree"
118.                                    ID="rcbidEntreeID"
119.                                    DataValueField="EntreeID"
120.                                    DataTextField="Name"
121.                                    runat="server"
122.                                    OnPreRender="rcbidEntreeID_PreRender"
123.                                    >
124.                                </telerik:RadComboBox>
125.                            </EditItemTemplate>
126.                        </telerik:GridTemplateColumn>
127. 
128.                        <telerik:GridTemplateColumn
129.                            UniqueName="rgcSalad"
130.                            HeaderText="Salad"
131.                            HeaderToolTip="I think it's healthy."
132.                            DataField="SaladID"
133.                            AllowSorting="true"
134.                            SortExpression="SaladID"
135.                            HeaderStyle-Width="90"
136.                            ItemStyle-Width="50px"
137.                            ItemStyle-HorizontalAlign="Center"
138.                            HeaderStyle-HorizontalAlign="Center"
139.                            Resizable="false" ItemStyle-Wrap="false"
140.                        >
141.                            <ItemTemplate>
142.                                <asp:Label ID="lblSalad" runat="server" Text='<%# Eval("SaladFaveID")%>' ></asp:Label>
143.                            </ItemTemplate>
144.                            <EditItemTemplate>
145.                                <telerik:RadComboBox
146.                                    UniqueName="rcbunSalad"
147.                                    ID="rcbidSaladID"
148.                                    DataValueField="SaladID"
149.                                    DataTextField="Name"
150.                                    runat="server"
151.                                    OnPreRender="rcbidSaladID_PreRender"
152.                                    >
153.                                </telerik:RadComboBox>
154.                            </EditItemTemplate>
155.                        </telerik:GridTemplateColumn>
156. 
157.                        <telerik:GridTemplateColumn
158.                            UniqueName="rgcDateFaveEaten"
159.                            AllowSorting="true"
160.                            ItemStyle-HorizontalAlign="Center"
161.                            HeaderStyle-HorizontalAlign="Center"
162.                            HeaderText="Last Meal Date"
163.                            SortExpression="rgcDateFaveEaten"
164.                            >
165.                            <ItemTemplate>
166.                                <asp:Label runat="server" ID="lblDateFaveEaten" Text='<%# Eval("DateFaveEaten", "{0:MM/dd/yyyy}") %>'>
167.                                </asp:Label>
168.                            </ItemTemplate>
169.                            <EditItemTemplate>
170.                                <telerik:RadDatePicker ID="rdpDateFaveEaten" runat="server" Width="100">
171.                                </telerik:RadDatePicker>
172.                            </EditItemTemplate>
173.                        </telerik:GridTemplateColumn>
174.                    </Columns>
175.            </MasterTableView>
176. 
177.            <ClientSettings
178.                AllowKeyboardNavigation="True"
179.                EnableRowHoverStyle="true"
180.            >
181.            <ClientEvents OnCellSelected=""/>
182.                <Selecting AllowRowSelect="True" CellSelectionMode="SingleCell" />
183.                <Scrolling AllowScroll="True" UseStaticHeaders="True" />
184.                <Resizing AllowColumnResize="True" ClipCellContentOnResize="true" ResizeGridOnColumnResize="false" />
185.            </ClientSettings>
186.            <PagerStyle Height="40px" />
187. 
188.            <FilterMenu EnableEmbeddedSkins="True" Skin ="Silk"></FilterMenu>
189.        </telerik:RadGrid>
190.    </form>
191.</asp:Content>


Code Behind:

001.using System;
002.using System.Data;
003.using System.Linq;
004.using Telerik.Web.UI;
005.using System.Web.UI.WebControls;
006. 
007.namespace TesterApp {
008. 
009.    public partial class Default : System.Web.UI.Page
010.    {
011.        private DataTable Foodies = new DataTable("FoodLiker");
012.        private DataTable Entrees = new DataTable("Entree");
013.        private DataTable Salads = new DataTable("Salad");
014. 
015.        protected void Page_Load(object sender, EventArgs e)
016.        {
017.            Entrees.Columns.Add("EntreeID", typeof(Int32));
018.            Entrees.Columns.Add("Name", typeof(string));
019.            Entrees.Columns.Add("Description", typeof(string));
020. 
021.            Salads.Columns.Add("SaladID", typeof(Int32));
022.            Salads.Columns.Add("Name", typeof(string));
023.            Salads.Columns.Add("Description", typeof(string));
024. 
025.            Foodies.Columns.Add("PersonID",      typeof(Int32));
026.            Foodies.Columns.Add("First",         typeof(string));
027.            Foodies.Columns.Add("Initial",       typeof(char));
028.            Foodies.Columns.Add("Last",          typeof(string));
029.            Foodies.Columns.Add("Profession",    typeof(string));
030.            Foodies.Columns.Add("EntreeFaveID",    typeof(Int32));
031.            Foodies.Columns.Add("SaladFaveID",     typeof(Int32));
032.            Foodies.Columns.Add("DateFaveEaten", typeof(string));
033. 
034.            Entrees.Rows.Add(100, "No Entree Chosen", "Choose, or Lose. It's how you play the game.");
035.            Entrees.Rows.Add(111, "Spicy Honey-Brushed Chicken Thighs", "Habanero Flavored Chicken Pieces Dipped in Blended Comb Scraped Off with a Denman Grooming Brush");
036.            Entrees.Rows.Add(222, "Easy Baked Fish Fillets", "Preschool Bag of Cod Pieces Made to Prepare with a Ten Watt Light Bulb");
037.            Entrees.Rows.Add(333, "Spaghetti with Sausage and Tomato Sauce", "Pasta Pushed through a Struddler with Chunks of Imitation Meat Substitute and Ketchup");
038.            Entrees.Rows.Add(444, "Miso-Glazed Salmon", "Salmon in a Bowl of Miso Soup");
039.            Entrees.Rows.Add(555, "Chicken Cordon Bleu", "Fancy Poultry Slices Eaten with Your Pinky Finger Sticking Out");
040.            Entrees.Rows.Add(666, "Shrimp and Broccoli Stir-Fry", "Sea Creatures Curled up with Flakey Plastic Tails with Pieces of Broccoli Mixed together with a Paddle inside a Fryolater");
041. 
042.            Salads.Rows.Add(80, "No Salad Chosen",    "Choose Your Destiny");
043.            Salads.Rows.Add(81, "Jello Salad",    "I think this was in a Bill Cosby Commercial");
044.            Salads.Rows.Add(82, "Ambrosia",       "A Salad if it Was Bought in a Candy Store");
045.            Salads.Rows.Add(83, "Celery Victor""Named after the Guy");
046.            Salads.Rows.Add(84, "Coleslaw",       "Mixed with Original Recipe Chicken, you Have Soggy Sweet Chicken");
047.            Salads.Rows.Add(85, "Crab Louie",     "Under the Sea, Everything's Better, Everything's Wetter, Take it from Me");
048.            Salads.Rows.Add(86, "Glorified Rice", "I Thought this was Supposed to be a Salad");
049. 
050.            Foodies.Rows.Add(10000, "Jim",      "K",   "TheJay",     "Filmographer",                         333, 82,"1/10/2015");
051.            Foodies.Rows.Add(20000, "Kevin",    null"Slevin",     "Step Dancer",                          222, 86,"1/10/2015");
052.            Foodies.Rows.Add(30000, "Cathleen", "M",   "Fuhrsberg""Colecovision Repair Dude",             555, 82,"1/10/2015");
053.            Foodies.Rows.Add(40000, "Trey",      null, "Chase",      "Salesman of the Year",                 666, 81,"1/10/2015");
054.            Foodies.Rows.Add(50000, "Chevy",     "B""Taylor",     "Professional Rumorist",                222, 82,"1/10/2015");
055.            Foodies.Rows.Add(60000, "Lance",     "K""Simmons",    "The One Who's Got it All Figured Out", 111, 86,"1/10/2015");
056.            Foodies.Rows.Add(70000, "Sandy",     null, "Seekleston", "Brainwashing Machine Repair Man",      222, 83,"1/10/2015");
057.        }
058. 
059.        protected void SampleGrid_NeedDataSource(object sender, Telerik.Web.UI.GridNeedDataSourceEventArgs e)
060.        {
061.            SampleGrid.DataSource = Foodies;
062.        }
063. 
064.        protected void SampleGrid_ItemCommand(object sender, Telerik.Web.UI.GridCommandEventArgs e)
065.        {
066.            if (e.CommandName == "DeleteRecord")
067.            {
068.                GridStatusLabel.Text = "Deleted a Record.";
069.            }
070.        }
071. 
072.        protected void SampleGrid_BatchEditCommand(object sender, Telerik.Web.UI.GridBatchEditingEventArgs e)
073.        {
074.            foreach (GridBatchEditingCommand command in e.Commands)
075.            {
076.                switch (command.Type)
077.                {
078.                    case GridBatchEditingCommandType.Update:
079.                        GridStatusLabel.Text = "Update a Record from Batch Edit";
080.                    break;
081.                    case GridBatchEditingCommandType.Insert:
082.                        GridStatusLabel.Text = "Insert a Record from Batch Edit";
083.                    break;
084.                    case GridBatchEditingCommandType.Delete:
085.                        GridStatusLabel.Text = "Delete a Record from Batch Edit";
086.                    break;
087.                }
088.            }
089.        }
090. 
091.        protected void SampleGrid_ItemDataBound(object sender, Telerik.Web.UI.GridItemEventArgs e)
092.        {
093.            if (e.Item is GridDataItem)
094.            {
095.             // Setup Handlers for the Grid Data
096.                GridDataItem dataItem = e.Item as GridDataItem;
097.                Label lbl;
098. 
099.             // Populate the Entree Drop Down
100.                lbl = (Label)dataItem["rgcEntree"].FindControl("lblEntree");
101.                if (lbl != null) {
102.                    if (lbl.Text.Length <= 0)
103.                        lbl.Text = "100";
104. 
105.                    Entrees.PrimaryKey = new DataColumn[] { Entrees.Columns["EntreeID"] };
106.                    DataRow currentRecordRow = Entrees.Rows.Find(Convert.ToInt32(lbl.Text));
107.                    lbl.Text = currentRecordRow["Name"].ToString();
108.                }
109. 
110.             // Populate the Salad Drop Down
111.                lbl = (Label)dataItem["rgcSalad"].FindControl("lblSalad");
112.                if (lbl != null) {
113.                    if (lbl.Text.Length <= 0)
114.                        lbl.Text = "100";
115. 
116.                    Salads.PrimaryKey = new DataColumn[] { Salads.Columns["SaladID"] };
117.                    DataRow currentRecordRow = Salads.Rows.Find(Convert.ToInt32(lbl.Text));
118.                    lbl.Text = currentRecordRow["Name"].ToString();
119.                }
120. 
121.            }
122.        }
123. 
124.        protected void rcbidEntreeID_PreRender(object sender, EventArgs e)
125.        {
126.            RadComboBox combo = sender as RadComboBox;
127. 
128.            combo.DataSource = Entrees;
129.            combo.DataValueField = "EntreeID";
130.            combo.DataTextField = "Name";
131.            combo.ToolTip = "Description";
132.            combo.DataBind();
133.        }
134. 
135.        protected void rcbidSaladID_PreRender(object sender, EventArgs e)
136.        {
137.            RadComboBox combo = sender as RadComboBox;
138. 
139.            combo.DataSource = Salads;
140.            combo.DataValueField = "SaladID";
141.            combo.DataTextField = "Name";
142.            combo.ToolTip = "Description";
143.            combo.DataBind();
144.        }
145.    }
146.}

Konstantin Dikov
Telerik team
 answered on 30 Mar 2015
1 answer
57 views
I'm using AsyncUpload control inside a RadAjaxLoadingPanel , I added RadAjaxManager to my page. 
Then the files are uploading fine in IE,
but it throws a script error when I open my page in other Browsers.

Please help me in this scenario.

Thanks in Advance.

Note: Please find the attachment
Hristo Valyavicharski
Telerik team
 answered on 30 Mar 2015
15 answers
173 views
From another post/sample i'm using the javascript below to resize my grid height to make the grid be 100% of a div tag. It works perfect, until i set the <ClientEvents OnGridCreated="oncreated" /> property. In the "oncreated" function i was just saving off a reference to grid for something later. For some reason setting that property cause my grid to resize and to be small.

 function oncreated() {
       var RadGrid1 = RadGrid1.gridObj();
   }

---  this is working without the <ClientEvents OnGridCreated="oncreated" />

<script>
   var $ = $telerik.$; //make jQuery available through $ alias

  
   function oncreated() {
       var RadGrid1 = RadGrid1.gridObj();
   }

   function pageLoad() {
       setGridHeight(); //set grid's height on page load
   }

   $(window).resize(function () {
       setGridHeight(); //maintain grid's height on window resize
   });

   function setGridHeight() {
       var headerHeight = $('.header').outerHeight(),  //header height including margin, padding and borders
footerHeight = $('.footer').outerHeight(),  //footer height including margin, padding and borders
windowHeight = $(window).height(),          //window height
gridObj = $find('<%= RadGrid1.ClientID%>'), //grid's client object

gridHeight = windowHeight - (headerHeight + footerHeight + 2); //calculate grid's height
                    $('#' + gridObj.get_id()).height(gridHeight);                  //set grid's height to the calculated
                    gridObj.repaint();                                             //it is required to repaint the grid so it can recalculate its metrics after window resize
                }
</script>

<telerik:RadGrid ID="RadGrid1" runat="server" AllowPaging="true" PageSize="50" AllowSorting="true" OnNeedDataSource="RadGrid1_NeedDataSource">
<MasterTableView Width="100%" TableLayout="Fixed">
</MasterTableView>
<ClientSettings>
<Scrolling AllowScroll="true" UseStaticHeaders="true" />
                <ClientEvents OnGridCreated="oncreated" />
</ClientSettings>
</telerik:RadGrid>

    <style>
html,
body,
form {
height: 100%;
margin: 0;
padding: 0;
vertical-align: top;
}

.header {
height: 20px;
            background: green;
color: white;
}
.footer {
height: 20px;
background: green;
color: white;
}
</style>

Pavlina
Telerik team
 answered on 30 Mar 2015
3 answers
160 views
Hi,

I have a dashboard having multiple widgets. Some widgets containing radgrid with vertical scroll bar. when I apply UseStaticHeaders on grid then grid does not dispaly on screen in full width becasue some column and scroll bar goes into out of screen(see the image1). when i am undocking the menu of left side then grid display in full width on screen with scroll bar (see the image 2).

So how i will make grid to dispaly full width including scroll bar as well as usestaticheader is true in both condition either on menu doc or undock mode.

Please help.

Warm Regards,
Reyaz

Pavlina
Telerik team
 answered on 30 Mar 2015
1 answer
111 views
Hello,

is it possible to show the headers of the DetailTable in the MasterTableView only once?

You can see my grid in the attachment. I want to show all blue rows on top of the grid. The filtering functionality is required as well. Is there a way to do this? Any help is appreciated.
Konstantin Dikov
Telerik team
 answered on 30 Mar 2015
Narrow your results
Selected tags
Tags
+? more
Top users last month
Anislav
Top achievements
Rank 6
Silver
Bronze
Bronze
Jianxian
Top achievements
Rank 1
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Jim
Top achievements
Rank 2
Iron
Iron
Nurik
Top achievements
Rank 2
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Anislav
Top achievements
Rank 6
Silver
Bronze
Bronze
Jianxian
Top achievements
Rank 1
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Jim
Top achievements
Rank 2
Iron
Iron
Nurik
Top achievements
Rank 2
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?