Telerik Forums
UI for ASP.NET AJAX Forum
0 answers
133 views
Hi, I would like to disable keyboard entry when during edit mode. I have setup custom tool that user can use to make changes but not to enter any text directly to my Editor. Its like all keys on the keyboard is not allowed. I already made use of preview mode with my custom tool so that user cannot enter in any characters, but with my custom tool it can only do highlight or change color of the text but not able to change the word. For I think pastehtml not working with preview mode. So in order  to make pastehtml work it should be done during edit mode but then again I don't want user to enter in any text thats why I wanted to disable any character entry.

I think this can be done via javascript, but I don't know the code on disabling all keys..

Thanks in advance,

RJ
RJ
Top achievements
Rank 1
 asked on 09 Nov 2009
2 answers
184 views
Good afternoon,
Is it possible to access a control within the HeaderTemplate of a RadComboBox via JavaScript?  I have a checkbox that when checked should clear the checkboxes within the ItemTemplate.  Thank you.

Jeff
Jeff
Top achievements
Rank 1
 answered on 09 Nov 2009
5 answers
98 views
The title pretty much says it all. I have a grid with columns that start freezing only after a command event has triggered a postback to the AjaxManager. Here is a sample of my markup...

<rad1:RadGrid ID="grdImpRecords" runat="server"  AutoGenerateColumns="false" Skin="WebBlue"
    AllowPaging="true" PageSize="50"
    OnUpdateCommand="grdImpRecords_UpdateCommand"
    OnNeedDataSource="grdImpRecords_NeedDataSource" >
   
    <PagerStyle Mode="NextPrevNumericAndAdvanced"/>

    <ClientSettings>
        <Scrolling AllowScroll="true" UseStaticHeaders="true" FrozenColumnsCount="2"  />
    </ClientSettings>

    <MasterTableView DataKeyNames="AssignmentID" EditMode="InPlace" TableLayout="Fixed" >

        <EditItemStyle Width="165px" />
        <ItemStyle Width="165px" />
        <HeaderStyle Width="165px" HorizontalAlign="Center" VerticalAlign="Middle" Font-Bold="true" />
                                   
        <Columns >

            <rad1:GridTemplateColumn HeaderButtonType="None" HeaderText="Discard" UniqueName="DiscardColumn">
                <HeaderStyle Width="105px" />
                <ItemStyle Width="105px" HorizontalAlign="Center" />
                <HeaderTemplate>
                    <input type="checkbox" class="DiscardCheckbox" id="HeaderCheckbox" onclick="" />
                    <label for="HeaderCheckbox" id="HeaderCheckBoxLabel" >Check All</label>
                </HeaderTemplate>
                <ItemTemplate>
                    <asp:CheckBox runat="server" CssClass="DiscardCheckBox" ID="chkDiscard" />
                </ItemTemplate>
            </rad1:GridTemplateColumn>
           
            <rad1:GridEditCommandColumn UniqueName="EditColumn" >
                <HeaderStyle Width="100px" HorizontalAlign="Center" VerticalAlign="Middle" Font-Bold="true" />
                <ItemStyle Width="100px" HorizontalAlign="Center" />
            </rad1:GridEditCommandColumn>
           
            <rad1:GridBoundColumn UniqueName="LoanNumber">
                <HeaderStyle Width="165px" HorizontalAlign="Center" VerticalAlign="Middle" Font-Bold="true" />
                <ItemStyle Width="165px" />
            </rad1:GridBoundColumn>
           
            <rad1:GridBoundColumn UniqueName="InvestorLoanNumber"  >
                <HeaderStyle Width="165px" HorizontalAlign="Center" VerticalAlign="Middle" Font-Bold="true" />
                <ItemStyle Width="165px" />
            </rad1:GridBoundColumn>
           
        </Columns>
                                    
    </MasterTableView>
</rad1:RadGrid>


Thanks for any help.
Josh Horton
Top achievements
Rank 1
 answered on 09 Nov 2009
2 answers
261 views
I load a radgrid from a system.web.security.MembershipUserCollection.
 
 Protected Sub RadGrid1_NeedDataSource(ByVal source As Object, ByVal e As Telerik.Web.UI.GridNeedDataSourceEventArgs) Handles RadGrid1.NeedDataSource 
        Dim mc As MembershipUserCollection 
        mc = Membership.GetAllUsers 
        RadGrid1.DataSource = mc 
End Sub 
This works fine. When i edit a row i get event Radgrid_UpdateCommand .
I need the dataitem for the row which should be the of type MemberShipUser
so i can update it using Membership.UpdateUser( dataitem)

The e.item.dataitem is nothing.

The grid also does not show the update after the UpdateCommand is done.

Any ideas on how I can do this?


iReplicate
Top achievements
Rank 1
 answered on 09 Nov 2009
3 answers
116 views
I have a problem where the values in the y-axis are being multiplied by 10 when I bind the data to the rad chart.  I didn't write the code, but I have verified that the data going into the chart is correct.  Yet, when the chart is displayed, the y-axis label shows 50 instead of 5, 80 instead of 8, and so on.

The value format is set to General, but it doesn't seem to make any different (I've also tried Number).

I've searched the code and chart setup to identify why this may be happening, but I'm at a loss at this point.

I'm wondering if anyone has any thoughts about where to look in the chart properties configuration for a setting that might be doing this.  Any help would be much appreciated.
Michael Edvalson
Top achievements
Rank 1
 answered on 09 Nov 2009
3 answers
134 views
I have several Rad Controls on a Web form including a RadComboBox that initially works correctly.  After clicking a button to export data to an excel spreadsheet the RadComboBox quits responding.  Clicking the arrow to dropdown the list does nothing while all other controls appear to work just fine.

The code I am useing for the expot is as follows:

            DataView detailDT = (DataView)detailGridView.DataSource;

            string filename = String.Format("{0}.csv", "ExportDetails");

            Response.Clear();
            Response.AddHeader("Content-Disposition", "attachment;filename=" + filename);
            Response.Charset = "";
            Response.ContentType = "application/vnd.xls";

            StringWriter stringWriter = new StringWriter();
            ArrayList colHeaders = new ArrayList();
            ArrayList dataRow = new ArrayList();

            //handle forcing Excel from treating file as an "sylk" file
            stringWriter.Write("  ");

            foreach (DataControlField dataCol in detailGridView.Columns)
            {
                colHeaders.Add(dataCol.HeaderText);
            }

            stringWriter.WriteLine(string.Join(",", (string[])colHeaders.ToArray(typeof(string))));

            foreach (DataRow dr in detailDT.Table.Rows)
            {
                foreach (DataColumn dataCol in detailDT.Table.Columns)
                {
                    dataRow.Add(dr[dataCol]);
                }

                stringWriter.WriteLine(string.Join(",", (string[])dataRow.ToArray(typeof(string))));

                dataRow.Clear();
            }

            Response.Write(stringWriter.ToString());
            Response.End();


Thanks

Simon
Telerik team
 answered on 09 Nov 2009
1 answer
34 views
Hi

I've spent several days trying to recreate the "Grid / Hierarchy with Templates" demo at http://demos.telerik.com/aspnet-ajax/grid/examples/hierarchy/nestedviewtemplate/defaultcs.aspx from the example code, but I just can't get it to work. Is there a tutorial covering these tasks available that can show me a more step by step approach?

TIA

Re
Dennis
Pavlina
Telerik team
 answered on 09 Nov 2009
3 answers
76 views
Hello,

We are using the the sample code from the demo: http://demos.telerik.com/aspnet-ajax/grid/examples/programming/draganddrop/defaultcs.aspx

The drag and drop is working for us.  However the loading panel only shows up for the first drag/drop in Firefox.  (same issue exists on your demo page as well.)  It works correctly on google-chrome.

Can someone advise as we can resolve this issue?

Thanks,
Amish
Pavlina
Telerik team
 answered on 09 Nov 2009
1 answer
1.5K+ views
Hello
  1. I have two RadListBoxes linked to two different ObjectDataSource objects RadListBox1 and RadListBox2.  (Markup below)
  2. My project uses an SQL Server 2005 database using SQL to Linq. 
  3. When I attempt to Transfer items from RadListBox1 to RadListBox2 I receive a javascript error: "Error: Sys.WebForms.PageRequestManagerServerErrorException: Object of type 'System.Int32' cannot be converted to type 'System.String'."
  4. When I clcik the trasnfer button, the "Deleted" event is fired for the first list box, but for some reason the Insert event for the second listbox is not being triggered. 

List Box Markup:
<td> 
                        <h2>Available Features</h2> 
                        <telerik:RadListBox ID="RadListBox1"  
                            runat="server"  
                            AllowTransfer="True"                              
                            DataKeyField="FeatureId"  
                            DataSortField="FeatureId"  
                            DataSourceID="FeatureDS"  
                            DataTextField="FeatureDescription"  
                            DataValueField="FeatureId"  
                            TransferToID="RadListBox2"  
                            AllowAutomaticUpdates="True"  
                            AutoPostBackOnTransfer="True"  
                            EmptyMessage="There are no available features."  
                            Skin="Office2007"  
                            Width="250px"
                            <ButtonSettings ShowTransferAll="False" /> 
                            <EmptyMessageTemplate> 
                                There are no available features. 
                            </EmptyMessageTemplate> 
                        </telerik:RadListBox> 
                    </td> 
                    <td> 
                        <h2>Competitor Features</h2> 
                        <telerik:RadListBox  
                            runat="server"  
                            ID="RadListBox2"  
                            DataKeyField="FeatureId"  
                            DataSortField="FeatureDescription"  
                            DataSourceID="CompetitorFeatureDS"  
                            DataTextField="FeatureDescription"  
                            AllowAutomaticUpdates="True"  
                            EmptyMessage="This competitor has no features assigned."  
                            Skin="Office2007"  
                            Width="250px"
                            <ButtonSettings ShowTransferAll="False" /> 
                            <EmptyMessageTemplate> 
                                This competitor has no features assigned. 
                            </EmptyMessageTemplate> 
                        </telerik:RadListBox> 
                    </td> 

DataSources:
<%--**************************************************--%> 
<%--DATA SOURCES--%> 
<%--**************************************************--%> 
<pp:ObjectContainerDataSource ID="CompetitorDS"              
    DataObjectTypeName="MagicMindsCRM.Modules.Competitors.BusinessEntities.Competitor" 
    OnUpdated="CompetitorDS_Updated"  
    runat="server" /> 
        
     
    <pp:ObjectContainerDataSource ID="CompetitorFeatureDS"              
    DataObjectTypeName="MagicMindsCRM.Modules.Competitors.BusinessEntities.CompetitorFeature" 
    OnDeleted="CompetitorFeatureDS_Deleted"  
    OnInserted="CompetitorFeatureDS_Inserted"      
    runat="server" /> 
     
    <pp:ObjectContainerDataSource ID="FeatureDS" DataObjectTypeName="MagicMindsCRM.Modules.Competitors.BusinessEntities.Feature" runat="server"  
    OnDeleted="FeatureDS_Deleted"  
    OnInserted="FeatureDS_Inserted" /> 
     
    <pp:ObjectContainerDataSource ID="CompetitorStatusDS" DataObjectTypeName="MagicMindsCRM.Modules.Competitors.BusinessEntities.CompetitorStatus" runat="server" />     
     

Screenshot attached.

Many thanks for your help.
Simon
Telerik team
 answered on 09 Nov 2009
3 answers
180 views
Hi
          I am facing the problem in binding the detail table which is under nested view grid.
I used RadGrid1_preRender event to bind the nestedview grid. But the problem arised during  i called the Nested grid's 

 

'DetailTableDataBind' event it goes againg to 'RadGrid1_preRender' event and bind the nested grid again, so as a result i could not see the detail table data after i expanding the nested grid row.

Please guide me at what solution help to overcome this problem

-Thanks

Veli
Telerik team
 answered on 09 Nov 2009
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?