Telerik Forums
UI for ASP.NET AJAX Forum
3 answers
300 views
In my Source Code file i have a Hyperlink control... Which i want to access and give the url from code behind. I did using the following method but it is giving me error.
Please help me... Its very urgent.

Its throwing an exception.
 
 <telerik:GridTemplateColumn HeaderText="Visit No." UniqueName="VisitNo" DefaultInsertValue=""
                              
                            <ItemTemplate> 
                                <asp:HyperLink ID="lblVisitNo" runat="server" Text='<%#Bind("SiteVisitNo") %>' ></asp:HyperLink> 
                            </ItemTemplate> 
                        </telerik:GridTemplateClumn>


 protected void gvRenewal_ItemDataBound(object sender, Telerik.Web.UI.GridItemEventArgs e) 
    { 
        HyperLink lblVisitNo = (HyperLink)e.Item.FindControl("lblVisitNo"); 
        int SiteID = int.Parse(Request.QueryString["SID"]); 
        lblVisitNo.NavigateUrl = "~/Pages/Sites/Management_Sites/Renewal_SiteVisits.aspx?SID=" + SiteID; 
   
Princy
Top achievements
Rank 2
 answered on 05 Feb 2010
3 answers
157 views
The ScriptRegistrar.Render() method is throwing the exception: Specified file does not exist: "~/Scripts/jquery-1.4.js"

This is because I have upgraded to JQuery 1.4.1 .  What is my solution?
Atanas Korchev
Telerik team
 answered on 05 Feb 2010
3 answers
242 views
Hi,

I have a ASP.NET page with a RadAjaxManager and a UserControl ( uc1). The uc1 has another UserControl(uc2) inside. Is the there a way to trigger the uc2 to be updated using the RadAjaxManager from the main page?

Thank you,
Ruben.
Martin
Telerik team
 answered on 05 Feb 2010
3 answers
224 views
Hello,

I might be missing something obvious here, but server-side validation (i.e. Page.IsValid) fails for all my RadTextBox items when javascript is disabled.

 

<asp:ValidationSummary id="valSummary" runat="server" DisplayMode="BulletList" ShowSummary="true" />

 


 

<label for="txtStudentFirstName">First Name</label>

 

 

<telerik:RadTextBox ID="txtStudentFirstName" runat="server" CssClass="RadTextBox" MaxLength="30" />

 

<asp:RequiredFieldValidator id="rfvStudentFirstName" runat="server" ControlToValidate="txtStudentFirstName" ErrorMessage="First Name is required" Display="None" />

It seems as though the input value is not getting passed through. Could someone please shed some light on this...

Many thanks for any response.

Ryan Bartsch.
Dimo
Telerik team
 answered on 05 Feb 2010
1 answer
103 views
Hi,

I've a radgrid with scrolling enabled. I need to set the scroll height dynamically in he javascript in the onresize event.

how do i do this. I know scrolheight takes only pixels. I calculate my grid's height based on the formla:
(items.count * 24 ) + gridheaderheight.

Now the question is how can i access the scroll height in my javascript and set it to scroll height of radgrid in ascx. Pls help me with code.

When I get the scroll height fitting my screen, I shouldn't get the IE scrollbar? how do i do this
Tsvetoslav
Telerik team
 answered on 05 Feb 2010
7 answers
125 views
 I am facing one problem in RadGrid. After setting the FrozenColumnCount property, when I (horizontally) scrolled to the right end of the grid, it is leaving empty space (see the attach image). Here is the code which I am using.

<form id="form1" runat="server">
    <div>
    <asp:ScriptManager ID="ScriptManager1" runat="server"></asp:ScriptManager>
   
    <telerik:RadGrid ID="RadGrid1" runat="server" AutoGenerateColumns="true" Width="100%">
        <MasterTableView HeaderStyle-Width="80px"></MasterTableView>
        <ClientSettings>
            <Scrolling AllowScroll="True" UseStaticHeaders="True" FrozenColumnsCount="2"></Scrolling>
            <Selecting AllowRowSelect="true" />   
        </ClientSettings>
    </telerik:RadGrid>
    </div>
    </form>

Code Behind is:

protected void Page_Load(object sender, EventArgs e)
    {
        RadGrid1.NeedDataSource += new GridNeedDataSourceEventHandler(RadGrid1_NeedDataSource);
        RadGrid1.PreRender += new EventHandler(RadGrid1_PreRender);
        RadGrid1.ItemDataBound += new GridItemEventHandler(RadGrid1_ItemDataBound);
    }

    protected void RadGrid1_ItemDataBound(object sender, GridItemEventArgs e)
    {
        //RadGrid1.MasterTableView.AutoGeneratedColumns[7].HeaderStyle.Width = Unit.Pixel(40);
        //RadGrid1.MasterTableView.AutoGeneratedColumns[10].HeaderStyle.Width = Unit.Pixel(40);
    }

    protected void RadGrid1_PreRender(object sender, EventArgs e)
    {

    }

    protected void RadGrid1_NeedDataSource(object source, GridNeedDataSourceEventArgs e)
    {
        RadGrid1.DataSource = GetResultsTable();
    }

    public DataTable GetResultsTable()
    {
        DataTable dt = new DataTable();

        for (int i = 0; i < 70; i++)
        {
            dt.Columns.Add("Column " + i);
            List<object> objectNumbers = new List<object>();

            for (int j = 0; j < 10; j++)
            {
                objectNumbers.Add(i.ToString() + "," + j.ToString());
            }

            while (dt.Rows.Count < objectNumbers.Count)
            {
                dt.Rows.Add();
            }

            for (int k = 0; k < 10; k++)
            {
                dt.Rows[k][i] = objectNumbers[k];
            }
        }
        return dt;
    }



I will really appreciate for quick response. Thanks

Best Regards,
M. Irfan
Dimo
Telerik team
 answered on 05 Feb 2010
1 answer
104 views
Hello,

I have a radgridview... inside that i have two dropdownlistsin the edititemtemplate. When i want to edit a row. the selected valeu should be the one which was there as a label.
And if i change any value from first dropdownlist. iwant to send its selected value to another dropdownlist...
please tell me how to do this.... reply soon.
<telerik:GridTemplateColumn> 
                                <ItemTemplate> 
                                    <asp:Label ID="Label1" runat="server" Text='<%#Bind("Equipment") %>'></asp:Label> 
                                </ItemTemplate> 
                                <EditItemTemplate> 
                                    <asp:DropDownList DataSourceID="SqlEquipmentSource" DataTextField="Equipment" DataValueField="ID" 
                                        ID="ddlEquipmentGrid" runat="server" OnSelectedIndexChanged="DropDownList2_SelectedIndexChanged" 
                                        AutoPostBack="true" SelectedValue='<%#Bind("EquipmentID") %>'
                                    </asp:DropDownList> 
                                </EditItemTemplate> 
                            </telerik:GridTemplateColumn> 
                            <telerik:GridTemplateColumn> 
                                <ItemTemplate> 
                                    <asp:Label ID="Label2" Text='<%#Bind("Brand") %>' runat="server"></asp:Label> 
                                </ItemTemplate> 
                                <EditItemTemplate> 
                                    <asp:DropDownList  DataSourceID="SqlBrandSource" 
                                        DataTextField="Brand" DataValueField="ID" ID="DropDownList3" runat="server" SelectedValue='<%#Bind("BrandID") %>' /> 
                                    <asp:SqlDataSource ID="SqlBrandSource" runat="server" ConnectionString="<%$ ConnectionStrings:mobily_alexmarConnectionString %>" 
                                        SelectCommand="SELECT ID, Brand FROM tbl_Sites_EquipmentBrands WHERE (EquipmentID = @EquipmentID)"
                                        <SelectParameters> 
                                            <asp:ControlParameter ControlID="ddlEquipmentGrid" DefaultValue="0" Name="EquipmentID" 
                                                PropertyName="SelectedValue" /> 
                                        </SelectParameters> 
                                    </asp:SqlDataSource> 
                                </EditItemTemplate> 
                            </telerik:GridTemplateColumn> 
. In edit mode
Princy
Top achievements
Rank 2
 answered on 05 Feb 2010
1 answer
135 views
Hello Everybody,
I want to change the icon of the directory in RadFileExplorer. I have tried all the procedure given in Icon Override thread. I have changed FileExplorer.css completely but unable to change icons.
I want to change icon programatically, Not through CSS.
Can anybody provide me some other code which is changing Icon of the directory...

Regards
Samee Javaid
Fiko
Telerik team
 answered on 05 Feb 2010
1 answer
94 views
Trying to develop my first serious app using Telerik. 

Ok so far, but I'd like to use the Ajax capabilities within the editform template so i can load controls based on the user selections made in other controls, and so on.  In most cases I need to go back to the server for data, and I would prefer to do this server-side in C#/Linq.

I've added a RadAjaxManagerProxy to the template (have a RadAjaxManager on the master page) and can see the components on the template from the ajax manager's config. window.  However, no events are fired until the whole form is submitted, which is not the behaviour I need.

Questions:
1.    is ajax available within a form template? 
2.    If so, how do I set it up?

Many thanks,
Peter

p.s. this is probably a real 101 question, but I'm used to Windows development.  ASP.Net is a real culture shock!
Tsvetoslav
Telerik team
 answered on 05 Feb 2010
0 answers
90 views
How to reproduce a video from nodoUrl, i can see image, pdf. but no a video format FLV. Thanks!!!!
Juan Carlos Carrasco
Top achievements
Rank 1
 asked on 05 Feb 2010
Narrow your results
Selected tags
Tags
+? more
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?