Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
327 views
Hi,
I am looping through a RadGrid and getting the contents of a RadNumericTextbox through each iteration. Every radNumericTextbox appears to be empty even though I have numbers in each of them. I've tested a regular textbox control in my radgrid and the numbers do show up.

Here's the code:
For Each item As GridDataItem In radGvProducts.Items  
 
            If TypeOf (item) Is GridDataItem Then  
                Dim txtQuantity As TextBox = CType(item.FindControl("txtQuantity"), TextBox)  
                If txtQuantity.Text <> String.Empty Then  
                   'do something  
                End If  
                Dim radTxtQuantity As RadNumericTextBox = CType(item.FindControl("radTxtQuantity"), RadNumericTextBox)  
                If radTxtQuantity.Text <> String.Empty Then  
 
                    Dim intQty As Integer = CInt(radTxtQuantity.Text.Trim)  
                    'Dim hdnShoppingCartID As HiddenField = CType(rptItem.FindControl("hdnShoppingCartID"), HiddenField)  
                    'Dim shoppingCartID As Integer = CInt(hdnShoppingCartID.Value)  
 
                    Dim hdnProductID As HiddenField = CType(item.FindControl("hdnProductID"), HiddenField)  
                    Dim prodID As Integer = CInt(hdnProductID.Value)  
 
 
                    Dim sc As New ShoppingCart(UserInstance.ContactID, prodID)  
                    'If UserInstance.ContactID > 0 Then  
                    sc.ContactID = UserInstance.ContactID  
                    'Else  
                    '    sc.UserID = DBNull.Value  
                    'End If  
                    sc.ProductID = prodID 
                    scsc.Quantity = sc.Quantity + intQty  
                    ShopCartCol.Add(sc)  
                    'sc.Save()  
 
                End If  
            End If  
 
 
        Next 
I check for radTxtQuantity.Text <> String.Empty before proceeding but it is always empty. Am I doing something wrong? It is never going into that If statement.
Thanks
Rob Venable
Top achievements
Rank 1
 answered on 14 Feb 2010
2 answers
119 views
Hi

Is it possible to force jQuery registers by code behind ?
I can't add scriptregistering in the aspx file like it is describe in this topic :

Regards.
Mab
Mab CV
Top achievements
Rank 1
 answered on 13 Feb 2010
0 answers
98 views
Hi there,

                I have a RadGrid of outloot style. where i have group by expression by 2 fields (Status and Count). One of the status contains about 700+ records on expanding takes about 2 min. Detailed grid contains 4 templatecolumns like Edit / Delete / Cancel / View (asp ImageButton type). If i remove these template columns grid takes about 45 sec to expand. Please suggest me a solution to improve the performance on expand/collapse.
Computer Surgeon
Top achievements
Rank 1
 asked on 13 Feb 2010
4 answers
124 views
My web site serves multiple customers where the content is customized depending on the domain name used to access the site.  As such, I have a subfolder under the images folder for each customer.  I can dynamically set the ImageManager paths in code using "~/images/" & CustID, but when the customer uses the ImageManager they always have access to the "images" folder.  How can I lock them into their CustId folder under images?  Is there a better approach?
Tom Kaminski
Top achievements
Rank 1
 answered on 13 Feb 2010
5 answers
316 views
whats the easiest way to add row hover effects (sunset skin) to a radgrid




thanks
kevin
Jan
Top achievements
Rank 1
 answered on 13 Feb 2010
0 answers
96 views

Hi,

I've integrated both the TreeView and TabStrip controls (from the Telerik ASP.NET AJAX controls) into my MOSS master page and use two separate custom SharePoint lists as the data sources for these controls. This is all working fine.

My question is what is the best way to go about configuring these controls so that they remember which menu item (be it in the tree view or tab) that the user has selected? As at present always the first tab or tree view item is selected when the user navigates from page to page within SharePoint.

Many thanks.

Neil Johnson
Top achievements
Rank 1
 asked on 13 Feb 2010
0 answers
67 views
Hi,

I've a radgrid in my ascx and when I click on the rows(fast manner) , I suddenly get a javascript runtime error.This message tells :

Microsoft JScript runtime error: 'this._owner' is null or not an object.
Pls see the attached files: I've attached a screenshot of the bug.
It complains about script manager abd webresource.axd.
I've a radscriptmanager in my aspx and all my grids are in ascx(user controls).

Pls tell me what I'm missing or what I should avoid to get rid of this error.
 
Ayesha
Top achievements
Rank 1
 asked on 12 Feb 2010
1 answer
205 views
I would think that either this is a stupid mistake I'm making, or someone else has at least had this problem, but I couldn't find any specific help in other posts, so here I go...

I have a NestedViewTemplate with a UserControl.  I bind a couple of my UserControl properties to the row DataItem values. In my user control, there are a few buttons that change values on the grid (we'll say "Status" changes for this example).  In the user control, if I update the "Status" of a row, I have to rebind the grid for the changes to show up.  That all works fine, except when I call gridResumes.Rebind(), it shows the changes, but my NestedView is not showing anymore, the row is not expanded.

My solution was to have an event fire when you change a row using the NestedViewTemplate that tells me which row was changed.  I then set "gridResumes.Items[updatedItemIndex].Expanded = true;" so that after the postback, the item is still expanded. 

My problem is, calling Rebind() reloads the column data, but the NestedTableView is not bound to anything, the values within my user control are null.  Why does Rebind() not rebind the NestedTableView?  Do I have to call that manually after setting Expanded=true?

    <telerik:RadGrid ID="gridResumes" runat="server" AllowPaging="true"   
        AllowSorting="true" onneeddatasource="gridResumes_NeedDataSource"   
        AllowFilteringByColumn="true" CssClass="resumeGrid">  
        <GroupingSettings CaseSensitive="false" /> 
        <ClientSettings EnableRowHoverStyle="true" /> 
          
        <MasterTableView DataKeyNames="RecruitmentPortalGUID" AutoGenerateColumns="false">  
          
            <Columns> 
                <telerik:GridBoundColumn HeaderText="Last Name" UniqueName="LastName"   
                    SortExpression="LastName" DataField="LastName"></telerik:GridBoundColumn> 
                <telerik:GridBoundColumn HeaderText="First Name" UniqueName="FirstName"   
                    SortExpression="FirstName" DataField="FirstName"></telerik:GridBoundColumn> 
                <telerik:GridBoundColumn HeaderText="Position" UniqueName="AppliedPositionShort"   
                    SortExpression="AppliedPositionShort" DataField="AppliedPositionShort"></telerik:GridBoundColumn> 
                <telerik:GridBoundColumn HeaderText="Quiz" UniqueName="QuizTotal"   
                    SortExpression="QuizTotal" DataField="QuizTotal"></telerik:GridBoundColumn> 
                <telerik:GridBoundColumn HeaderText="Applied" UniqueName="DateCreated"   
                    SortExpression="DateCreated" DataField="DateCreated" DataFormatString="{0:MM/dd/yyyy}"></telerik:GridBoundColumn> 
                <telerik:GridTemplateColumn HeaderText="Status" UniqueName="Status" SortExpression="Status" DataField="Status">  
                    <ItemTemplate> 
                        <span class='<%# "resumeGrid_item_status_" + Eval("Status").ToString().ToLower() %>'><%# Eval("Status") %></span>  
                    </ItemTemplate> 
                </telerik:GridTemplateColumn> 
            </Columns> 
              
            <NestedViewTemplate> 
                <asp:HiddenField ID="hiddenRecruitmentPortalGuid" runat="server" Value='<%# Eval("RecruitmentPortalGUID") %>' /> 
                <asp:Panel ID="pnlResumeDetails" runat="server" CssClass="resumeItem_details">  
                    <custom:ResumeDetails ID="resumeDetails" runat="server"   
                        RecruitmentPortalGuid='<%# Eval("RecruitmentPortalGUID") %>' ItemIndex='<%# ((Telerik.Web.UI.GridNestedViewItem)Container).ParentItem.ItemIndex %>'   
                        OnHide="resumeDetails_Hide" OnShow="resumeDetails_Show" OnInterview="resumeDetails_Interview" 
                        OnHire="resumeDetails_Hire" OnRelease="resumeDetails_Release" /> 
                </asp:Panel> 
            </NestedViewTemplate> 
              
        </MasterTableView> 
          
    </telerik:RadGrid> 
Kevin Kembel
Top achievements
Rank 1
 answered on 12 Feb 2010
3 answers
220 views

The telerik grid example:
http://demos.telerik.com/aspnet-ajax/controls/examples/integration/raduploadinajaxifiedgrid/defaultcs.aspx?product=upload

has the following:

        protected void RadGrid1_ItemCreated(object sender, GridItemEventArgs e)  
        {  
            if (e.Item is GridEditableItem && e.Item.IsInEditMode)  
            {  
                GridBinaryImageColumnEditor editor = ((GridEditableItem)e.Item).EditManager.GetColumnEditor("Upload") as GridBinaryImageColumnEditor;  
                TableCell cell = (TableCell)editor.RadUploadControl.Parent;  
                CustomValidator validator = new CustomValidator();  
                validator.ErrorMessage = "Please select file to be uploaded";  
                validator.ClientValidationFunction = "validateRadUpload";  
                validator.Display = ValidatorDisplay.Dynamic;  
                cell.Controls.Add(validator);  
            }  
        }  
 
but it is using a specific column type.
how do I add a required field validator to the upload if I am doing this:
                                        <telerik:gridtemplatecolumn uniquename="Upload" HeaderText="File Name">  
                                            <itemtemplate> 
                                                <asp:HyperLink ID="hlFile" runat="server" Target="_blank" /> 
                                            </itemtemplate> 
                                            <edititemtemplate> 
                                                <telerik:radupload id="RadUpload1" runat="server" ControlObjectsVisibility="None" InitialFileInputsCount="1" /> 
                                            </edititemtemplate> 
                                        </telerik:gridtemplatecolumn> 
 

I noticed this example:
http://demos.telerik.com/aspnet-ajax/grid/examples/generalfeatures/gridattachmentcolumn/defaultcs.aspx
what about validation on the attachment column?
robertw102
Top achievements
Rank 1
 answered on 12 Feb 2010
1 answer
127 views

Hi everyone,

I have a project in which two combobox (Parent - Child) and when I select an item from combobox parent, using javascript, the child combobox client-side load on the server side but appears empty.

someone knows why this happens and how to solve it?

Thanks

robertw102
Top achievements
Rank 1
 answered on 12 Feb 2010
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jake
Top achievements
Rank 1
RBarnes
Top achievements
Rank 1
Iron
Iron
Rami
Top achievements
Rank 1
Iron
Veteran
Nathan
Top achievements
Rank 1
Kumeri
Top achievements
Rank 1
Iron
Veteran
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jake
Top achievements
Rank 1
RBarnes
Top achievements
Rank 1
Iron
Iron
Rami
Top achievements
Rank 1
Iron
Veteran
Nathan
Top achievements
Rank 1
Kumeri
Top achievements
Rank 1
Iron
Veteran
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?