Telerik Forums
UI for ASP.NET AJAX Forum
0 answers
172 views
Telerik Team,

I am using Rad Grid and have following command item template in the grid where I am using Rad Tool Bar and Rad Tool Bar Button. I want to call client side function to display filter bar in the grid on client click of one of the button. Please suggest which event should I use. I notice that Rad Tool Bar Button does not support OnClientClick event.

<CommandItemTemplate>
            <telerik:RadToolBar Skin="Vista" ID="RadToolBar1" runat="server">
                <Items>
                    <telerik:RadToolBarButton Text="Add new student" ID="btnInitInsert" runat="server"
                        CommandName="Insert" ImageUrl="~/images/telerik/AddRecord.gif" ImagePosition="Left">
                    </telerik:RadToolBarButton>
                    <telerik:RadToolBarButton Text="Delete student"
                        ID="btnDelete" runat="server" CommandName="Delete" ImageUrl="~/images/telerik/Delete.gif"
                        ImagePosition="Left">
                    </telerik:RadToolBarButton>
                    <telerik:RadToolBarButton Text="Toggle filtering" ID="ToggleFiltering" runat="server"
                        CommandName="ToggleFiltering" ImageUrl="~/images/telerik/search.png" ImagePosition="Left">
                    </telerik:RadToolBarButton>
                    <telerik:RadToolBarButton Text="Refresh" ID="btnRefresh" runat="server" CommandName="RebindGrid"
                        ImageUrl="~/images/telerik/Refresh.gif" ImagePosition="Left" CausesValidation="false">
                    </telerik:RadToolBarButton>
                </Items>
            </telerik:RadToolBar>
        </CommandItemTemplate>


Thank you for your assistance in advance.

Pathan L. M.
L. M. Pathan
Top achievements
Rank 1
 asked on 12 Sep 2011
6 answers
131 views

Hi,

We currently have RadEditor 4.6.x installed on our SP2007 farm.  We are building a brand new SP2010 farm and migrate the content dbs over to this new farm via db attached.  Currently, I have installed RadEditor 5.8.10 on the new farm. 

In doing my preupgradecheck and test-spcontentdatabase commands, I am gettings the missing features reported on the databases (see below). As mentioned, I have already installed and deployed RadEditor 5.8.10  on the new farm. Why am I still getting these? Are these removed from the latest version? Please advise how I can resolve this. Thanks


Missing Feature: f374a3ca-f4a7-11db-827c-8dd056d89593, RadEditorFeatureIE

Stanimir
Telerik team
 answered on 12 Sep 2011
3 answers
227 views
When I add a few controls to a page, I always need to adjust the CSS on a per-control basis just to get them to align vertically properly in Chrome.  Things seem to look ok by default in IE and Firefox.

Even just adding the following simple controls looks quite ridiculous without any manual adjustments, as you can see from the screengrab attached from Google Chrome:

<rad:RadFormDecorator ID="RadFormDecorator1" runat="server" Skin="Forest" />
<rad:RadTextBox ID="RadTextBox1" runat="server">
</rad:RadTextBox>
<rad:RadButton ID="RadButton1" runat="server" Text="Test" Icon-PrimaryIconCssClass="rbOk">
</rad:RadButton>
<asp:CheckBox ID="CheckBox1" runat="server" Checked="true" Text="Test Label" />

Any suggestions?
Bozhidar
Telerik team
 answered on 12 Sep 2011
1 answer
355 views
Dear Telerik-Staff,

in my application, I have an aspx-Page which stores a RadGrid. In the RadGrid, each row has a column with a link. Clicking this link, opens a RadWindow which displays a custom user control (ASCX).

Inside this ASCX-Control I have another RadGrid, which displays data. I have implemented this and the window opens with the RadGrid. But when I want to sort (for example) data in the grid which is in the user control, the page only posts back and nothing happens. Let me show you, what I have done:

In my ASPX-Page:

<asp:Content ID="Main" ContentPlaceHolderID="PlaceHolderMain" runat="server">    
    <telerik:RadFormDecorator ID="RadFormDecorator1" runat="server" />
    <telerik:RadSkinManager ID="RadSkinManager1" runat="server" Skin="Windows7">
    </telerik:RadSkinManager>
                    
    <telerik:RadAjaxPanel ID="contentPanel" runat="server">
                                                                                                                 
                                <telerik:RadGrid ID="RadGrid1" runat="server" AutoGenerateColumns="false" AllowSorting="true" AllowPaging="false"
                                OnNeedDataSource="RadGrid1_NeedDataSource" OnItemCommand="RadGrid1_ItemCommand">
                                <MasterTableView DataKeyNames="ID" ClientDataKeyNames="ID">
                                    <Columns>
                                        <telerik:GridBoundColumn UniqueName="ID" DataField="ID" Visible="false"/>
                                        <telerik:GridBoundColumn DataField="Title" DataType="System.String" HeaderText="Title" SortExpression="Title" HeaderStyle-Width="200px"/>
                                        <telerik:GridBoundColumn DataField="Description" Visible="false"/>
                                                                                                                                   
                                        <telerik:GridTemplateColumn UniqueName="MyUniqueColumn" HeaderText="Custom Column" HeaderStyle-Width="150px">
                                            <ItemTemplate>
                                                <asp:Button ID="btnShowUserControl" runat="server" Text="anzeigen" CommandName="CustomCommand"></asp:Button>
                                            </ItemTemplate>
                                        </telerik:GridTemplateColumn>                               
                                    </Columns>  
                                    <SortExpressions>
                                        <telerik:GridSortExpression FieldName="Title" SortOrder="Ascending" />
                                    </SortExpressions>                  
                                </MasterTableView>                        
                                                                                      
                                <ClientSettings>
                                    <Selecting AllowRowSelect="true" />
                                </ClientSettings>
                            </telerik:RadGrid>                       
    </telerik:RadAjaxPanel>
    <telerik:RadWindowManager ID="RadWindowManager1" runat="server" EnableViewState="false">
        <Windows>           
            <telerik:RadWindow ID="MyWindow" Title="My Title" Modal="true" runat="server" Behaviors="Close" EnableViewState="false"
                ReloadOnShow="true" ShowContentDuringLoad="false" VisibleStatusbar="false" Width="800px" Height="400px"
                <ContentTemplate>
                    <company:MyCustomControl ID="myCustomcontrol" runat="server"></company:MyCustomControl>
                </ContentTemplate>
            </telerik:RadWindow>           
        </Windows>
    </telerik:RadWindowManager>
</asp:Content>

The user control has been registered properly on the page head but I have skipped this since it is not relevant to my problem. The Code-behind of my ASPX-Page looks like this (again, only the relevant parts):

protected void RadGrid1_ItemCommand(object sender, GridCommandEventArgs e)
        {
            if (e.CommandName == "Customcommand")
            {
                try
                {
                    //Get the requesting item
                    GridDataItem itemToEdit = (GridDataItem)e.Item;
 
                    //Init the user control
                    MyCustomControl control = (MyCustomControl)MyWindow.ContentContainer.FindControl("myCustomcontrol");
                    control.MakeInit(new Guid(itemToEdit["ID"].Text), IDFromQueryString);
 
                    MyWindow.VisibleOnPageLoad = true;
                }
                catch { }
            }
        }

Ok, now. That works since the RadWindow shows up and displays the user control. The markup of the ascx-file looks like this:

<telerik:RadAjaxManagerProxy ID="RadAjaxManagerProxy1" runat="server">
    <AjaxSettings>           
        <telerik:AjaxSetting AjaxControlID="RadGrid1">
            <UpdatedControls>
                <telerik:AjaxUpdatedControl ControlID="RadGrid1" LoadingPanelID="RadAjaxLoadingPanel1" />
            </UpdatedControls>
        </telerik:AjaxSetting>
    </AjaxSettings>
</telerik:RadAjaxManagerProxy>
<telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" /> 
 
<telerik:RadAjaxPanel ID="contentPanel" runat="server">
        <telerik:RadGrid ID="RadGrid1" runat="server" AutoGenerateColumns="false" AllowSorting="true" AllowPaging="false"
            OnNeedDataSource="RadGrid1_NeedDataSource">
            <MasterTableView>
                <Columns>
                    <telerik:GridBoundColumn DataField="FirstID" Visible="false" />
                    <telerik:GridBoundColumn DataField="SecondID" Visible="false" />
            <telerik:GridBoundColumn DataField="User.UserFullName" DataType="System.String" HeaderText="Full name of user" SortExpression="User.UserFullName" HeaderStyle-Width="200px"/>                  
                </Columns>  
                <SortExpressions>
                    <telerik:GridSortExpression FieldName="User.UserFullName" SortOrder="Ascending" />
                </SortExpressions>                   
            </MasterTableView>                                                                                                
            <ClientSettings>
                <Selecting AllowRowSelect="true" />
            </ClientSettings>
        </telerik:RadGrid>
</telerik:RadAjaxPanel>

The code behind of the ascx-control looks like this:

private static Guid globalGuidID;
private static int globalIntID = 0;
         
        protected void Page_Load(object sender, EventArgs e)
        {
        }
         
        public void MakeInit(Guid guidID, int intID)
        {           
            globalGuidID = guidID;       
            globalIntID = intID;
 
            RadGrid1.Rebind();
        }
 
        protected void RadGrid1_NeedDataSource(object sender, GridNeedDataSourceEventArgs e)
        {
            if (globalIntID > 0)
            {
                //Create service instance
                DataClient dataService = new DataClient();
 
                RadGrid1.DataSource = dataService.GetAppropriateData(globalIntID);
 
                //Close service instance after usage
                dataService.Close();
            }
        }

The Grid displays all the requested information that are retrieved by the "GetAppropriateData"-Method of a WebService instance. But when I try to sort the grid, it behaves as described above: The LoadingPanel is shown, a postback is raised and the grid is reloaded but not sorted.

In general: Any time, a postback is raised inside the RadGrid1 in my usercontrol, this control reloads making any sort, checkbox check, etc. lost.

I have spent so much time on this but I don't get the reason for this issue. When I transfer the code to a "simple" aspx-Page, everything runs as expected, but not for my usercontrol.

Could you please tell me what can cause my issue? I am totally stuck on this.

Best regards,
really appreciate your help,
Marco
Marco Beyer
Top achievements
Rank 1
 answered on 12 Sep 2011
1 answer
88 views
Hi,

I have 3 chartseries in my radchart. 1st and 3rd chartseries is of type Bar series and 2nd is of type stackedBar. When my chart is created , the 2nd series i.e. StackedBar is always showing on the 3rd position (in the right). I want to show Stackedbar series on 2nd position(in the middle).

Please give some suggestion.

Thanks,
Yavor
Telerik team
 answered on 12 Sep 2011
1 answer
81 views
In radscheduler the time interval is 1 hours for day view. Cal I reduce that nterval to 15 minutes. So that the vertical column have time 9:00,9:15,9:30,9:45 etc etc...
Shinu
Top achievements
Rank 2
 answered on 12 Sep 2011
0 answers
104 views
Hi,

I am searching the solution for this from last 6 days.

I have no idea about JQuery.

I have grid with both Master data & details data.So what are the rows that i selected either in Master and Details table,it will be printed with out header row(s).

With out column headings, it is not good.

Here is my java script function for printing grid with Master data & details data :

<telerik:RadCodeBlock ID="RadCodeBlock1" runat="server">
<script type="text/javascript">
    function PrintRadGrid() {
        var sh = '<%= Page.ClientScript.GetWebResourceUrl(gvIndents.GetType(),String.Format("Telerik.Web.UI.Skins.{0}.Grid.{0}.css",gvIndents.Skin)) %>';
        var styleStr = "<html><head><link href = '" + sh + "' rel='stylesheet' type='text/css'></link></head>";
        var MasterTable = $find('<%= gvIndents.ClientID %>').get_masterTableView();
        var selectedRows = MasterTable.get_selectedItems();
        var htmlcontent = "<table>";
        for (var i = 0; i < selectedRows.length; i++) {
            var row = selectedRows[i];
            htmlcontent = htmlcontent + "<tr>" + row.get_element().innerHTML + "</tr>";
            if (row.get_nestedViews().length > 0) {
                var nestedSelectedRows = row.get_nestedViews()[0].get_selectedItems();
                for (var j = 0; j < nestedSelectedRows.length; j++) {
                    var nestedRow = nestedSelectedRows[j];
                    htmlcontent = htmlcontent + "<tr>" + nestedRow.get_element().innerHTML + "</tr>";
                }
            }
        }
 
        htmlcontent = styleStr + "<body><div class='RadGrid RadGrid_Simple'>" + htmlcontent + "</table></div></body></html>";
 
        var previewWnd = window.open('about:blank', '', '', false);
        previewWnd.document.open();
        previewWnd.document.write(htmlcontent);
        previewWnd.document.close();
        previewWnd.print();
 
    }   
</script>
</telerik:RadCodeBlock>

So please tell me where can i add below piece of code
var headerRow = $telerik.$("th.rgHeader").parent("tr");

Here i need to print both the Master & Details grid header rows.

Thanks in advance...
Guruvu
Top achievements
Rank 1
 asked on 12 Sep 2011
0 answers
115 views
Hi,
i am binging scheduler with ef datasource.but it always insert pk 00000-0000.And i have another problem.i add resource which i want to save email it automatically adds combobox?how i can change it with textbox?any solution?

  <telerik:RadScheduler ID="RadScheduler1" runat="server" DataEndField="ENDDATE"
                    DataKeyField="RESERVATIONID" DataSourceID="EntityDataSource1"
                    DataStartField="STARTDATE" DataSubjectField="SUBJECT">
                    <ResourceTypes>
                        <telerik:ResourceType DataSourceID="EntityDataSource1" KeyField="NAMESURNAME"
                            Name="AD SOYAD" TextField="NAMESURNAME" ForeignKeyField="NAMESURNAME" />
                        <telerik:ResourceType DataSourceID="EntityDataSource1" KeyField="PHONE"
                            Name="TELEFON" TextField="PHONE" ForeignKeyField="PHONE" />
                    </ResourceTypes>
                </telerik:RadScheduler>
                <asp:EntityDataSource ID="EntityDataSource1" runat="server"
                    ConnectionString="name=CCEntities" DefaultContainerName="CCEntities"
                    EnableDelete="True" EnableFlattening="False" EnableInsert="True"
                    EnableUpdate="True" EntitySetName="RESERVATIONS">
                </asp:EntityDataSource>
Teoman
Top achievements
Rank 1
 asked on 12 Sep 2011
2 answers
692 views

Hi

I have a RadGrid in which is some data. One of the columns of data is an nvarchar(MAX) filed in which there could be a little to a lot of text, at the prerogative of the user.

I'm trying find a way to read the text out of the grid, modify it to be truncated down to say the first 50 characters, and put it back in the cell.

I found this page on this site that talks about this exact issue. Alas the code here does work.

http://www.telerik.com/help/aspnet/grid/grdaccessingcellsandrows.html

The code on this page says I can read the cell value with this syntax

TableCell cell = dataItem["ColumnUniqueName"];

Alas this does not work as 'dataItem' does not exist.

I have tried this code in my grids ItemDataBound method,

protected void rgNotes_ItemDataBound(object sender, GridItemEventArgs e)
{
    if (e.Item is GridDataItem && e.Item.OwnerTableView.DataSourceID == "dsNotes")
    {
        TableCell cell = dataItem["NoteText"];
    }
}

I even tried
TableCell cell = e.Item["NoteText"];

to no avail.

Anyone here have a solution to this, what should be a pretty obvious' issue?

Brad



Brad
Top achievements
Rank 1
 answered on 12 Sep 2011
1 answer
91 views
How to add Paste Options drop down tool?
Rumen
Telerik team
 answered on 11 Sep 2011
Narrow your results
Selected tags
Tags
+? more
Top users last month
Bohdan
Top achievements
Rank 3
Iron
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Elliot
Top achievements
Rank 1
Iron
Iron
Iron
Sunil
Top achievements
Rank 1
Cynthia
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Bohdan
Top achievements
Rank 3
Iron
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Elliot
Top achievements
Rank 1
Iron
Iron
Iron
Sunil
Top achievements
Rank 1
Cynthia
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?