Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
207 views
Hi Telerik-Support,

It is possible to set the AutoPostBackOnFilter property on each grid column on client side (javascript) without a postback.
The logic to getting the columns/column on javascript isn't a problem. THe problem is more to get the property on client side from each column.

Thanks a lot.

Christian
Tsvetoslav
Telerik team
 answered on 23 Feb 2010
0 answers
81 views

I need help. I don’t know if I'm on the right track or if there is a better way to select a value from a foreign table.
I have 77.000 records in my foreign table and it creates loading problem when I open my EditForm.

I use an ObjectDataSource

<asp:ObjectDataSource ID="DS_All" runat="server" SelectMethod="getAll" 
    TypeName="CRSUsing+CRSData" > 
</asp:ObjectDataSource> 
 


The code behind looks like this

public class loopUpData 
{ 
    string Id; 
    string Txt; 
 
    public String id 
    { 
        get { return Id; } 
        set { Id = value; } 
    } 
 
    public String txt 
    { 
        get { return Txt; } 
        set { Txt = value; } 
    } 
} 
public ICollection getSagsbudgetAll() 
{ 
    SqlConnection myConnection; 
    ArrayList LookUplist = new ArrayList(); 
 
    myConnection = new SqlConnection(System.Configuration.ConfigurationManager.ConnectionStrings["SubjectConnect"].ToString()); 
 
    SqlCommand myCommand = new SqlCommand( 
        @"SELECT   distinct CAST(ID AS VARCHAR) as Id,  
                   (CAST(Id AS VARCHAR) + '  ' + Name) as Txt 
          FROM     s_dim  
          ORDER BY Id", myConnection); 
 
    myConnection.Open(); 
    SqlDataReader reader = myCommand.ExecuteReader(); 
 
    while (reader.Read()) 
    { 
        loopUpData lookUp = new loopUpData(); 
 
        lookUp.id = (string)reader["Id"]; 
        lookUp.txt = (string)reader["Txt"]; 
 
        LookUplist.Add(lookUp); 
    } 
 
    myConnection.Close(); 
    reader.Close(); 
    myCommand.Dispose(); 
 
    if (LookUplist != null && LookUplist.Count > 0) 
        return LookUplist; 
    else return null; 
 
} 
 

In my EditForm I have placed a ComoBox.
<telerik:RadComboBox ID="Box1" AppendDataBoundItems="true" runat="server" DataSourceID="DS_All" 
    Width="300px" DataTextField="Txt" DataValueField="Id" AutoPostBack="True" 
    EnableVirtualScrolling="true" TabIndex="1" EnableLoadOnDemand="true" 
    ShowMoreResultsBox="true"  
    SelectedValue='<%# DataBinder.Eval(Container, "DataItem.Value") %>' 
    ReadOnly='<%# DataItem is GridInsertionObject %>' Skin="Office2007" > 
</telerik:RadComboBox> 
 


Any Ideas on how to do this?
Thanks
Erik


Erik Hansen
Top achievements
Rank 1
 asked on 23 Feb 2010
1 answer
187 views
I have a grid and I'd like to always apply two filter conditions it whenever the user filters the grid.
1) always filter a column based on a bool being false
2) always filter a column based on the value of a session variable

I can get 1) working easy enough with the following code
<telerik:GridCheckBoxColumn DataField="IsOptimumStaff"  
  HeaderText="Active" CurrentFilterFunction="EqualTo" 
  CurrentFilterValue="false" Visible="false" /> 

But I can't get 2) to work I've tried

<telerik:GridBoundColumn DataField="Region.RegionId"  
  HeaderText="Region Id" Visible="false"  
  CurrentFilterFunction="EqualTo"  
  CurrentFilterValue='<%= Session("CurrentRegion") %>' /> 

Is it even possible to do with markup or do I need to write some code behind? If so how do I have my own default filter items while preserving the users filter?

Thanks 
Chris
Tsvetoslav
Telerik team
 answered on 23 Feb 2010
1 answer
102 views
Is there any way through which we can insert page break in the editor?
thanks in advance.
Georgi Tunev
Telerik team
 answered on 23 Feb 2010
1 answer
208 views
hi

How do i place a hyperlink that links to another page in the day view calender. The link when click should pickup the selected date and pass to the other page? Thanks
Peter
Telerik team
 answered on 23 Feb 2010
3 answers
302 views
I have a radgrid and I am trying to get the size of my edit form to be smaller.  I have tried the following:

* <EditFormSettings PopUpSettings-Modal="true" PopUpSettings-Height="400" PopUpSettings-Width="400" EditFormType="Template">
* <EditFormSettings PopUpSettings-Modal="true" PopUpSettings-Height="400px" PopUpSettings-Width="400px" EditFormType="Template">
*<EditFormSettings PopUpSettings-Modal="true"EditFormType="Template">
<PopUpSettings Height="400px" Width="400px" />

But none of the three seem to set the size of the popup to 400px.  What am I missing?

Thanks in advance,
Lee
Tsvetoslav
Telerik team
 answered on 23 Feb 2010
1 answer
130 views
How can i create dynamic docks with different data in a grid
Pero
Telerik team
 answered on 23 Feb 2010
1 answer
82 views
Hello,

I have radgrid with fixed-width columns (header and item). I am using static headers, column resizing and also allowrowselect is true. The grid is loaded properly, but if i select the first row of the grid (row click, client side) there is a mismatch in widths of header and item columns. This is happening only for the first row of the grid and for other rows it is working properly. Is there any way to fix this.

 

Pavlina
Telerik team
 answered on 23 Feb 2010
1 answer
222 views
I hope you can help.

I have an .aspx file, in which I wrote a lot of javascript code(myJS).

I embbeded that javascript code inside a some.DLL, in this file I have embbeded other .js files.

What do I need to do for inserting from some.DLL, my javascript code(myJS) using this function GetWebResourceUrl, so my web page works in the same manner as the original version with the javascript inside the .aspx?

Where an how do I need to put the call to some.dll GetWebResourceUrl
Tsvetoslav
Telerik team
 answered on 23 Feb 2010
3 answers
161 views
Hi I have read this thread http://www.telerik.com/help/aspnet-ajax/schedule_appearancetemplates.html on using templates I would like to be able to use the radio buttons to assign the job to a dept

when I load the page I get the following error

Databinding methods such as Eval(), XPath(), and Bind() can only be used in the context of a databound control.

this is my aspx
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %> 
 
<%@ Register assembly="System.Web.Ajax" namespace="System.Web.UI" tagprefix="asp" %> 
 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 
 
<html xmlns="http://www.w3.org/1999/xhtml">  
<head id="Head1" runat="server">  
    <title>Untitled Page</title> 
</head> 
<body> 
    <form id="form1" runat="server">  
    <div> 
    <AppointmentTemplate> 
   <div class="rsCustomAppointmentContainer <%# Eval("AppointmentType.Text") %>"> 
       <h2><%# Eval("Subject") %> 
           <asp:AjaxScriptManager ID="AjaxScriptManager1" runat="server">  
           </asp:AjaxScriptManager> 
       </h2> 
   </div> 
</AppointmentTemplate>   
        <telerik:RadScheduler ID="RadScheduler1" runat="server"   
            CustomAttributeNames="fileUpload" DataDescriptionField="jobDescription"   
            DataEndField="jobEnd" DataKeyField="jobId" DataSourceID="SqlDataSource1"   
            DataStartField="jobLive" DataSubjectField="jobName" Skin="Windows7">  
            <ResourceStyles> 
                <telerik:ResourceStyleMapping ApplyCssClass="" Key="fileUpload" Text=""   
                    Type="url" /> 
            </ResourceStyles> 
        </telerik:RadScheduler> 
        <asp:SqlDataSource ID="SqlDataSource1" runat="server"   
            ConnectionString="<%$ ConnectionStrings:JT2010ConnectionString %>"   
            SelectCommand="SELECT [jobId], [jobName], [jobType], [jobLive], [jobEnd], [jobDescription], [fileUpload], [UserId], [jobStatus], [jobCreated] FROM [Jobs] WHERE ([jobStatus] = @jobStatus)">  
            <SelectParameters> 
                <asp:Parameter DefaultValue="New" Name="jobStatus" Type="String" /> 
            </SelectParameters> 
        </asp:SqlDataSource> 
        <InlineInsertTemplate> 
   <div id="InlineInsertTemplate" class="rsCustomAppointmentContainer <%# Eval("AppointmentType.Text") %>"> 
       <asp:TextBox ID="TitleTextBox" runat="server" Text='<%# Bind("Subject") %>' Width="90%" TextMode="MultiLine" Height="20px"></asp:TextBox> 
   
       <asp:LinkButton ID="InsertButton" runat="server" CommandName="Insert">  
           <asp:Image runat="server" ID="insertImage" ImageUrl="Images/ok.gif" AlternateText="insert" /> 
       </asp:LinkButton> 
   
       <asp:LinkButton ID="InsertCancelButton" runat="server" CausesValidation="False" CommandName="Cancel">  
       <asp:Image runat="server" ID="Image2" ImageUrl="Images/cancel.gif" AlternateText="cancel" /> 
       </asp:LinkButton> 
   
       <div class="inline-label">Color code:</div> 
   
       <asp:RadioButtonList runat="server" ID="AppointmentTypeRadioButtonList"   
           DataValueField="type" CssClass="AppointmentTypeSelectorTable" 
  DataSourceID="SqlDataSource2" SelectedValue='<%# Bind("AppointmentTypeID") %>' DataTextField="type" 
  RepeatDirection="Horizontal"   
           DataTextFormatString="<span class='AppointmentTypeSelector rsAptType_{0}' onclick='onAppointmentTypeSelectorClick'></span>">  
       </asp:RadioButtonList> 
   
       <asp:SqlDataSource ID="SqlDataSource2" runat="server"   
           ConnectionString="<%$ ConnectionStrings:JT2010ConnectionString %>"   
           SelectCommand="SELECT [id], [type] FROM [JobType]"></asp:SqlDataSource> 
   
       <asp:LinkButton ID="InsertMoreButton" runat="server" CommandName="More" CssClass="rsAdvancedEditLink">Advanced</asp:LinkButton> 
   </div> 
</InlineInsertTemplate>   
<InlineEditTemplate> 
   <div id="InlineEditTemplate" class="rsCustomAppointmentContainer <%# Eval("AppointmentType.Text") %>"> 
       <asp:TextBox ID="TextBox2" runat="server" Text='<%# Bind("Subject") %>' Width="90%" TextMode="MultiLine" Height="20px"></asp:TextBox> 
   
       <asp:LinkButton ID="LinkButton3" runat="server" CommandName="Update">  
           <asp:Image runat="server" ID="Image6" ImageUrl="Images/ok.gif" AlternateText="update" /> 
       </asp:LinkButton> 
   
       <asp:LinkButton ID="LinkButton4" runat="server" CausesValidation="False" CommandName="Cancel">  
           <asp:Image runat="server" ID="Image7" ImageUrl="Images/cancel.gif" AlternateText="cancel" /> 
       </asp:LinkButton> 
   
       <div class="inline-label">Color code:</div> 
   
       <asp:RadioButtonList runat="server" ID="RadioButtonList3" DataValueField="type" CssClass="AppointmentTypeSelectorTable" 
  DataSourceID="SqlDataSource2" SelectedValue='<%# Bind("AppointmentTypeID") %>' DataTextField="type" 
  RepeatDirection="Horizontal"   
           DataTextFormatString="<span class='AppointmentTypeSelector rsAptType_{0}' onclick='onAppointmentTypeSelectorClick'></span>">  
       </asp:RadioButtonList> 
   
       <asp:LinkButton ID="LinkButton5" runat="server" CommandName="More" CssClass="rsAdvancedEditLink">Advanced</asp:LinkButton> 
   </div> 
</InlineEditTemplate>    
 
    </div> 
    </form> 
</body> 
</html> 

VB
Imports System.Web  
Imports System.Web.UI.HtmlControls  
Imports System.Web.UI.WebControls  
Imports System.Web.ApplicationServices  
 
Partial Class users_Default4  
    Inherits System.Web.UI.Page  
 
 
    Protected Sub RadScheduler1_FormCreated(ByVal sender As Object, _  
                               ByVal e As SchedulerFormCreatedEventArgs)  
        If e.Container.Mode = SchedulerFormMode.Insert Then 
            Dim list As RadioButtonList = _  
                DirectCast(e.Container.FindControl("AppointmentTypeRadioButtonList"),  _  
                                                    RadioButtonList)  
            list.SelectedIndex = 0  
        End If 
    End Sub 
End Class 
 

thanks

M
Peter
Telerik team
 answered on 23 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?