Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
94 views
I have button on a page in a user control that captures the current screen html, converts it to PDF format and pops up an asp.net form that simulates a new email form with the PDF document attached allowing the user to email a screen print of the current page. This is done by rendering the page twice, once for the PDF creation and then again to rerender the page to the screen. This works fine with non ajax controls, and with ajax controls I simply need to register the script control with the RadScriptManager in the OnPreRender event.

However when I try to do this with a page that has a RadGrid on it I get an issue that I have been unable to resolve. I have enabled ContextFilterMenu oand FilteringByColumn for the grid. One of the columns in the grid is called Order_Qty with a unique name of ColOrder_Qty.

When I try to render the RadGrid For the PDF creation I get the following error:-
Script control 'RNTBF_ColOrder_Qty' is not a registered script control. Script controls must be registered using RegisterScriptControl() before calling RegisterScriptDescriptors(). Parameter name: scriptControl

So my question is, What is this RNTBF_ColOrder_Qty script control, and mores to the point how do I get a reference to it in order to be able to register it with the RadScriptManger prior to rendering?

Stuart Watton
Nikolay Rusev
Telerik team
 answered on 10 Jan 2011
3 answers
348 views
Hi ,

    i am using rad chart control in my application.it is working fine when developement
but after given the build in IIS i am getting error- HTTP 404.0 -Not Found
please refer screen shot and let me know the solution
Vladimir Milev
Telerik team
 answered on 10 Jan 2011
1 answer
81 views
Hi All

I have a function that resizes a grid page size when the page has loaded,
I have used the "OnClientLoad" event of the main page splitter to fire this function.

However when the function uses an ajax request i get the following error:
Line 24610
Error this_tooltips.length is null or not an object
(I have attached a screen Shot)

This is the code:
Java:
function gridPsize() {
                    var h1 = $find("<%= RadSplitter5.ClientID %>").get_height();
                    $find("<%= RadAjaxManager1.ClientID %>").ajaxRequest("Grid1PageSize" + h1);
               }
Vb Code
Protected Sub RadAjaxManager1_AjaxRequest(ByVal sender As Object, ByVal e As Telerik.Web.UI.AjaxRequestEventArgs) Handles RadAjaxManager1.AjaxRequest
      If Left(e.Argument, 13) = "Grid1PageSize" Then
            'Set Radgrid1 page size
            Dim pHeight As Integer = CInt(Right(e.Argument, Len(e.Argument) - 13))
            Dim rows As Double = (pHeight - 110) / 30
  
            If rows >= 1 Then
                RadGrid1.PageSize = CInt(rows)
                RadGrid1.Rebind()
            End If
  
            End If
  
    End Sub
The Problem does not occur on initial load of the page, It seems to occur on a re-query of the Grid? But not all the time.
I was wondering if it was related to mouse position on the grid as i have tooltips coded to the grid's ItemDataBound Event, The tooltips were in the ItemCreated Event but i moved them to see if it would cure the problem.

If anyone could shed any light on this it would be most appriciated.

Many Thanks

Regards

Darren
Maria Ilieva
Telerik team
 answered on 10 Jan 2011
1 answer
166 views
Hello,

I use the following code to enable multiple selection in the radtreeview. The code only works in IE and not in Chrome or FireFox. 
Could someone help me with this issue?

Code:

<telerik:RadCodeBlock ID="cb1" runat="server">


        <script language="javascript" type="text/javascript">
                   
        var RadTreeIsMultiSelecting = false;
        
        function CommitTree(e)
        {
            if (!e.ctlrKey | !e.shiftKey) 
            {
                if (RadTreeIsMultiSelecting)
                {
                    var aMan = $find("<%= ajMan.ClientID %>");
                    aMan.ajaxRequest("RadTree");
                    
                }
            }
        }


        function RadTreeClicked(sender, args)
        {
            RadTreeIsMultiSelecting = args._domEvent.ctrlKey | args._domEvent.shiftKey;
            var tree = $find("<%= RadTree.ClientID %>"); 
            tree.commitChanges();
        }
            
            
        </script>


    </telerik:RadCodeBlock>

Nikolay Tsenkov
Telerik team
 answered on 10 Jan 2011
1 answer
115 views
<telerik:GridTemplateColumn DataField="DelFlag" HeaderText="Status" SortExpression="DelFlag"
                            HeaderStyle-HorizontalAlign="Center" UniqueName="DelFlag" Visible="true" AllowFiltering="false">
                            <ItemTemplate>
                                <asp:Button ID="btnStatus" Font-Size="11px" Width="65px" runat="server" Text='<%#Eval("DelFlag")%>'
                                    OnClientClick="javascript:return confirm('Are you sure want to update status !!?')"
                                    CommandName="Command" />
                            </ItemTemplate>
                            <ItemStyle VerticalAlign="Middle" HorizontalAlign="Center" />
                        </telerik:GridTemplateColumn>


and following code on serverside .cs fle
 else if (e.CommandName == "Command")
            {
                GridDataItem item = (GridDataItem)e.Item;
                Button btnStatus = (Button)e.CommandSource;
                if (btnStatus.Text == "Deactivate")
                {
                    btnStatus.Text = "Activate";
                    string gameGID = Convert.ToString(((Label)item.FindControl("lblGameGID")).Text);
                    string delflag = "Y";
                    ds.UpdateCommand = "UPDATE tblGame SET DelFlag = '" + delflag + "' WHERE GameGID = '" + gameGID + "'";
                    ds.Update();
                    grdGameInfo.DataSource = ds;
                    grdGameInfo.DataBind();
                    grdGameInfo.Rebind();
                }
                else
                {
                    
                    btnStatus.Text = "Deactivate";
                    string gameGID = Convert.ToString(((Label)item.FindControl("lblGameGID")).Text);
                    string delflag = "N";
                    ds.UpdateCommand = "UPDATE tblGame SET DelFlag = '" + delflag + "' WHERE GameGID = '" + gameGID + "'";
                    ds.Update();
                    grdGameInfo.DataSource = ds;
                    grdGameInfo.DataBind();
                    grdGameInfo.Rebind();
                }


this will work if rad AJAX managar not on page.. If i put rad ajax .. the above scrip not working. It's only show alert message.. but server side event does not call. Please help how to call need urgent.
Princy
Top achievements
Rank 2
 answered on 10 Jan 2011
1 answer
115 views
I'm trying to get my RadGrid to allow updating to Oracle using a custom WebControl. I have went though numerous examples and always have one or two small things that dont seem to work correctly. There seems to be some many variations of hoiw this functioality works. Can someone please point me to an example using Oracle as the undelying database and allows updating ot the table via a custom Web Control?

Iana Tsolova
Telerik team
 answered on 10 Jan 2011
2 answers
269 views
I am researching the best way to hook a filter button to my grid header column rather than having a filter row displayed.  The filter row takes up too much space for what we are trying to do.  My idea would be to have an ImageButton that shows the filter image.  When the user clicks this button it would launch a radwindow to capture the criteria.  

My question is this:  Should I do this as a templated column?   It seems like the only way to add controls to the header is via a template.  The downside is that beyond that the column data is just a bound data column. 

Any recommendations or samples that I can refer to?

Randy
Niraj
Top achievements
Rank 1
 answered on 10 Jan 2011
1 answer
153 views
Hi there,

I have read the article here http://demos.telerik.com/aspnet-ajax/calendar/examples/datepicker/clientapi/defaultcs.aspx in order to position the RadDatePicker popup. However, I get an error saying Telerik is Undefined due to the following code:

 

 

var startPicker = $("#<%=this.start.ClientID %>");

 

 

 

var endPicker = $("#<%=this.end.ClientID %>");

 

startPicker.set_popupDirection(Telerik.Web.RadDatePickerPopupDirection.TopRight);

endPicker.set_popupDirection(Telerik.Web.RadDatePickerPopupDirection.TopRight);

Can someone assist me in fixing this issue?

Shinu
Top achievements
Rank 2
 answered on 10 Jan 2011
1 answer
202 views
Hi,
Is there a way to add radio button to all cells of grid. Only one cell of the grid will be selected(checked) at same time. I couldn't find changing button type to radio. For normal radbutton, it  is "ButtonType="ToggleButton" ToggleType="Radio".

Think that there is a gird which has 3 columns and 3 rows.  First column's type is datetime. Other two columns' type is boolean and shown at cell as radio button.  User will be able to select only one radio of the matrix.

Regards,

view;
                   cola      colb   
date1              O        O
date2              O        O
date3              O        O


GridButtonColumn btnCol = new GridButtonColumn();
                btnCol.DataTextField = c.ToString();
                btnCol.HeaderText = dt.Columns[c].Caption;
                btnCol.HeaderStyle.Font.Bold = true;
                btnCol.ButtonType = GridButtonColumnType.LinkButton;
                rgridDeliveryDate.MasterTableView.Columns.Add(btnCol);
Princy
Top achievements
Rank 2
 answered on 10 Jan 2011
1 answer
232 views
Hi 
On my RadGrid i have some bound columns and some template columns.
I want to simply save all my RadGrid data into my sql datatable on a button click. 
Can anybody send some sample code for that using RadGrid.

Code for my radgrid is-

<telerik:RadGrid ID="GD_Prod" runat="server" AllowPaging="True" ShowHeader="False"
                    AutoGenerateColumns="False"  GridLines="None"
                    Height="173px" Skin="Outlook" Width="1107px">
                    <ClientSettings AllowColumnsReorder="True">
                        <Selecting AllowRowSelect="True" />
                        <Scrolling AllowScroll="True" UseStaticHeaders="True" />
                    </ClientSettings>
                    <MasterTableView PageSize="5" >
                        <RowIndicatorColumn>
<HeaderStyle Width="20px"></HeaderStyle>
</RowIndicatorColumn>
<ExpandCollapseColumn>
<HeaderStyle Width="20px"></HeaderStyle>
</ExpandCollapseColumn>
<CommandItemSettings ExportToPdfText="Export to Pdf"></CommandItemSettings>
    <Columns>
        <telerik:GridBoundColumn DataField="port_recipe_num" HeaderText="Recipe #" SortExpression="port_recipe_num"
            UniqueName="port_recipe_num" DataType="System.Char">
            <HeaderStyle Width="17px" />
        </telerik:GridBoundColumn>
        <telerik:GridBoundColumn DataField="DESC_ALT" HeaderText="Description" SortExpression="DESC_ALT"
            UniqueName="DESC_ALT" DataType="System.Char">
            <HeaderStyle Width="36px" />
        </telerik:GridBoundColumn>
        <telerik:GridBoundColumn DataField="port_no_servings" HeaderText="Portion Size" SortExpression="port_no_servings"
            UniqueName="port_no_servings" DataType="System.Char">
            <HeaderStyle Width="16px" />
        </telerik:GridBoundColumn>
        <telerik:GridTemplateColumn UniqueName="PL_STUDENT_Portions_Planned" DataType="System.Int32">
            <ItemTemplate>
                <asp:TextBox ID="TxtSTUPort" DataField="PL_STUDENT_Portions_Planned" runat="server"
                    Height="16px" Width="30px"></asp:TextBox>
            </ItemTemplate>
            <HeaderStyle Width="19px" />
        </telerik:GridTemplateColumn>
        <telerik:GridTemplateColumn UniqueName="PL_Adults_ALC_Portions_Planned" DataType="System.Int32">
            <ItemTemplate>
                <asp:TextBox ID="TxtAAPort" DataField="PL_Adults_ALC_Portions_Planned" runat="server"
                    Height="16px" Width="30px"></asp:TextBox>
            </ItemTemplate>
            <HeaderStyle Width="19px" />
        </telerik:GridTemplateColumn>
        <telerik:GridBoundColumn DataField="STD_NUM_OF_SERVING" DataType="System.Int32" HeaderText="STD_NUM_OF_SERVING"
            SortExpression="STD_NUM_OF_SERVING" UniqueName="STD_NUM_OF_SERVING">
            <HeaderStyle Width="14px" />
        </telerik:GridBoundColumn>
        <telerik:GridTemplateColumn UniqueName="PL_Factor_Portions" DataType="System.Char">
            <ItemTemplate>
                <asp:TextBox ID="TxtFPort" DataField="PL_Factor_Portions" runat="server" Height="16px"
                    Width="30px"></asp:TextBox>
            </ItemTemplate>
            <HeaderStyle Width="18px" />
        </telerik:GridTemplateColumn>
        <telerik:GridTemplateColumn UniqueName="DOC_Quantity_Of_Food_Used" DataType="System.Char">
            <ItemTemplate>
                <asp:TextBox ID="TxtQoFUsed" DataField="DOC_Quantity_Of_Food_Used" runat="server"
                    Height="16px" Width="30px"></asp:TextBox>
            </ItemTemplate>
            <HeaderStyle Width="20px" />
        </telerik:GridTemplateColumn>
        <telerik:GridTemplateColumn UniqueName="DOC_Portions_Prepared" DataType="System.Int32">
            <ItemTemplate>
                <asp:TextBox ID="TxtPPort" DataField="DOC_Portions_Prepared" runat="server" Height="16px"
                    Width="30px"></asp:TextBox>
            </ItemTemplate>
            <HeaderStyle Width="16px" />
        </telerik:GridTemplateColumn>
        <telerik:GridTemplateColumn UniqueName="DOC_Portions_Brought_Forward" DataType="System.Int32">
            <ItemTemplate>
                <asp:TextBox ID="TxtBFPort" DataField="DOC_Portions_Brought_Forward" runat="server"
                    Height="16px" Width="30px"></asp:TextBox>
            </ItemTemplate>
            <HeaderStyle Width="16px" />
        </telerik:GridTemplateColumn>
        <telerik:GridTemplateColumn UniqueName="DOC_Portions_LeftOver" DataType="System.Int32">
            <ItemTemplate>
                <asp:TextBox ID="TxtLOPort" DataField="DOC_Portions_LeftOver" runat="server" Height="16px"
                    Width="30px"></asp:TextBox>
            </ItemTemplate>
            <HeaderStyle Width="16px" />
        </telerik:GridTemplateColumn>
        <telerik:GridTemplateColumn UniqueName="DOC_LeftOver_Code" DataType="System.Char">
            <ItemTemplate>
                <asp:DropDownList ID="ddlLOCode" DataField="DOC_LeftOver_Code" runat="server" Font-Size="10px"
                    Height="16px" Width="46px">
                    <asp:ListItem>CF</asp:ListItem>
                    <asp:ListItem>DIS</asp:ListItem>
                    <asp:ListItem>ALC</asp:ListItem>
                    <asp:ListItem>RTB</asp:ListItem>
                    <asp:ListItem>RTF</asp:ListItem>
                </asp:DropDownList>
            </ItemTemplate>
            <HeaderStyle Width="16px" />
        </telerik:GridTemplateColumn>
        <telerik:GridTemplateColumn UniqueName="DOC_Total_Portions_Served" DataType="System.Int32">
            <ItemTemplate>
                <asp:TextBox ID="TxtTSPort" DataField="DOC_Total_Portions_Served" runat="server"
                    Height="16px" Width="30px"></asp:TextBox>
            </ItemTemplate>
            <HeaderStyle Width="16px" />
        </telerik:GridTemplateColumn>
        <telerik:GridBoundColumn UniqueName="POSStudents"
            DataType="System.Int32" DataField="POSStudents" HeaderText="POSStudents" 
            SortExpression="POSStudents">
            <HeaderStyle Width="18px" />
        </telerik:GridBoundColumn>
        <telerik:GridBoundColumn UniqueName="POSAdultsALC"
            DataType="System.Int32" DataField="POSAdultsALC" HeaderText="POSAdultsALC" 
            SortExpression="POSAdultsALC">
            <HeaderStyle Width="16px" />
        </telerik:GridBoundColumn>
    </Columns>
    <PagerStyle AlwaysVisible="True" />
</MasterTableView>
                </telerik:RadGrid>
Shinu
Top achievements
Rank 2
 answered on 10 Jan 2011
Narrow your results
Selected tags
Tags
+? more
Top users last month
Chester
Top achievements
Rank 1
Iron
Simon
Top achievements
Rank 1
Iron
Douglas
Top achievements
Rank 2
Iron
Iron
SUNIL
Top achievements
Rank 3
Iron
Iron
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Chester
Top achievements
Rank 1
Iron
Simon
Top achievements
Rank 1
Iron
Douglas
Top achievements
Rank 2
Iron
Iron
SUNIL
Top achievements
Rank 3
Iron
Iron
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?