Telerik Forums
UI for ASP.NET AJAX Forum
2 answers
257 views
hi

How do i pass session variables in code behind with radwindows:

RadAjaxManager1.ResponseScripts.Add("openRadWindow('Session("consultationid")')")

I am not able to get it right? thanks

 

L
Top achievements
Rank 1
 answered on 09 Dec 2009
1 answer
109 views
hi

I will layout my step by step of what i did so that you can reproduce the Telerik Undefinedand sys undefined error

1. I did my work in Windows 7. It is installed with VS2008 and Telerik 2009 Q1 and SQL Express 2008
2. Many of my page consist of RadGrid and 1 page Rad Scheduler. And all pages ajax using RadAjaxProxy manager
3. The master page has a Rad Windows Manager and Rad Ajax Manager and using RadScriptManager and Rad Menu
4. I test my page on my local machine and working perfectly fine.
5. I compiled using single page assemblies and also tested the compiled version locally on my windows 7 machine and it works fine.
6. I installed a Windows Server 2008 R2 64 Web Edition on another machine and SQL Express 2008
7. I enabled\installed the Framework 3.5.1 features in Windows 2008.
8. I copied the compiled version folder from my local machine to Windows Server 2008  inetpub - wwwroot- folder.
9. I convert the compiled version to an application in Windows Server 2008.
10. I type http://localhost/compiledversion/login.aspx on Win Server 2008 and it display the page and i am able to login using a demo DB username and password.
11. The moment i try to view a schedule page, it just gave me Telerik Undefined and sys Undefined.
12. I view a page with Radgrid, same thing, it just gave me Telerik Undefined and sys Undefined.

Those page without any radc controls seem ok.

I have gone most of your forums but it didn't specifically mention anything about Windows Server 2008 environment.

Please help me. Thanks
Pavel
Telerik team
 answered on 09 Dec 2009
1 answer
289 views
Hi,

I have added a captcha to a login control and then tried to apply the security in the web.config.
<authorization > 
            <deny users="?" /> 
            <allow users="?" /> 
        </authorization> 
    </system.web> 
    <location path="Bin"> 
        <system.web> 
            <authorization> 
                <allow users ="*" /> 
            </authorization> 
        </system.web> 
    </location> 
    <location path="login.aspx"> 
        <system.web> 
            <authorization> 
                <allow users ="*" /> 
            </authorization> 
        </system.web> 
    </location> 
    <location path="CSS"> 
        <system.web> 
            <authorization> 
                <allow users ="*" /> 
            </authorization> 
        </system.web> 
    </location> 
    <location path="Images"> 
        <system.web> 
            <authorization> 
                <allow users ="*" /> 
            </authorization> 
        </system.web> 
    </location> 
 and also added the form in the authentication tag. What happens is when loading the login page is that the captcha image isnot shown, when i remove the first authorization tag, and reload the login page the image appear. It seems that applying the security this way has denied access to the image.

So what should I change to enable the images to be shown again?

Best regards,
Sameh Awad
Pero
Telerik team
 answered on 09 Dec 2009
3 answers
302 views
Hi,

I am dynamically creating linkbutton in the item data bound event of the rad grid. i have added click event for link button. but the thing is the Click event not at all firing when i click the linkbutton. But the dynamic buttons are get vanished after the click. Pls give me the solution. its very urgent. my sample code is

 

foreach (MemberDetail memberDetail in newShopper.MemberDetails)

 

{

linkMemberName =

new LinkButton();

 

tdMember =

new HtmlTableCell();

 

tdEditMember =

new HtmlTableCell();

 

trowMember =

new HtmlTableRow();

 

linkMemberName.ID =

"id1";

 

linkMemberName.Text = memberDetail.FirstName;

linkMemberName.CommandArgument = memberDetail.ID.ToString();

linkMemberName.Click +=

new EventHandler(linkMemberName_Click);

 

tdMember.Controls.Add(linkMemberName); 

 

tblMemberDetails.Controls.Add(trowMember);

}



 

void linkMemberName_Click(object sender, EventArgs e)

 

{

 

throw new NotImplementedException();

 

}


Thanks,
Jeevitha 
jeevitha
Top achievements
Rank 1
 answered on 09 Dec 2009
3 answers
290 views
Hi:

What is the best way to wrap long items in a RadComboBox, such that:

1. An ellipsis is displayed for long names;
2. The items do not wrap and span more than 1 line;
3. On hovering on item, full text is displayed as tooltip;

I read that there is a "TextClipper" that can be used for this purpose, but I did not find any examples.

Any help will be appreciated.

Thanks .. Rohit Dehar
Yana
Telerik team
 answered on 09 Dec 2009
2 answers
302 views
I want to create two tabs one with grid and one with radchart and one grid in other tab but it will be invisible .Is it possible to create all these without using usercontrol.Please give some example code.
Thanks
Princy
Top achievements
Rank 2
 answered on 09 Dec 2009
3 answers
439 views
Hi All,

I am calling radwindow through parent.asxp page, within a that radwindow have one child.aspx page and that page have two tab i.e. One, and Two, within a One tab have a One.ascx user control, and Two tab has a Two.ascx user control. Two.ascx user control have one button, when i click on that buttton it should close radwindow as well as refresh radGrid1 available in parent page, without postback.

Please reply me.


Thanks & Regards,
Amit
Georgi Tunev
Telerik team
 answered on 09 Dec 2009
1 answer
170 views
I have a grid with an edit form template.  I am having a heck of a time binding the controls in the edit form when a row is selected.  When I try and perform a find control the control is always null.  Please help!
<asp:ObjectDataSource ID="CurrencyDataSource" runat="server"   
                SelectMethod="RetrieveLookupsByLookupTypeId"   
                TypeName="Graebel.RITS.Components.BusinessManagers.LookupManager">  
                <SelectParameters> 
                    <asp:Parameter DefaultValue="106" Name="lookupTypeId" Type="Int32" /> 
                </SelectParameters> 
            </asp:ObjectDataSource> 
            <asp:ScriptManager ID="ScriptManager1" runat="server">  
            </asp:ScriptManager> 
            <telerik:RadGrid ID="RemittanceGrid" runat="server" AllowAutomaticInserts="True" 
                AllowAutomaticUpdates="True" AllowSorting="True" AutoGenerateColumns="False" 
                GridLines="None" Skin="Telerik" ShowStatusBar="True"   
                OnItemCommand="RemittanceGrid_ItemCommand" AutoGenerateEditColumn="True"   
                onneeddatasource="RemittanceGrid_NeedDataSource"   
                onitemdatabound="RemittanceGrid_ItemDataBound">  
                <pagerstyle mode="NumericPages" alwaysvisible="true" /> 
                <mastertableview width="100%" commanditemdisplay="Top" datakeynames="VendorRemittanceId" 
                    allowautomaticinserts="True">  
                    <Columns> 
                        <telerik:GridBoundColumn UniqueName="RemittanceId" DataField="Remittance.RemittanceId">  
                        </telerik:GridBoundColumn> 
                        <telerik:GridBoundColumn HeaderText="Bank Name" UniqueName="BankName" DataField="Remittance.BankName">  
                        <HeaderStyle HorizontalAlign="Center" /> 
                        <ItemStyle HorizontalAlign="Center" /> 
                        </telerik:GridBoundColumn> 
                        <telerik:GridBoundColumn HeaderText="Account #" UniqueName="Account" DataField="Remittance.AccountNumber">  
                        <HeaderStyle HorizontalAlign="Center" /> 
                        <ItemStyle HorizontalAlign="Center" /> 
                        </telerik:GridBoundColumn> 
                        <telerik:GridBoundColumn HeaderText="Currency" UniqueName="Currency" DataField="Lookups.Text.Description">  
                        <HeaderStyle HorizontalAlign="Center" /> 
                        <ItemStyle HorizontalAlign="Center" /> 
                        </telerik:GridBoundColumn> 
                        <telerik:GridBoundColumn HeaderText="Sequence" UniqueName="Sequence" DataField="SequenceNum">  
                        <HeaderStyle HorizontalAlign="Center" /> 
                        <ItemStyle HorizontalAlign="Center" /> 
                        </telerik:GridBoundColumn> 
                    </Columns> 
                    <EditFormSettings EditFormType="Template">  
                        <FormTemplate> 
                            <table style="width: 100%;">  
                                <tr> 
                                    <td> 
                                        Currency:  
                                    </td> 
                                    <td> 
                                        <asp:DropDownList AppendDataBoundItems="true" ID="DropDownList1" runat="server" DataSourceID="CurrencyDataSource"   
                                        DataTextField="Description" DataValueField="LookupId" > 
                                        <asp:ListItem Text="Select" Value=""></asp:ListItem> 
                                        </asp:DropDownList> 
                                    </td> 
                                    <td> 
                                        Non-Currency Specific Vendor:  
                                    </td> 
                                    <td> 
                                        <asp:CheckBox ID="CheckBox1" runat="server"  /> 
                                    </td> 
                                </tr> 
                                <tr> 
                                    <td> 
                                        Bank Sequence:  
                                    </td> 
                                    <td> 
                                        <asp:TextBox ID="TextBox1" runat="server" ></asp:TextBox> 
                                    </td> 
                                    <td> 
                                        Account #:  
                                    </td> 
                                    <td> 
                                        <asp:TextBox ID="TextBox2" runat="server" ></asp:TextBox> 
                                    </td> 
                                </tr> 
                                <tr> 
                                    <td> 
                                        Payable Name:  
                                    </td> 
                                    <td> 
                                        <asp:TextBox ID="TextBox3" runat="server" ></asp:TextBox> 
                                    </td> 
                                    <td> 
                                        ABA Transit Route #:  
                                    </td> 
                                    <td> 
                                        <asp:TextBox ID="TextBox4" runat="server" ></asp:TextBox> 
                                    </td> 
                                </tr> 
                                <tr> 
                                    <td> 
                                        Swift Code:  
                                    </td> 
                                    <td> 
                                        <asp:TextBox ID="TextBox5" runat="server" ></asp:TextBox> 
                                    </td> 
                                    <td> 
                                        ISO Package Received:  
                                    </td> 
                                    <td> 
                                        <asp:CheckBox ID="CheckBox2" runat="server" /> 
                                    </td> 
                                </tr> 
                                <tr> 
                                    <td> 
                                        Bank Name:  
                                    </td> 
                                    <td> 
                                        <asp:TextBox ID="TextBox6" runat="server" ></asp:TextBox> 
                                    </td> 
                                    <td> 
                                        Bank Address:  
                                    </td> 
                                    <td> 
                                        <asp:TextBox ID="TextBox7" runat="server" ></asp:TextBox> 
                                    </td> 
                                </tr> 
                                <tr> 
                                    <td> 
                                        &nbsp;  
                                    </td> 
                                    <td> 
                                        &nbsp;  
                                    </td> 
                                    <td> 
                                        &nbsp;  
                                    </td> 
                                    <td> 
                                        <asp:TextBox ID="TextBox8" runat="server" ></asp:TextBox> 
                                    </td> 
                                </tr> 
                                <tr> 
                                    <td> 
                                        City:  
                                    </td> 
                                    <td> 
                                        <asp:TextBox ID="TextBox9" runat="server" ></asp:TextBox> 
                                    </td> 
                                    <td> 
                                        &nbsp;  
                                    </td> 
                                    <td> 
                                        <uc1:StateCountryFields ID="m_stateCountryFields" runat="server" /> 
                                    </td> 
                                </tr> 
                                <tr> 
                                    <td> 
                                        Zip:  
                                    </td> 
                                    <td> 
                                        <asp:TextBox ID="TextBox10" runat="server" ></asp:TextBox> 
                                    </td> 
                                    <td> 
                                        &nbsp;  
                                    </td> 
                                    <td> 
                                        &nbsp;  
                                    </td> 
                                </tr> 
                                <tr> 
                                    <td> 
                                        <asp:Button ID="btnUpdate" Text='<%# (Container is GridEditFormInsertItem) ? "Insert" : "Update" %>' 
                                            runat="server" CommandName='<%# (Container is GridEditFormInsertItem) ? "PerformInsert" : "Update" %>'>  
                                        </asp:Button> 
                                        <asp:Button ID="btnCancel" Text="Cancel" runat="server" CausesValidation="False" 
                                            CommandName="Cancel"></asp:Button> 
                                    </td> 
                                    <td> 
                                        &nbsp;  
                                    </td> 
                                    <td> 
                                        &nbsp;  
                                    </td> 
                                    <td> 
                                        &nbsp;  
                                    </td> 
                                </tr> 
                            </table> 
                        </FormTemplate> 
                    </EditFormSettings> 
                </mastertableview> 
            </telerik:RadGrid> 
protected void RemittanceGrid_ItemDataBound(object sender, GridItemEventArgs e)  
        {  
            if (e.Item is GridCommandItem && e.Item.IsInEditMode)  
            {  
                DropDownList currency = (DropDownList)e.Item.FindControl("ddlCurrency");  
                HiddenField vrId = (HiddenField)e.Item.FindControl("VendorRemittanceId");  
                CheckBox isGlobal = (CheckBox)e.Item.FindControl("chkGlobalCurrency");  
                RadNumericTextBox sequenceNum = (RadNumericTextBox)e.Item.FindControl("SequenceNum");  
                TextBox ABA = (TextBox)e.Item.FindControl("m_tbABATransitNumber");  
                TextBox accountNumber = (TextBox)e.Item.FindControl("m_tbAccountNumber");  
                TextBox payableName = (TextBox)e.Item.FindControl("m_tbPayableName");  
                TextBox swiftCode = (TextBox)e.Item.FindControl("m_tbSwiftCode");  
                TextBox bankName = (TextBox)e.Item.FindControl("m_tbBankName");  
                CheckBox ISO = (CheckBox)e.Item.FindControl("m_cbISOPackageReceived");  
                UserControl stateCountry = (UserControl)e.Item.FindControl("m_stateCountryFields");  
                TextBox address1 = (TextBox)e.Item.FindControl("m_tbBankAddress");  
                TextBox address2 = (TextBox)e.Item.FindControl("m_tbBankAddress2");  
                TextBox city = (TextBox)e.Item.FindControl("m_tbBankCity");  
                TextBox zip = (TextBox)e.Item.FindControl("m_tbBankPostalCode");  
                HiddenField addressId = (HiddenField)e.Item.FindControl("AddressId");  
 
                VendorPaymentInfoManager vpim = new VendorPaymentInfoManager();  
                int RemittanceId = 0;  
                Int32.TryParse(e.Item.Cells[2].Text, out RemittanceId);  
                Graebel.RITS.Components.RitsEntityDal.VendorRemittance remit = new Graebel.RITS.Components.RitsEntityDal.VendorRemittance();  
                Graebel.RITS.Components.RitsEntityDal.Addresses remitAddress = new Addresses();  
                if (RemittanceId != 0)  
                {  
                    remit = vpim.GetRemittanceInfo(RemittanceId);  
                    remitAddress = vpim.GetRemittanceAddressInfo(remit.Remittance.RemittanceId);  
                }  
                if (currency != null)  
                {  
                    currency.SelectedValue = remit.Lookups.LookupId.ToString();  
                }  
                if (vrId != null)  
                {  
                    vrId.Value = remit.VendorRemittanceId.ToString();  
                }  
                if (isGlobal != null)  
                {  
                    isGlobal.Checked = remit.IsGlobalCurrency;  
                }  
                if (sequenceNum != null)  
                {  
                    sequenceNum.Value = remit.SequenceNum;  
                }  
                if (ABA != null)  
                {  
                    ABA.Text = remit.Remittance.ABATransitRoutingNumber;  
                }  
                if (accountNumber != null)  
                {  
                    accountNumber.Text = remit.Remittance.AccountNumber;  
                }  
                if (payableName != null)  
                {  
                    payableName.Text = remit.Remittance.PayableName;  
                }  
                if (swiftCode != null)  
                {  
                    swiftCode.Text = remit.Remittance.SWIFTCode;  
                }  
                if (bankName != null)  
                {  
                    bankName.Text = remit.Remittance.BankName;  
                }  
                if (ISO != null)  
                {  
                    ISO.Checked = remit.Remittance.HasISOPackage.Value;  
                }  
                if (stateCountry != null)  
                {  
                    RITS.Web.Controls.TypedDropDownList state = (RITS.Web.Controls.TypedDropDownList)stateCountry.FindControl("m_ddlState");  
                    RITS.Web.Controls.TypedDropDownList country = (RITS.Web.Controls.TypedDropDownList)stateCountry.FindControl("m_ddlCountry");  
                    state.SelectedValue = remitAddress.States.StateId.ToString();  
                    country.SelectedValue = remitAddress.Countries.CountryId.ToString();  
                }  
                if (address1 != null)  
                {  
                    address1.Text = remitAddress.Address1;  
                }  
                if (address2 != null)  
                {  
                    address2.Text = remitAddress.Address2;  
                }  
                if (city != null)  
                {  
                    city.Text = remitAddress.City;  
                }  
                if (zip != null)  
                {  
                    zip.Text = remitAddress.Zip;  
                }  
                if (addressId != null)  
                {  
                    addressId.Value = remitAddress.AddressId.ToString();  
                }  
            }  
        }  
 
protected void RemittanceGrid_ItemCommand(object source, GridCommandEventArgs e)  
        {  
            if (e.CommandName == RadGrid.InitInsertCommandName)  
            {  
 
                e.Canceled = true;  
                //Prepare an IDictionary with the predefined values  
                System.Collections.Specialized.ListDictionary newValues = new System.Collections.Specialized.ListDictionary();  
                newValues["IsGlobalCurrency"] = false;  
                newValues["Remittance.AccountNumber"] = string.Empty;  
                newValues["Remittance.PayableName"] = string.Empty;  
                newValues["Remittance.ABATransitRoutingNumber"] = string.Empty;  
                newValues["Remittance.SWIFTCode"] = string.Empty;  
                newValues["Remittance.HasISOPackage"] = false;  
                newValues["Remittance.BankName"] = string.Empty;  
                newValues["Remittance.Addresses.Address1"] = string.Empty;  
                newValues["Remittance.Addresses.Address2"] = string.Empty;  
                newValues["Remittance.Addresses.City"] = string.Empty;  
                newValues["Remittance.Addresses.Zip"] = string.Empty;  
                newValues["Lookups.LookupId"] = string.Empty;  
 
                //Insert the item and rebind  
                e.Item.OwnerTableView.InsertItem(newValues);  
            }              
        } 
Princy
Top achievements
Rank 2
 answered on 09 Dec 2009
1 answer
183 views
I am using the following code to change the header on a grid:

protected

 

void RouteInquiryGrid_ItemDataBound(object sender, GridItemEventArgs e)

 

{

 

if ((e.Item is GridHeaderItem))

 

{

 

GridHeaderItem header = (GridHeaderItem)e.Item;

 

 

if (SessionHelper.Instance.WeightUOM.Id == WeightUOM.English.Id)

 

{

header[

"ContainerWeightQty"].Text = "Weight" + WeightUOM.GetAsString(WeightUOM.English.Id);

 

}

 

else

 

{

header[

"ContainerWeightQty"].Text = "Weight" + WeightUOM.GetAsString(WeightUOM.Metric.Id);

 

}

}

}

This works great and the header text is changed.  However, when I do this I lose the ability to sort on the column.  Is there an easy way to get the sort active again.

Thanks,

- Adam

Shinu
Top achievements
Rank 2
 answered on 09 Dec 2009
2 answers
208 views
Inside templatecolumn of radGrid, I have a radio Button. I want to check its value on client side. I had written following code

 var grid = $find("<%=radGridQuotes.ClientID%>");
    var MasterTable = grid.get_masterTableView();
    var Rows = MasterTable.get_dataItems();  
    for (var i = 0; i < Rows.length; i++)
    {
        var row = Rows[i];

//After this i dont know how to find the radio button control. i tried    var radioButton = row.findControl("radioButtonApprove");  but this is throwing error as propert cant be found. can anyone help me on this?....

}

Abhinav Katiyaar
Top achievements
Rank 1
 answered on 09 Dec 2009
Narrow your results
Selected tags
Tags
+? more
Top users last month
Tien
Top achievements
Rank 1
Iron
Krasimir
Top achievements
Rank 3
Bronze
Iron
Iron
Cedar
Top achievements
Rank 1
Iron
Emil
Top achievements
Rank 1
Iron
Kyle Watson
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Tien
Top achievements
Rank 1
Iron
Krasimir
Top achievements
Rank 3
Bronze
Iron
Iron
Cedar
Top achievements
Rank 1
Iron
Emil
Top achievements
Rank 1
Iron
Kyle Watson
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?