Telerik Forums
UI for ASP.NET AJAX Forum
5 answers
182 views
I creat a Grid in usercontrol and set the DataSource is Dataset.But Can't insert a new record when post!
<%@ Control Language="VB" AutoEventWireup="false" CodeFile="AssemblyControl.ascx.vb" Inherits="Module_FloorControl_AssemblyControl"%>  
<%@ Register assembly="Telerik.Web.UI" namespace="Telerik.Web.UI" tagprefix="telerik" %>  
<table width="100%" border="0" cellspacing="0" cellpadding="10" style="border: 1px solid #C0C0C0; font-family: Verdana; font-size: 10px; color: #4A535B; font-weight: bold;">  
  <tr>  
    <td bgcolor="#F3F3F1"><table width="100%" border="0" cellspacing="5" cellpadding="0">  
  <tr>  
    <td width="80" height="25" align="right" >*Model:</td>  
    <td width="500" valign="middle" >  
        <telerik:RadTextBox ID="ModelTxt" Runat="server" Skin="Default" LabelCssClass="radLabelCss_Gray"   
            Width="125px" Enabled="False">        </telerik:RadTextBox>          </td>  
    <td valign="middle" >&nbsp;</td>  
  </tr>  
  <tr>  
    <td width="80" height="25" align="right" >*PCBA:</td>  
    <td width="500" valign="middle" >  
        <telerik:RadTextBox ID="PCBATxt" Runat="server" Skin="Default" LabelCssClass="radLabelCss_Gray"   
            Width="125px">        </telerik:RadTextBox>          </td>  
    <td valign="middle" >&nbsp;</td>  
  </tr>  
  <tr>  
    <td width="80" height="25" align="right" >*Description:</td>  
    <td width="500" valign="middle" >  
                <telerik:RadTextBox ID="DescriptionTxt" Runat="server" Skin="Default" LabelCssClass="radLabelCss_Gray"   
                    Width="200px">        </telerik:RadTextBox>          </td>  
    <td valign="middle" >&nbsp;</td>  
  </tr>  
  <tr>  
    <td width="80" height="25" align="right" >Mother Board:</td>  
    <td width="500" valign="middle" >  
                  <telerik:RadComboBox ID="MotherBoardDdl" Runat="server" Skin="Default">  
<CollapseAnimation Type="OutQuint" Duration="200"></CollapseAnimation>  
                  </telerik:RadComboBox>  
      </td>  
    <td valign="middle" >&nbsp;</td>  
  </tr>  
  <tr>  
    <td width="80" height="25" align="right" >Main Board: </td>  
    <td width="500" valign="middle" >  
                  <asp:CheckBox ID="MBCHK" runat="server" />  
      </td>  
    <td valign="middle" >&nbsp;</td>  
  </tr>  
  <tr>  
    <td width="80" height="25" align="right" >Remarks:</td>  
    <td width="500" valign="middle" >  
               <telerik:RadTextBox ID="RemarksTxt" Runat="server" Skin="Default"   
                   LabelCssClass="radLabelCss_Gray" Width="370px"   
                   Columns="50" Height="80px" TextMode="MultiLine">        </telerik:RadTextBox>          </td>  
    <td valign="middle" >&nbsp;</td>  
  </tr>  
   <tr>  
    <td align="center" ></td>  
    <td align="left" colspan="2" >  
        <telerik:RadGrid ID="RadGrid1" runat="server" Skin="Hay" GridLines="None" AllowAutomaticDeletes="True" AllowAutomaticInserts="True" Width="97%" PageSize="10" 
            AllowAutomaticUpdates="True" AllowPaging="True" AutoGenerateColumns="False"  OnInsertCommand="RadGrid1_InsertCommand">  
 
<MasterTableView Width="100%" CommandItemDisplay="Top" DataKeyNames="SeqNo" 
               HorizontalAlign="NotSet" AutoGenerateColumns="False">  
<Columns>  
                    <telerik:GridClientSelectColumn HeaderStyle-Width="40px" >  
<HeaderStyle Width="40px"></HeaderStyle>  
                    </telerik:GridClientSelectColumn>  
                     <telerik:GridBoundColumn DataField="Model" HeaderText="Model" SortExpression="Model" UniqueName="Model" EditFormColumnIndex="0">  
                    </telerik:GridBoundColumn>  
                    <telerik:GridBoundColumn DataField="PCBA" HeaderText="PCBA"  UniqueName="PCBA" EditFormColumnIndex="0">  
                    </telerik:GridBoundColumn>  
                    <telerik:GridBoundColumn DataField="SeqNo" HeaderText="Seq No" SortExpression="SeqNo" UniqueName="SeqNo" EditFormColumnIndex="1">  
                    </telerik:GridBoundColumn>  
                    <telerik:GridDropDownColumn DataField="Process"  HeaderText="Process" ListTextField="Process" ListValueField="Process" UniqueName="Process" EditFormColumnIndex="1" FilterListOptions="AllowAllFilters">  
                    </telerik:GridDropDownColumn>  
                    <telerik:GridDropDownColumn DataField="FailedUnitReturnTo" HeaderText="Failed To"   SortExpression="FailedUnitReturnTo" UniqueName="FailedUnitReturnTo" EditFormColumnIndex="2">  
                        </telerik:GridDropDownColumn>  
                      <telerik:GridDropDownColumn DataField="Label1" HeaderText="Label1"  EditFormColumnIndex="2">  
                        </telerik:GridDropDownColumn>      
                     <telerik:GridDropDownColumn DataField="Label2" HeaderText="Label2"  SortExpression="Label2" UniqueName="Label2" EditFormColumnIndex="3">  
                        </telerik:GridDropDownColumn>     
                         <telerik:GridDropDownColumn DataField="Label3" HeaderText="Label3"   SortExpression="Label3" UniqueName="Label3" EditFormColumnIndex="3">  
                        </telerik:GridDropDownColumn>         
                             </Columns>  
<SortExpressions>  
<telerik:GridSortExpression FieldName="SeqNo" SortOrder ="Ascending" />  
</SortExpressions>  
  <EditFormSettings ColumnNumber="4" CaptionDataField="PCBA" CaptionFormatString="Edit properties of Product {0}">  
                    <FormTableItemStyle Wrap="False"></FormTableItemStyle>  
                    <FormMainTableStyle GridLines="Horizontal" CellSpacing="0" CellPadding="3" BackColor="White" 
                        Width="100%" />  
                    <FormTableStyle CellSpacing="0" CellPadding="2" Height="60px" 
                        BackColor="White" />  
                    <FormTableAlternatingItemStyle Wrap="False"></FormTableAlternatingItemStyle>  
                    <EditColumn ButtonType="ImageButton"   
                        InsertText="Insert Order" UpdateText="Update record" UniqueName="EditCommandColumn1" CancelText="Cancel edit">  
                    </EditColumn>  
                    <FormTableButtonRowStyle HorizontalAlign="Right"></FormTableButtonRowStyle>  
                </EditFormSettings>  
</MasterTableView>  
 
<FilterMenu EnableTheming="True">  
<CollapseAnimation Type="OutQuint" Duration="200"></CollapseAnimation>  
</FilterMenu>  
        </telerik:RadGrid>  
          </td>  
   </tr>  
   <tr>  
    <td align="center" ></td>  
    <td width="500" align="left" ><asp:Button ID="Button5" runat="server" Text="Save"   
            Font-Names="Verdana" CssClass="bButton"  />  
      
      &nbsp;<asp:Button ID="Button6" runat="server" Text="Cancel" CssClass="bButton" /></td>  
    <td align="center" ></td>  
   </tr>  
</table></td>  
  </tr>  
</table>  
    
 
   
Imports System.Data  
Imports Telerik.Web.UI  
Partial Class Module_FloorControl_AssemblyControl  
    Inherits System.Web.UI.UserControl  
    Dim eTraceWS As New eTraceReportService.Service  
    Dim ds As New Data.DataSet  
    Dim contorl As New Label  
    Dim LabelModule As New Label  
    Dim treeview As New Telerik.Web.UI.RadTreeView  
    Dim Assembly As String 
    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles MyBase.Load  
        LabelModule = Me.Parent.Parent.FindControl("LabelMoudel")  
        contorl = Me.Parent.Parent.FindControl("LabelName")  
        treeview = Me.Parent.Parent.FindControl("ModuleTreeView")  
        Assembly = contorl.Text  
        ds = eTraceWS.GetAssemblyData(Assembly, treeview.SelectedNode.Text)  
        RestScreen()  
    End Sub 
    Public Sub RestScreen()  
        Dim process As New Telerik.Web.UI.GridDropDownColumn  
        If Assembly <> "" Then 
 
        Else 
            ModelTxt.Text = treeview.SelectedNode.Text  
            PCBATxt.Text = "" 
            DescriptionTxt.Text = "" 
            MotherBoardDdl.SelectedIndex = 0  
            MBCHK.Checked = False 
            RemarksTxt.Text = "" 
        End If 
    End Sub 
 
    Protected Sub RadGrid1_InsertCommand(ByVal source As Object, ByVal e As Telerik.Web.UI.GridCommandEventArgs) Handles RadGrid1.InsertCommand  
 
    End Sub 
 
    Protected Sub RadGrid1_ItemCommand(ByVal source As Object, ByVal e As Telerik.Web.UI.GridCommandEventArgs) Handles RadGrid1.ItemCommand  
 
    End Sub 
 
    Protected Sub RadGrid1_ItemInserted(ByVal source As Object, ByVal e As Telerik.Web.UI.GridInsertedEventArgs) Handles RadGrid1.ItemInserted  
 
    End Sub 
 
    Protected Sub RadGrid1_NeedDataSource(ByVal source As Object, ByVal e As Telerik.Web.UI.GridNeedDataSourceEventArgs) Handles RadGrid1.NeedDataSource  
        RadGrid1.DataSource = ds  
        RadGrid1.DataMember = "Routing" 
        RadGrid1.MasterTableView.DataSource = ds  
        RadGrid1.MasterTableView.DataMember = "Routing" 
    End Sub 
End Class 
How can i do ?
Jack Guan
Top achievements
Rank 1
 answered on 14 Aug 2009
5 answers
133 views
Hi,
I have a grid and i open a radwindow "onRowDblclick" , this works fine for all the rows on the firstpage of the grid but when i try to change the page  nothing happens and then everything stops working, i have to refresh the page to make anything work from there on. thanks,
Yavor
Telerik team
 answered on 14 Aug 2009
3 answers
152 views
hi
in my grid i have a detail table in which data is binded from a business object in code behind .What i want do is that there are two columns which are not visible but depending on there values (which will be either true or false) that particular row should have edit allowed if both the columns in that particular row are true

Princy
Top achievements
Rank 2
 answered on 14 Aug 2009
2 answers
260 views
I am trying to save the content in a radEditor to the database. I dont want to save all the html tags. So when I save the data to the database, I use textView.Text instead of textView.Content (txtView is the radEditor name). I only want to preserve the return key. When I look at the database i see the text saved without any html and I see small sqaure boxes for the carriage return key as well. So its all good.
However, when I repopulate the editor with the text from the database, the carriage return is not applied. All the text is in one line without line breaks.
I tried adding NewLineBr="true", StripFormattingOptions="AllExceptNewLines" , StripFormattingOnPaste="AllExceptNewLines".

Non of them worked.
How can I achieve this?. I just want to preserve the carriage return when repopulating the rad editor. I see the small squres in the database which I think is for the carriage return.

Please advice.
thanks!
PALANISAMY V
Top achievements
Rank 1
 answered on 14 Aug 2009
3 answers
99 views
Hi Team,

I am using ModalPopUpExtender to enter the details after clicking the save button the detials which i enter should display in my grid but my grid is not refreshing after i enter the details can uplease help me

Thanks In Advance
Shinu
Top achievements
Rank 2
 answered on 14 Aug 2009
1 answer
139 views

Hi,

 

I am facing one problem.

 

When I load too much records in telerik Rad grid then in IE it gives me following error :

 

A script on this page is causing Internet Explorer to run slowly. If it continues to run, your computer might become unresponsive.

 

But in FF it works fine.

 

Is there any way to reduce the page weight or view state while using telerik Rad grid or any other way to overcome this error.

 

 

Please replay ASAP.

 

Shinu
Top achievements
Rank 2
 answered on 14 Aug 2009
0 answers
95 views
HI
There are a couple of comBobox named comBobox1 and comBobox2, and there is a SelectIndexChanged event for comBobox1.when this event fired,value (text as well) in  comBobox2 shloud be changed as value in comBobox1 was changed. Here i get a problem,when the event occured,text in comBobox2 always the old one(even if it did not exist in the new datasourse),it did not refresh, and i need to delete the old text manually.
Is there any way to resolve it? Following is the demo
 protected void ddlMfg_SelectedIndexChanged(object sender, EventArgs e) 
    { 
        int mfg; 
        if (int.TryParse(this.ddlMfg.SelectedValue, out mfg)) 
        { 
            this.ddlBrandedLabel.Items.Clear(); 
            this.ddlBrandedLabel.DataSource = ProductStatus.ProductBrandedLabel_SelectAll_ByMfgId_AsDataSet(mfg, 0, 9); 
            this.ddlBrandedLabel.DataBind(); 
        } 
        else 
        { 
            ddlBrandedLabel.Items.Clear(); 
        } 
    } 
 

Best regards
chan
Top achievements
Rank 1
 asked on 14 Aug 2009
1 answer
191 views
I am trying to customize the appearance of a RadEditor in my application to look like a normal textbox, but for some reason the styles do not seem to be taking effect.  I have followed the instructions in the online example at the following address without success:

http://demos.telerik.com/aspnet-ajax/editor/examples/editorastextbox/defaultcs.aspx

Here is the code that I have added to my page to try and achieve the textbox look and feel.

<asp:Content ID="MainContent" runat="server" ContentPlaceHolderID="RadPanel">  
 
    <!-- Styles to display RadEditor as Textbox --> 
    <style type="text/css">  
        .reWrapper_corner, .reWrapper_center   
        {  
            display: none !important;                  
        }  
                      
        .reLeftVerticalSide,   
        .reRightVerticalSide,   
        .reToolZone,  
        .reToolCell  
        {  
            background: white !important;  
        }  
 
        .reContentCell  
        {  
            border-width: 20 !important;  
        }  
 
        .RadEditor  
        {  
            filter: chroma(color=c2dcf0);  
        }  
    </style> 
    <!-- End Styles to display RadEditor as Textbox --> 
 
    <!-- Other page code here.... --> 
 
    <!-- RadEditor which is located within a RadGrid's edit form --> 
    <div style="float: left;">  
        <telerik:RadEditor ID="SummaryText" runat="server" Skin="Vista" Height="250" Width="480" EditModes="Design" ToolbarMode="ShowOnFocus"></telerik:RadEditor> 
    </div> 
 
    <!-- Other page code here.... --> 
 
</asp:Content> 

I've also tried placing the styles in the <head> of the MasterPage and directly in the application's StyleSheet.  None of the options seem to work so I'm at a loss.  This application is using the latest 2009 Q2 controls.  I do have another editor working in a different application using the 2008 Q3 controls.  The styles are placed in the content page, however, the styles are a bit different with the 2008 Q3 controls.  It just seems like the styles are no being recognized in my 2009 Q2 application.

If someone from Telerik answers this post I'd also be interested in the skin that was used in this thread entry field.  What was done to skin the editor this way and do you have an example of something I could use as a baseline.

Thanks,
Ben
Ben
Top achievements
Rank 1
 answered on 13 Aug 2009
8 answers
190 views
Hello All,

I'm trying to create a grid programmatically and am facing some difficulties with regard to PostBack action and/or filtering (error type is dependant on the approach I'm using).
My situation is as follows:
I have a user control that acts as a parent to another user control (ReportMenuBox) and also includes a placeholder (myGridReport). See below:
<div id="ReportPage">  
    <div class="ReportPageConainer">  
        <uc6:ReportMenuBox ID="ReportMenuBox1" runat="server" Text="Reports" /> 
        <div class="myStyle" id="ReportBox">  
            <uc5:RoundedHeader ID="RoundedHeader1" runat="server" /> 
            <div class="myClass">  
            <asp:PlaceHolder ID="myGridReport" runat="server"></asp:PlaceHolder> 
            </div> 
        </div> 
    </div> 
</div> 

The child user control (ReportMenuBox) is a menu in which the user can selects a report type and set the report various parameters. When the user click the submit button in the menu (child user control), in the codebehind I'm creating a grid from scratch and then assign it to the parent placeholder. Everything works fine except to the fact that I can't do any postback operations (pager etc.) because the grid will disappear.
I've tried to change the placeholder to a grid and then build the grid in the child user control based on the parent grid. This approach only works if I call databind or rebind in the child user control, and then I encounter an error with the filtering (index out of range..).

Searching the forum, I only found examples where the codebehind belongs to the displaying user control and thus can be put in the init and page_load, an approach which I can't use.

Any idea would be appreciated.
Bob
Top achievements
Rank 1
 answered on 13 Aug 2009
1 answer
149 views
I'm trying to limit the font choices in the font dropdown.  my toolsfile looks like this:

<tool name="FontName">
 <font name="Arial"/>
 <font name="Georgia"/>
</tool>

but then I run the editor in the browser, I get what looks like all the fonts installed on the server.  how do i get rid of the default fonts?



Jorge Merino
Top achievements
Rank 1
 answered on 13 Aug 2009
Narrow your results
Selected tags
Tags
+? more
Top users last month
Tien
Top achievements
Rank 1
Iron
Krasimir
Top achievements
Rank 3
Bronze
Iron
Iron
Cedar
Top achievements
Rank 1
Iron
Emil
Top achievements
Rank 1
Iron
Kyle Watson
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Tien
Top achievements
Rank 1
Iron
Krasimir
Top achievements
Rank 3
Bronze
Iron
Iron
Cedar
Top achievements
Rank 1
Iron
Emil
Top achievements
Rank 1
Iron
Kyle Watson
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?