Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
73 views
I have a RadToolTip that contains a RadComboBox. When the RadToolTip shows, the RadComboBox isn't visibile until the user hovers over it. I've tried setting the z-index higher, but that doesn't help.

Also, if I have FireBug enabled, it doesn't happen. Any fix or even debugging suggestions are appreciated.
Nencho
Telerik team
 answered on 18 Mar 2013
1 answer
56 views
I am using  usercontrols inside the Telerik RadTab.I need to pass parameters into the usercontrol (to load a grid inside it).But when i am setting parameters inside in the usercontrol and running the application,application starts but end in error and prompting  the visual studio to close the program.The sample of my tab control is this

 <telerik:RadPageView runat="server" ID="PageView1">
        <div class="contactWrap">
            <uc:Cover ID="covercontrol" runat="server" />
        </div>
    </telerik:RadPageView>
    <telerik:RadPageView runat="server" ID="PageView2">
        <uc:settingdetail ID="settingDiscount" runat="server"  />
    </telerik:RadPageView>
The application runs fine  with this code.But when I set a property inside the user control "settingdetail" such as SettingId="0" to pass it to the grid inside the usercontrol ,then above problem occurs.

Please provide a solution for it.
Thanks,
Sheharban
Nencho
Telerik team
 answered on 18 Mar 2013
1 answer
55 views
We have an assignment control that's reused throughout our project.  It contains two rad grids:  Available and Assigned.  When the user double clicks the row in one of the grids, the item is moved to the opposite grid.  This is defined as follows for the Available grid (the Assigned grid is pretty much the same, except Available is replaced with Assigned where :

 <telerik:RadGrid runat="server" ID="grdAvailableFields" SkinID="AssignmentGridWithoutPaging" OnItemDataBound="grdAvailableFields_OnItemDataBound"
Width="280px" OnNeedDataSource="grdAvailableFields_NeedDataSource" OnDataBound="grdAvailableFields_DataBound">
<MasterTableView Name="AvailableFields" DataKeyNames="Id">
<Columns>
...

</Columns>
</MasterTableView>
<ClientSettings>
<ClientEvents OnRowSelected="grdAvailableFields_OnRowSelected"
OnRowDblClick="AvailableFieldDblClick" />
</ClientSettings>
</telerik:RadGrid>

The corresponding javascript is defined as follows:

function AvailableFieldDblClick() {
    $get("<%= btnAssignField.ClientID %>").click();
}
 
function btnAssignField_ClientClick() {
    if (assignFieldEnabled) {
        ResetFieldsButtons();
        MakeFieldsDirty();
        return true;
    }
    return false;
}

This all works fine when we only have one instance of the control on the page.  However, in some cases, we have to have it twice (they're located on different tabs of a multipage control -- tab 2 and tab 5).  In these cases, when the user doubleclicks the row, the javascript that fires belongs to the last control that was created (e.g., on tab 5), even though the user was on the control that was first created.  (When the control is used multiple times on the page, there are duplicate javascript functions in the aspx code.)

For example, if Grid1 and Grid2 are on Tab1 and Grid3 and Grid4 are on Tab2, when I doubleclick G3 or G4, the item moves to the correct paired grid.  However, if I doubleclick G1 (or G2), the javascript that's fired refers to G3 (or G4) and therefore nothing happens.

Since the javascript functions are the same for each control, the browser is calling the incorrect method (e.g., the method associated with the last grid) when the user doubleclicks on the first grid.  Since this is the same control, I can't change the function name in design and expect it to make a difference in production.

How can I differentiate which function to call so that when the user doubleclicks any of the grids, the function that's executed is the one associated with the correct grid?
Andrey
Telerik team
 answered on 18 Mar 2013
7 answers
721 views
Hi: I followed the suggestions both:

http://www.telerik.com/automated-testing-tools/community/forums/aspnet/grid/radgrid-mouseover.aspx and
http://www.telerik.com/help/aspnet/grid/grdsetstyleonmouseover.html

with no success. I am currently developing against the Q1 2010 tools and every time I add the clientsettings tag or the clientsetetings-clientevents-onrowclick property of the Rad Grid the page loads but it appears as though none of the JavaScript runs. My tooltops do not pop-up, the radpanels do not resize, etc. Any help is appreciated. Thanks

            <telerik:RadToolTip ID="AlertMenuToolTip" Animation="Slide" RelativeTo="Element" Position="BottomCenter"   
                        AnimationDuration="100" ShowCallout="false" TargetControlID="AlertNoticeIcon" IsClientID="true" 
                        OffsetX="-108" OffsetY="-5" runat="server" HideEvent="LeaveToolTip">  
                <div class="AlertMenuItemContainer">  
                <Telerik:RadGrid RegisterWithScriptManager="true" ID="StudentCheckListRadGrid" AutoGenerateColumns="false" runat="server" AllowSorting="true" ClientSettings-ClientEvents-OnRowClick="javascript:alert();" 
                  AllowPaging="false" ShowHeader="false" PageSize="10" Width="100%" BorderWidth="0" ItemStyle-BackColor="#E8E8E8" AlternatingItemStyle-BackColor="White">  
                    <MasterTableView AllowMultiColumnSorting="true" AutoGenerateColumns="false" ForeColor="#4B4B4B" Font-Names="Tahoma,Arial,Verdana" Font-Size="11px">  
                    <Columns> 
                        <Telerik:GridBoundColumn DataField="" HeaderText="TaskSummaryCheckList"></Telerik:GridBoundColumn> 
                    </Columns> 
                    </MasterTableView>        
                    </telerik:RadGrid> 
                </div> 
                <div style='text-align:center;'><href="#" ID="StudentCheckListMoreLink" OnClick="OpenStudentCheckListWindow()">view more...</a></div>  
        </telerik:RadToolTip> 
Galin
Telerik team
 answered on 18 Mar 2013
1 answer
91 views
I have a RadGrid with a TemplateColumn that contains an ItemTemplate, InsertItemTemplate & EditItemTemplate.

I am getting the attached error.

My markup is as follows for the RadComboBox in the grid:
<telerik:GridTemplateColumn DataField="description" HeaderText="Service Type" UniqueName="ServiceType">
                                <ItemTemplate>
                                    <asp:Label ID="lblServiceType" runat="server" Text='<%# Eval("description") %>'></asp:Label>
                                </ItemTemplate>
                                <InsertItemTemplate>
                                    <telerik:RadComboBox ID="ServiceTypeDDLIns" runat="server" DataSourceID="SqlDataSource2"
                                        DataTextField="description" DataValueField="code" ValidationGroup="CarrierSvc"
                                        SelectedValue='<%#Bind("code") %>' />
                                    <asp:RequiredFieldValidator ID="RequiredFieldValidator1" ControlToValidate="ServiceTypeDDLIns"
                                        ForeColor="Red" Text="*This field is required" runat="server" Display="Dynamic"
                                        ValidationGroup="CarrierSvc">
                                    </asp:RequiredFieldValidator>
                                </InsertItemTemplate>
                                <EditItemTemplate>
                                    <telerik:RadComboBox ID="ServiceTypeDDLEdit" runat="server" DataSourceID="SqlDataSource2"
                                        DataTextField="description" DataValueField="code" ValidationGroup="CarrierSvc"
                                        SelectedValue='<%#Bind("code") %>' />
                                    <asp:RequiredFieldValidator ID="RequiredFieldValidator2" ControlToValidate="ServiceTypeDDLEdit"
                                        ForeColor="Red" Text="*This field is required" runat="server" Display="Dynamic"
                                        ValidationGroup="CarrierSvc">
                                    </asp:RequiredFieldValidator>
                                </EditItemTemplate>
                            </telerik:GridTemplateColumn>

My DataSource is as follows:
<asp:SqlDataSource ID="SqlDataSource2" ConnectionString="<%$ ConnectionStrings:wmssql03Trident %>"
        ProviderName="System.Data.SqlClient" SelectCommand="SelectServiceType" SelectCommandType="StoredProcedure"
        runat="server"></asp:SqlDataSource>

The results from my sql query is also attached with a column named "description".

I understand what the error means, but don't know why it is getting the error when I see the "description" column coming out in the SQL query.

Can someone please explain to me what I'm doing wrong so I can correct this? I am "dead in the water" with this right now and can't proceed testing until I get some insight what is the problem.....

Thanks in advance....
 
Jayesh Goyani
Top achievements
Rank 2
 answered on 18 Mar 2013
1 answer
218 views
Is it possible to dynamically create a RadButton on the client? 

I tried

var MyBtn = new Telerik.Web.UI.RadButton();

When I do this, I get an error:

Sys.ArgumentException: Value must be a DOM element.
Parameter name: element

Is it possible to do this?
Princy
Top achievements
Rank 2
 answered on 18 Mar 2013
1 answer
86 views
I have a page that has a Grid on it.  It also has a UserControl that contains a button. How do I add an AjaxSetting to the AjaxManager so that when the Button is clicked, the grid will be updated?

Thanks
Shinu
Top achievements
Rank 2
 answered on 18 Mar 2013
1 answer
156 views
Am using a radgrid. One of the columns is a Telerik:GridTemplateColumn, within which i have the asp:linkbutton. On click of the link button, i need to call a server side method, by passing the value of another column to that. But am getting a parse error. Mu code is:

<telerik:GridTemplateColumn UniqueName="Name" HeaderText="Name" SortExpression="PayeeName">
     <ItemTemplate>
          <div style="display : block; width : 100%" class="blueLinkText">
               <asp:LinkButton ID="lnkReject" runat="server" OnClick="lnkAddVendorID_Click('<%#Server.HtmlEncode(BindingHelper.Format(Eval("PayeeName")))%>')"><%# Server.HtmlEncode(BindingHelper.Format(Eval("PayeeName")))%></asp:LinkButton>
            </div>
       </ItemTemplate>
</telerik:GridTemplateColumn>

When i run this code, i get an error as "Parse Error" The server tag is not well formed.

Have anyone came across such an issue. Please let me know, how to fix this.
Shinu
Top achievements
Rank 2
 answered on 18 Mar 2013
0 answers
136 views
Using Telerik.Web.UI version 2012.3.1120.40
I have a RadNumericTextBox using the js onchange event. This has been working previously, however I now notice the onchange is called again by onTextBoxBlurHandler as (if(this._initialValueAsText+""!==a){this.set_value(a)).
So now my onchange is beting called twice and breaking things.
Was this intended?

Wayne
Top achievements
Rank 1
 asked on 18 Mar 2013
2 answers
121 views
As I have a very large page,I decide to turn the viewstate off.
The problem I am facing now is that when I bind the Grid on PostBack,the TextBox retains the old value and it does not update to new value.
If I use a HTML input type text as shown below,then it binds correctly,but for ASP.Net TextBox it does not.(If the runat="server" attribute is present then it does not and if I remove that attribute it binds.)

For each items in the category I need to provide quantity,then save it and when I select a different category,the gridview will be build using the items of the selected category.So when I select a different category,the textboxes retains the value of previous items.

Does not bind:
<asp:TextBox ID="txtBoxQty" runat="server" Text='<%#DataBinder.Eval(Container, "DataItem.PhysicalWholeUnitsUsableOnHand")%>'
</asp:TextBox>

It does bind:
<input type="text" value='<%#DataBinder.Eval(Container, "DataItem.PhysicalQuantity")%>' />

Even,when I try to provide text in the ItemDataBound Event,it does not take the new value.
Even though,I have disabled the ViewState of the Grid,I am able to access the TextBox Control in the ItemDataBound Event.
I am using DataSet to bind the GridView. eg.gridView.DataSource=dataset;
I am posting all the value using javascript and WebService and then uisng __doPostBack to do a postback.

Kindly let me know if any additional information is required.
Also,kindly let me know how to make the above functionality work.

Thanks
Jignesh





Jignesh
Top achievements
Rank 1
 answered on 17 Mar 2013
Narrow your results
Selected tags
Tags
+? more
Top users last month
Miljana
Top achievements
Rank 2
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Bronze
Cynthia
Top achievements
Rank 1
John
Top achievements
Rank 1
Iron
Mozart
Top achievements
Rank 1
Iron
Veteran
Want to show your ninja superpower to fellow developers?
Top users last month
Miljana
Top achievements
Rank 2
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Bronze
Cynthia
Top achievements
Rank 1
John
Top achievements
Rank 1
Iron
Mozart
Top achievements
Rank 1
Iron
Veteran
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?