Telerik Forums
UI for ASP.NET AJAX Forum
5 answers
165 views
I have a grid using the GridClientSelectColumn and I also have a button that calls RadGrid.Rebind().
After the call to rebind, when a user tries to click on the grid row's checkbox nothing happens. here is the code (simplified).

Thanks!

<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="Sample.ascx.cs" Inherits="Touchstone.PT.Daimler.Web.Views.P2P.Sample" %> 
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Charting" TagPrefix="telerik" %> 
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %> 
 
<telerik:RadAjaxLoadingPanel ID="AjaxLoadingPanel1" runat="server" Transparency="15" Width="800" BackColor="white">  
    <div style="height:30px">&nbsp;</div> 
    <img alt="Saving..." src='<%= RadAjaxLoadingPanel.GetWebResourceUrl(Page, "Telerik.Web.UI.Skins.Default.Ajax.loading.gif") %>' style="border: 0px; vertical-align: middle;" /> 
</telerik:RadAjaxLoadingPanel> 
 
<telerik:RadAjaxManager ID="RadAjaxManager1" runat="server" UpdatePanelsRenderMode="Inline">  
    <AjaxSettings> 
        <telerik:AjaxSetting AjaxControlID="btnSearch">  
            <UpdatedControls> 
                <telerik:AjaxUpdatedControl ControlID="rgUsers" LoadingPanelID="AjaxLoadingPanel1" /> 
            </UpdatedControls> 
        </telerik:AjaxSetting> 
        <telerik:AjaxSetting AjaxControlID="rgUsers">  
            <UpdatedControls> 
                <telerik:AjaxUpdatedControl ControlID="rgUsers" LoadingPanelID="AjaxLoadingPanel1" /> 
            </UpdatedControls> 
        </telerik:AjaxSetting>          
    </AjaxSettings> 
</telerik:RadAjaxManager> 
 
<asp:Button id="btnSearch" runat="server" Text="Search" OnClick="btnSearch_Click" /> 
<br /> 
<telerik:RadGrid ID="rgUsers" runat="server" Width="100%" ShowStatusBar="false" AllowSorting="true" AllowMultiRowSelection="True" OnNeedDataSource="rgUsers_NeedDataSource">  
    <MasterTableView AutoGenerateColumns="false" TableLayout="fixed" Width="100%" AllowNaturalSort="false">  
        <Columns>                          
            <telerik:GridClientSelectColumn Reorderable="False" UniqueName="ClientSelectColumn">  
                <HeaderStyle Width="42px"></HeaderStyle> 
            </telerik:GridClientSelectColumn> 
        </Columns> 
    </MasterTableView> 
    <PagerStyle NextPageText="Next" PrevPageText="Prev" Mode="NextPrevAndNumeric"></PagerStyle> 
    <ClientSettings AllowDragToGroup="True">  
        <Selecting AllowRowSelect="True"></Selecting> 
    </ClientSettings> 
</telerik:RadGrid>  


        protected void btnSearch_Click(object sender, EventArgs e)  
        {  
            rgUsers.MasterTableView.Rebind();  
        }  
 
        protected void rgUsers_NeedDataSource(object source, Telerik.Web.UI.GridNeedDataSourceEventArgs e)  
        {  
            rgUsers.DataSource = new string[] { "Bob", "Tom", "Gary" };  
        } 
Daniel
Telerik team
 answered on 07 Jan 2010
7 answers
348 views
I was playing around with the new bits and wanted to try to use WCF Service using DbSchedulerProviderBase.
I kept getting errors on the DbSchedulerProviderBase method LoadResources when it tries to add a Resource to the appointment.
I thought I must had done something wrong so I open the Quick Start Examples in Visual Studio and altered the example http://demos.telerik.com/aspnet-ajax/scheduler/examples/wcf/defaultcs.aspx to use the MyDbSchedulerProvider instead by passing in the name of provider from web.config:
    private WebServiceAppointmentController Controller  
    {  
        get 
        {  
            if (_controller == null)  
            {  
                //_controller =  
                //    new WebServiceAppointmentController(  
                //        new XmlSchedulerProvider(HttpContext.Current.Server.MapPath("~/App_Data/Appointments_Outlook.xml"),   
                //            false));  
 
                _controller = new WebServiceAppointmentController("ReadOnlySchedulerData");  
            }  
            return _controller;  
        }  
    }  
 

I then ran the page and got the same error on the method below on line 16:
        private void LoadResources(Appointment apt)  
        {  
 
            using (DbConnection conn = OpenConnection())  
            {  
                DbCommand cmd = DbFactory.CreateCommand();  
                cmd.Connection = conn;  
 
                cmd.Parameters.Add(CreateParameter("@ClassID", apt.ID));  
                cmd.CommandText = "SELECT [TeacherID] FROM [DbProvider_Classes] WHERE [ClassID] = @ClassID AND [TeacherID] IS NOT NULL";  
                using (DbDataReader reader = cmd.ExecuteReader())  
                {  
                    if (reader.Read())  
                    {  
                        Resource teacher = apt.Owner.Resources.GetResource("Teacher", reader["TeacherID"]);  
                        apt.Resources.Add(teacher);  
                    }  
                }  
 
                cmd.Parameters.Clear();  
                cmd.Parameters.Add(CreateParameter("@ClassID", apt.ID));  
                cmd.CommandText = "SELECT [StudentID] FROM [DbProvider_ClassStudents] WHERE [ClassID] = @ClassID";  
                using (DbDataReader reader = cmd.ExecuteReader())  
                {  
                    while (reader.Read())  
                    {  
                        Resource student = apt.Owner.Resources.GetResource("Student", reader["StudentID"]);  
                        apt.Resources.Add(student);  
                    }  
                }  
            }  
        }  
 

The method GetResource returns null.

Can you check it out and let us know how to implement client binding from a database.

BTW I added a check for null and it works but of course there is no resources so it is specifically relating to how to load resources.
We can load resources from XML so I guess we just need to change the implementation of DbSchedulerProviderBase unless I have really missed somthing here.

Regards
Axe
Dimitar Milushev
Telerik team
 answered on 07 Jan 2010
2 answers
188 views
Hello,
i have some problem in exporting the results i have got to CSV format; actually i have a grid with 5 databound columns and 1 checkBox column, all columns are exported but the checkbox inspite of exportting it correctly to DOC or XLS. and why we couldn't export the columns which are not dispalyed on gird, is there way to do that...


thanks,
hanan
Daniel
Telerik team
 answered on 07 Jan 2010
1 answer
86 views
Hi,

Will a roadmap for the next release be available soon?

thanks,


Richard
Sebastian
Telerik team
 answered on 07 Jan 2010
4 answers
130 views
Dear all,

I have a grid with TemplateItem contains table (without border set) with asp:textboxes to display data.

Q1: how do I remove the grid normal columns header (inside the red box in the attached image)?
Q2: the table is displaying a left and bottom lines around the controls, how can I remove them ?

I checked that the RadFormDecorator doesn't cause this ...

Thanks and best regards
Waleed
Waleed Seada
Top achievements
Rank 2
 answered on 07 Jan 2010
1 answer
202 views
I change page title in Page_Load.
How to update page title (Window title) after ajax postback with  RadAjaxManager?
Pavlina
Telerik team
 answered on 07 Jan 2010
7 answers
151 views
Is there a way to set the editor to preview mode when the page loads?  I've browsed the documentation and forums and can't find anything describing this.
Andy Byrne
Top achievements
Rank 1
 answered on 07 Jan 2010
2 answers
198 views
Hi,

I have a few line graphs (chartseries) in a single chart and they overlap each other when the values are the same.
Is there any way to position one line graph slightly below another so that both can be seen even if the values are the same.
Thanks for any advice.

Regards,
wj
Bartholomeo Rocca
Top achievements
Rank 1
 answered on 07 Jan 2010
4 answers
205 views
I have a RadScheduler with a RadGrid, utilizing the drag and drop from the grid to the scheduler. All works great! (Thanks for the good online example)

I am also utilizing resources in the scheduler. Is there a way to map the dropped item to the proper resource it was dropped into? Currently I am mapping the name fields and the time slots are being set by the HandleSchedulerDrop method. I want to do all the above and have it know which resource I dropped it into. Is this possible?

Secondarily I have other fields associated with the scheduler item that are not in the grid item. So I want the user to enter those values when they drop the grid item into the scheduler. To do this, I envision the advanced edit form opening on drop. I have the StartEditingInAdvancedForm set to true, so I assume all I need to do is put the scheduler in edit mode for that item. Is this possible?

Thanks.
Dimitar Milushev
Telerik team
 answered on 07 Jan 2010
2 answers
675 views
Does any know where I can find the flag icons used in the Translation dropdown? I have ASP.NET AJAX Q3 2009 installed... wasn't sure if this was something included, or something we have to provide ourselves.

Regards,
Tom
Tom M
Top achievements
Rank 1
 answered on 07 Jan 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?