Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
145 views
I have a grid

<telerik:RadGrid ID="RadGrid1" runat="server" Skin="Office2007" AllowPaging="true"
                            AllowCustomPaging="true" PageSize="20" AutoGenerateColumns="False" GridLines="None"
                            AlternatingItemStyle-BackColor="#eeeeee" ShowStatusBar="true" AllowFilteringByColumn="true"
                            AllowSorting="true" EnableLinqExpressions="true" OnPreRender="RadGrid1_PreRender"
                            OnItemDataBound="RadGrid1_ItemDataBound" OnNeedDataSource="RadGrid1_NeedDataSource">
                            <AlternatingItemStyle BackColor="#EEEEEE"></AlternatingItemStyle>
                            <MasterTableView DataKeyNames="TaskID">
                                <AlternatingItemStyle BackColor="#EEEEEE"></AlternatingItemStyle>
                                <RowIndicatorColumn>
                                    <HeaderStyle Width="20px"></HeaderStyle>
                                </RowIndicatorColumn>
                                <Columns>
                                        <telerik:GridTemplateColumn SortExpression="StatusCodeTypeName"  DataField="StatusCodeTypeName"
                                        HeaderText="Status" UniqueName="StatusCodeTypeName">
                                        <ItemTemplate>
                                            <telerik:RadComboBox runat="server" ID="DropDownList1" EnableViewState="false" DataTextField="StatusCodeTypeName"
                                                DataValueField="StatusCodeTypeID" DataSourceID="SqlDataSource1" OnClientSelectedIndexChanged="UpdateTask"
                                                Skin="Office2007">
                                            </telerik:RadComboBox>
                                        </ItemTemplate>
                                        <FilterTemplate>
                                            <telerik:RadComboBox ID="rcbStatus" DataTextField="StatusCodeTypeName" DataValueField="StatusCodeTypeName"
                                                AppendDataBoundItems="true" Width="150px" SelectedValue='<%# ((GridItem)Container).OwnerTableView.GetColumn("StatusCodeTypeName").CurrentFilterValue %>'
                                                runat="server" OnClientSelectedIndexChanged="ClientNameIndexChanged" Skin="Office2007">
                                            </telerik:RadComboBox>
                                            <telerik:RadScriptBlock ID="RadScriptBlock1" runat="server">
  
                                                <script type="text/javascript">
                                                          function ClientNameIndexChanged(sender, args) {
             
                                                              var tableView = $find("<%# ((GridItem)Container).OwnerTableView.ClientID %>");
                                                              if (args.get_item().get_value() == "0") {
                                                                 tableView.filter("StatusCodeTypeName", args.get_item().get_value(), "NoFilter");
                                                              }
                                                              else {
                                                                 tableView.filter("StatusCodeTypeName", args.get_item().get_value(), "EqualTo");
                                                              }
                                                          }
                                                </script>
  
                                            </telerik:RadScriptBlock>
                                        </FilterTemplate>
                                        <ItemStyle VerticalAlign="Top" />
                                    </telerik:GridTemplateColumn>
                                </Columns>
                            </MasterTableView>
                        </telerik:RadGrid>

In the Grid you can see it has a  GridTemplateColumn, in which is a RadComboBox for both the ItemTemplate and FilterTemplate.  The Filter template is working fine.  The porblem is in the grid it shows the item radcombobox loaded with all the selections but the current value is not the selected when in the grid.  How do I  set the selected value?

GridTemplateColumn

Eric Klein
Top achievements
Rank 1
 answered on 29 Sep 2011
2 answers
74 views
I'm using a RadGrid which has paging enabled and has a default page size set to 5. I am displaying some dummy data which contains 8 records.

When I was viewing my data i switched the page size using the paging bar page size drop down to 10 and sure enough the grid showed me all 8 records. However, because the number of rows being displayed was less than the number of rows to show per page, the paging bar was no longer visible.

How would I now reset/change my page size back to 5?

Is there an option to force the paging bar to be visible even if the number of records in the grid is less than the page size?

Karl
Karl
Top achievements
Rank 1
 answered on 29 Sep 2011
2 answers
214 views
Hi,

I have an ongoing solution using the old telerik dll and I wish not to upgrade the dll to the latest version to avoid any incompatibility problem with the existing codes.
However I wish to start another solution using the latest dll using the same machine.
Is there a method to configure the same machine to host 2 different version of dlls?
If there is, may I know what are the steps to configure it?

Thanks.
Miguel
Top achievements
Rank 1
 answered on 29 Sep 2011
3 answers
191 views
Hi,
  Is there any possibility to add two versions of the telerik dll in the same project.
Miguel
Top achievements
Rank 1
 answered on 29 Sep 2011
6 answers
181 views
Howdy,
I have used this Demo to setup a RadScheduler in an existing project.  Before I added the Advanced Templates as described in the demo, my one Resource (called "Group") was properly setting the value of a RadCombobox when you open the appointment.  Since the change, even though the combobox is created and populated correctly, the actual value will not bind.  Frustration level is fairly high right now as we're trying to integrate this into an existing project and every path I've taken i've run into a brick wall.

We're using a webservice local to the web application to call into another ASP.NET webservice to all the gets/saves/deletes, etc.  Had to jump through a bunch of hoops to make that happen.  I really need the abililty to make the custom templates work... can you please suggest something for me to try?

Best Regards.
Peter
Telerik team
 answered on 29 Sep 2011
2 answers
115 views
Hi, I spent many time to change the numeric symbol from Latin to Persian but i couldn't , can any one tell me how can i change them?
Thanks
Pooia
Top achievements
Rank 1
 answered on 29 Sep 2011
1 answer
76 views
This is my code.

<telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
            <AjaxSettings>
                <telerik:AjaxSetting AjaxControlID="RadAjaxManager1">
                    <UpdatedControls>
                        <telerik:AjaxUpdatedControl ControlID="RadSchedulerTemplate" />
                    </UpdatedControls>
                </telerik:AjaxSetting>
                <telerik:AjaxSetting AjaxControlID="RadSchedulerTemplate">
                    <UpdatedControls>
                        <telerik:AjaxUpdatedControl ControlID="RadSchedulerTemplate" />
                    </UpdatedControls>
                </telerik:AjaxSetting>
            </AjaxSettings>
        </telerik:RadAjaxManager>

and vb code.

Dim app As Appointment = e.Appointment
Dim subject As String = app.Subject
Dim startDate As DateTime = app.Start
Dim endDate As DateTime = app.End
Dim recurrenceRule As String = app.RecurrenceRule
Dim recurrenceParentID As Integer = app.RecurrenceParentID
Dim description As String = app.Description
 
dbConnection.ConnectionString = ConfigurationManager.ConnectionStrings("Test").ConnectionString
dbConnection.Open()
dbCommand = dbConnection.CreateCommand
dbCommand.CommandType = CommandType.StoredProcedure
dbCommand.CommandText = "S_Test"
dbCommand.Parameters.Add("@Subject", SqlDbType.VarChar).Value = subject
dbCommand.Parameters.Add("@StartDate", SqlDbType.DateTime).Value = startDate
dbCommand.Parameters.Add("@EndDate", SqlDbType.DateTime).Value = endDate
If Not String.IsNullOrEmpty(recurrenceRule) Then
    dbCommand.Parameters.Add("@RecurrenceRule", SqlDbType.VarChar).Value = recurrenceRule
End If
If recurrenceParentID <> 0 Then
    dbCommand.Parameters.Add("@RecurrenceParentID", SqlDbType.Int).Value = recurrenceParentID
End If
If Not String.IsNullOrEmpty(description) Then
    dbCommand.Parameters.Add("@Description", SqlDbType.VarChar).Value = description
End If
 
dbCommand.ExecuteNonQuery()
RadSchedulerTemplate.Rebind()

So, Why does not rebind?
Plamen
Telerik team
 answered on 29 Sep 2011
0 answers
116 views



hi all :)

I have a list view, and I want to pass some parameters when index change

I take some ideas from this demo for list box

http://demos.telerik.com/aspnet-ajax/listbox/examples/functionality/relatedlistboxes/defaultcs.aspx


but I still have some thing that never converted with me to suit list view

here it is

protected void Page_Load(object sender, EventArgs e)
{
    RadListBox1.ItemDataBound += new Telerik.Web.UI.RadListBoxItemEventHandler(RadListBox1_ItemDataBound);
    RadListBox1.SelectedIndexChanged += new EventHandler(RadListBox1_SelectedIndexChanged);      
}


and here is the functions, they did well when I use it by index, so no problem with next code

void RadListBox1_SelectedIndexChanged(object sender, EventArgs e)
{
    #region Start mode customization via Web Query String
    int idx = 0;
    int auto = 0;
    string qry = "";
 
    try
    {
        qry = "auto";
        qry = (Request.QueryString[qry] == null) ? "" : Request.QueryString[qry];
        if (qry != "") { auto = int.Parse(qry); }
    }
    catch { }
 
    // Item index
    try
    {
        qry = "item";
        qry = (Request.QueryString[qry] == null) ? "" : Request.QueryString[qry];
        if (qry != "") { idx = int.Parse(qry); }
    }
    catch { }
    #endregion
    Literal1.Text = YouTubeScript.Get(RadListView1.SelectedItems[0].GetDataKeyValue("Video_Path").ToString(), auto, _W, _H);
    Label1.Text = RadListView1.SelectedItems[0].GetDataKeyValue("Video_Path").ToString();
}
 
 
protected void RadListView1_ItemDataBound(object sender, Telerik.Web.UI.RadListViewItemEventArgs e)
{
    Literal1.Text = YouTubeScript.Get(RadListView1.Items[0].GetDataKeyValue("Video_Path").ToString(), 0, _W, _H).ToString();
    Label1.Text = RadListView1.Items[0].GetDataKeyValue("Video_Description").ToString();
}
Hamza
Top achievements
Rank 1
 asked on 29 Sep 2011
1 answer
85 views
I've recently upgraded my Telerik.Web.UI dll (2011.2.915) and noticed that the "Transparent" skin is not available as a choice in my RadSkinManager.  Here is a quick video showing the available choices.  I have confirmed the dll in the project and cleared my cache.


Mira
Telerik team
 answered on 29 Sep 2011
1 answer
72 views
Following the rad upload example I can not get the bind results section to work for me.
Everything else is working fine, I can upload files.  As soon as I add the progress bar it crashes.

Private Sub BindResults()
        If Radupload1.UploadedFiles.Count > 0 Then
            labelNoResults.Visible = False
            reportResults.Visible = True
            reportResults.DataSource = Radupload1.UploadedFiles
            reportResults.DataBind()
        Else
            labelNoResults.Visible = True
            reportResults.Visible = False
        End If
    End Sub


Compiler Error Message: 
BC30451: Name 'labelNoResults' is not declared.

Source Error:

Line 20:     Private Sub BindResults()
Line 21:         If Radupload1.UploadedFiles.Count > 0 Then
Line 22:             labelNoResults.Visible = False
Line 23:             reportResults.Visible = True
Line 24:             reportResults.DataSource = Radupload1.UploadedFiles
Dimitar Terziev
Telerik team
 answered on 29 Sep 2011
Narrow your results
Selected tags
Tags
+? more
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?