Telerik Forums
UI for ASP.NET AJAX Forum
7 answers
397 views

I have been struggling with a problem for the last few days and finally found a solution.  It wasn’t a sophisticated fix so I wanted to know if there is a better way to do this.  I have a custom CommandName that looks up data in an asset database so that the user can enter an asset tag to populate the rest of the editform dynamically.  I have also added an extra button that is created when the PerfromInsertButton is present.    Previously I had this attached to the CancelButton but when I tried using my custom  CommandName from Edit (as opposed to Insert) I got an error saying “Index was out of Range”. 

 

Long story short, I decided to just attach my custom button to the PerfromInsertButton button so that it only shows up on Insert and not Edit.  It isn’t elegant but I was hoping for a better outcome.

 

Any ideas?

My RadGrid

 

<telerik:RadGrid ID="transferGrid" runat="server" DataSourceID="transferData" GridLines="None" 
                AllowAutomaticInserts="True" Skin="Office2007" AutoGenerateColumns="False" AllowAutomaticDeletes="True" 
                Visible="false" AutoGenerateEditColumn="true" AllowAutomaticUpdates="true">  
                <HeaderContextMenu EnableTheming="True">  
                    <CollapseAnimation Type="OutQuint" Duration="200"></CollapseAnimation> 
                </HeaderContextMenu> 
                <ClientSettings> 
                    <Selecting AllowRowSelect="True" /> 
                </ClientSettings> 
                <MasterTableView DataKeyNames="ID" DataSourceID="transferData" EditMode="EditForms" 
                    CommandItemDisplay="Bottom">  
                    <NoRecordsTemplate> 
                        <asp:Label runat="server" Text="No Assets have been added"></asp:Label> 
                    </NoRecordsTemplate>                     
                    <CommandItemTemplate> 
                        <div class="noprint" style="text-align: right;">  
                            <asp:Button ID="btnAdd" runat="server" Text="Add New Asset" CommandName="InitInsert">  
                            </asp:Button> 
                            <asp:Button ID="btnDelete" runat="server" Text="Delete Selected Asset" ToolTip="Click asset to select" 
                                CommandName="DeleteSelected"></asp:Button> 
                        </div> 
                    </CommandItemTemplate> 
                  <EditFormSettings> 
                        <EditColumn UniqueName="InsertCommandColumn" ButtonType="PushButton" ItemStyle-Font-Bold="true" 
                            InsertText="Save Asset">                              
                        </EditColumn>                                                                                       
                    </EditFormSettings> 
                    <RowIndicatorColumn> 
                        <HeaderStyle Width="20px"></HeaderStyle> 
                    </RowIndicatorColumn> 
                    <ExpandCollapseColumn> 
                        <HeaderStyle Width="20px"></HeaderStyle> 
                    </ExpandCollapseColumn> 
                    <Columns> 
                        <telerik:GridBoundColumn DataField="ID" HeaderText="ID" SortExpression="ID" UniqueName="ID" 
                            DataType="System.Int32" ReadOnly="True" Visible="false">  
                        </telerik:GridBoundColumn> 
                        <telerik:GridBoundColumn DataField="Manufacturer_Name" HeaderText="Manufacturer Name" 
                            SortExpression="Manufacturer_Name" UniqueName="Manufacturer_Name" MaxLength="30">  
                        </telerik:GridBoundColumn> 
                        <telerik:GridBoundColumn DataField="Model" HeaderText="Model" SortExpression="Model" 
                            UniqueName="Model" MaxLength="18">  
                        </telerik:GridBoundColumn> 
                        <telerik:GridBoundColumn DataField="Tag" HeaderText="Tag" SortExpression="Tag" UniqueName="Tag" 
                            MaxLength="8">  
                        </telerik:GridBoundColumn>                          
                        <telerik:GridBoundColumn DataField="PO" HeaderText="PO" SortExpression="PO" UniqueName="PO" 
                            MaxLength="10">  
                        </telerik:GridBoundColumn> 
                        <telerik:GridBoundColumn DataField="Serial" HeaderText="Serial" SortExpression="Serial" 
                            UniqueName="Serial" MaxLength="18">  
                        </telerik:GridBoundColumn> 
                        <telerik:GridBoundColumn DataField="Value" HeaderText="Value" SortExpression="Value" 
                            UniqueName="Value" MaxLength="8">  
                        </telerik:GridBoundColumn> 
                        <telerik:GridEditCommandColumn Display="false"></telerik:GridEditCommandColumn>    
                    </Columns> 
                </MasterTableView> 
                <FilterMenu EnableTheming="True">  
                    <CollapseAnimation Type="OutQuint" Duration="200"></CollapseAnimation> 
                </FilterMenu> 
            </telerik:RadGrid> 

Code Behind
Protected Sub transferGrid_ItemCreated(ByVal sender As Object, ByVal e As Telerik.Web.UI.GridItemEventArgs) Handles transferGrid.ItemCreated  
        If TypeOf e.Item Is Telerik.Web.UI.GridEditFormItem AndAlso e.Item.IsInEditMode Then  
            Dim linkButton As New Button  
            linkButton.Text = "Lookup Tag" 
            linkButton.CommandName = "LookupTag" 
            linkButton.CausesValidation = False 
            linkButton.Attributes("onclick") = "javascript:return confirm('Lookup will use the Asset Tag to fill out details. If asset is not found, data will not be returned.')"  
            Try  
                Dim cancel As Button = TryCast(e.Item.FindControl("PerformInsertButton"), Button)  
                cancel.Parent.Controls.Add(New LiteralControl(" "))  
                cancel.Parent.Controls.Add(linkButton)  
            Catch ex As Exception  
 
            End Try  
 
        End If  
 
    End Sub  
 
 Protected Sub transferGrid_ItemCommand(ByVal source As Object, ByVal e As Telerik.Web.UI.GridCommandEventArgs) Handles transferGrid.ItemCommand  
        If e.CommandName = "InitInsert" Or e.CommandName = "Edit" Then  
            'btnPrintEmail.Enabled = False 
            transferGrid.MasterTableView.CommandItemDisplay = GridCommandItemDisplay.None  
            'lookuptagButton.Visible = False 
            'Dim lookupTag As Button = TryCast(e.Item.FindControl("LookupTag"), Button) 'INDEX ERROR HERE ON EDIT SAVE....INSERT WORKED FINE 
            'lookupTag.Visible = False 
 
        ElseIf e.CommandName = "LookupTag" Then  
            Dim item As GridEditableItem = CType(e.Item, GridEditableItem)  
            'Dim tagText As String = CType(item("Tag").Controls(0), TextBox).Text  
            'Dim editedItem As GridEditableItem = CType(e.Item, GridEditableItem)  
            'Dim itemValue As String = item("Tag").Text  
            Dim cell As TableCell = item("Tag")  
            Dim itemValue As String = (CType(cell.Controls(0), TextBox)).Text 'INDEX ERROR HERE ONLY WHEN TRYING TO SAVE AFTER EDIT  
 
            'MessageBox(itemValue)  
            Dim accessConnection As SqlConnection = New SqlConnection()  
            Dim cn As OleDb.OleDbConnection = New OleDb.OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" + System.Web.HttpContext.Current.Server.MapPath("~/App_Data/ReceivingLog.mdb"))  
            'provider to be used when working with access database  
            cn.Open()  
            'calculate mins, hrs played  
            Dim cmd As OleDb.OleDbCommand = New OleDb.OleDbCommand("SELECT [Make], [Model], [SerialNum], [PO] FROM [tblReceivingLog] WHERE [InventoryNum] = '" & itemValue & "'", cn)  
            Dim dr = cmd.ExecuteReader  
            While dr.Read  
                CType(item("Manufacturer_Name").Controls(0), TextBox).Text = dr(0)  
                CType(item("Model").Controls(0), TextBox).Text = dr(1)  
                CType(item("Serial").Controls(0), TextBox).Text = dr(2)  
                CType(item("PO").Controls(0), TextBox).Text = dr(3)  
            End While  
 
            cn.Close()  
        Else  
            'btnPrintEmail.Enabled = True 
            'transferGrid.MasterTableView.GetColumn("LookupTag").Display = False 
            transferGrid.MasterTableView.CommandItemDisplay = GridCommandItemDisplay.Bottom  
        End If  
 
    End Sub 

 

Thomas Salt
Top achievements
Rank 1
 answered on 16 Oct 2009
1 answer
178 views

I'm not sure if this has something to do with page life cycle, but the Autocompleteextender control doesn't behave as expected. Firebug tells me the control is rendered as follows at runtime:

<em unselectable="on">The TargetControlID of 'AutoCompleteExtender1' is not valid. A control with ID 'UserControl1_TextBox1' could not be found.</em>

I guess the control can't be found because it doesn't exist yet??

How can I make this work? Due to layout, I can't move TextBox1 into ParentPage.aspx

UserControl1.ascx:

  1. TextBox1 (I'd like to make the target of a Toolkit AutoCompleteExtender)
    1. rendered as UserControl1_TextBox1
    2. <asp:TextBox ID="TextBox1" runat="server" class="allcaps"></asp:TextBox>

UserControl1.ascx.cs:

  1. Page_Load method (before the check for postback)
    1. AutoCompleteExtender ace = (AutoCompleteExtender)this.Parent.FindControl("AutoCompleteExtender1");
      ace.TargetControlID = TextBox1.UniqueID;

ParentPage.aspx (RadWindow):

  1. Form1
    1. RadScriptManager1
    2. UserControl1
    3. RadAjaxManager1

ParentPage.aspx.cs

  1. Page_Load method
    1. AutoCompleteExtender AutoCompleteExtender1 = new AutoCompleteExtender();
      AutoCompleteExtender1.ID = "AutoCompleteExtender1";
                  
      AutoCompleteExtender1.ServicePath = "AutoCompleteUserControl.asmx";
      AutoCompleteExtender1.ServiceMethod = "GetVendorData";
      AutoCompleteExtender1.MinimumPrefixLength = 1;
      AutoCompleteExtender1.CompletionSetCount = 12;
      
      HtmlForm form = this.Page.FindControl("Form1") as HtmlForm;
      form.Controls.Add(AutoCompleteExtender1);

AutoCompleteUserControl.asmx.cs has a WebMethod:

public string[] GetVendorData(string prefixText, int count)

David Fox
Top achievements
Rank 1
 answered on 16 Oct 2009
2 answers
125 views
Hi all,
I have a RADGRID:

<telerik:RadGrid ID="grdHSKT" runat="server"
                        onneeddatasource="grdHSKT_NeedDataSource" Skin="Office2007"
                        AllowPaging="True" AllowSorting="True" AutoGenerateColumns="False"
                        oneditcommand="grdHSKT_EditCommand">
                        <MasterTableView CommandItemDisplay="TopAndBottom" TableLayout="Auto" >
                        <PagerStyle Mode="NextPrevAndNumeric"  />
                            <Columns>
                                <telerik:GridButtonColumn UniqueName="EditColumn" ButtonType="ImageButton" CommandName="Edit" />
                                <telerik:GridBoundColumn DataField="TenHSKemTheo" HeaderText="Tên hồ sơ kèm theo" UniqueName="tenHSKT" DataType="System.String">
                                </telerik:GridBoundColumn>
                                <telerik:GridBoundColumn DataField="SoBanChinh" HeaderText="Bản chính" UniqueName="banChinh" DataType="System.Int32">
                                </telerik:GridBoundColumn>
                                <telerik:GridBoundColumn DataField="SoBanSao" HeaderText="Bản sao" UniqueName="banSao" DataType="System.Int32">
                                </telerik:GridBoundColumn>
                                <telerik:GridBoundColumn DataField="GhiChu" HeaderText="Ghi chú" UniqueName="ghiChu" DataType="System.String">
                                </telerik:GridBoundColumn>
                                <telerik:GridTemplateColumn UniqueName="TemplateColumn" HeaderText="Chọn">
                                <ItemTemplate>
                                    <asp:Panel ID="Panel1" runat="server">
                                        <asp:CheckBox ID="cbActive" Checked="true" runat="server" AutoPostBack="true" OnCheckedChanged="CheckedChanged" />
                                    </asp:Panel>
                                    </ItemTemplate>
                                </telerik:GridTemplateColumn>
                            </Columns>
                            <EditFormSettings ColumnNumber="1" CaptionFormatString="Thay đổi hồ sơ kèm theo:">
                                <FormTemplate>
                                   <table cellspacing="5px" cellpadding="2px">
                                    <tr>
                                        <td>Tên hồ sơ kèm theo: </td>
                                        <td>
                                            <asp:TextBox ID="txtHoSoKemTheo" runat="server" Text='<%# DataBinder.Eval(Container.DataItem, "TenHSKemTheo") %>' ></asp:TextBox>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>Số bản chính: </td>
                                        <td>
                                            <asp:TextBox ID="txtSoBanChinh" runat="server" Text='<%# DataBinder.Eval(Container.DataItem, "SoBanChinh") %>' > </asp:TextBox>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>Số bản sao: </td>
                                        <td>
                                            <asp:TextBox ID="txtSoBanSao" runat="server" Text='<%# DataBinder.Eval(Container.DataItem, "SoBanSao") %>'></asp:TextBox>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>Ghi chú: </td>
                                        <td>
                                            <asp:TextBox ID="txtMoTa" runat="server" Text='<%# DataBinder.Eval(Container.DataItem, "GhiChu") %>'></asp:TextBox>
                                        </td>
                                    </tr>
                                   </table>
                                </FormTemplate>
                            </EditFormSettings>
                        </MasterTableView>
                        <ClientSettings AllowColumnsReorder="True">
                            <Selecting AllowRowSelect="True" />
                        </ClientSettings>
                    </telerik:RadGrid>

And now I want to get checkbox have ID: cbActive into GridTemplateColumn when I call grdHSKT_EditCommand method to set enable property on it !!! But I don' know how to get it !!!
Plz help me !!! Thnks so much for any help.

hongnguyenx
Top achievements
Rank 1
 answered on 16 Oct 2009
2 answers
120 views
Hey Guys!

I have a big problem and need your help!

I have tree controls :
 - RadTabStrip wich i assign texts and values
 - SqlDataSource
 - RadScheduler wich contain over values.

The SqlDataSource provide Radcheduler values.
I want to use RadTabStrip to filter SqlDataSource contents.

My problem is RadTabStrip control dont have a SelectedValue. 

<asp:SqlDataSource ID="SqlDataSourceRadScheduler" runat="server"  

 

  ConnectionString="<%$ ConnectionStrings:ConnectionString %>"  

 

  SelectCommand="SELECT * FROM planning WHERE [fk_id] = @fk_id" 

 

  ProviderName="<%$ ConnectionStrings:ConnectionString.ProviderName %>"  

 

 

 

    <SelectParameters 

 

      <asp:ControlParameter ControlID="RadTabStrip" DefaultValue="2" Name="fk_id" 

 

        PropertyName="SelectedValue" Type="Int32" />  

 

    </SelectParameters

 

</asp:SqlDataSource>


Please Help me.
Thanks,
Azize

 




 

 

Nicolaï
Top achievements
Rank 2
 answered on 16 Oct 2009
1 answer
129 views
I am trying the cardview example for grid given on your website. I am trying to build the same example with an older version of telerik dll i.e. Telerik 2007.3.1314.20 but its not allowing me to add the Item template tag (<ItemTemplate></ItemTemplate>) in grid. Can we use the ItemTemplate tag in grid using the version of the telerik dll mentioned above? I have tried the same example using the latest version of the telerik dll and its working fine. But I need to do the same sort of thing using the older version of telerik dll as currently running website is using version of telerik dll mentioned above.

A quick reply would be highly appreciated.

Thanks
Rajeev
Georgi Krustev
Telerik team
 answered on 16 Oct 2009
2 answers
156 views
I have a very nice grid layout that has everything aligned perfectly except my decorated button, I see that it wraps my input button into an anchor tag in Firebug. I tried adding margin to the top of the anchor tag but that just causes my entire row to shift not the individual button. If I add padding to the anchor it causes all of the image assumptions to become messed up and makes the button not look right.

Is there a known solution to making this be vertically aligned in the middle as opposed to the top of the parent element?
Robert
Top achievements
Rank 1
 answered on 16 Oct 2009
1 answer
157 views
Hi,

GridTemplateColumn fileds didnt update table fields. Other fields are update ok. Why GridTemplateColumn  dont update table?

I have bold all the template column and parameters

 <telerik:RadGrid ID="RadGrid2" runat="server" AutoGenerateColumns="False" DataSourceID="sqlInfTRans"
            GridLines="None" Skin="Web20" AllowAutomaticDeletes="True"
            AllowAutomaticInserts="True" AllowAutomaticUpdates="True"
            AutoGenerateDeleteColumn="True" AutoGenerateEditColumn="True" EditMode="InPlace" DataMember="DefaultView">
<MasterTableView DataKeyNames="ITransID" CommandItemDisplay="TopAndBottom" AutoGenerateColumns="False" AllowAutomaticDeletes="true" AllowAutomaticInserts="true" AllowAutomaticUpdates="true"
                 >
<RowIndicatorColumn>
<HeaderStyle Width="20px"></HeaderStyle>
</RowIndicatorColumn>

<ExpandCollapseColumn>
<HeaderStyle Width="20px"></HeaderStyle>
</ExpandCollapseColumn>
    <Columns>
        <telerik:GridButtonColumn CommandName="Select" Text="Select"
            UniqueName="column">
        </telerik:GridButtonColumn>
     
        
        <telerik:GridTemplateColumn UniqueName="IReasonforIssueID" HeaderText="IReasonforIssueID">
        
        <ItemTemplate>        
                <asp:Literal ID="ltrREason" runat="server"  Text ='<%#Eval("IReasonForIssueDesc") %>' ></asp:Literal>
        
        </ItemTemplate>
        <EditItemTemplate>
        
         <telerik:Radcombobox runat="server"
                                             ID="rcmReason"
                                             DataTextField="IReasonForIssueDesc"
                                             DataValueField="IReasonforIssueID"
                                             HighlightTemplatedItems="true"
                                             Height="190px"
                                             Width="220px"
                                             DropDownWidth="420px"
                                             DataSourceID="lnkReason"
                                             SelectedValue='<%# DataBinder.GetDataItem("IReasonforIssueID") == null ? "" : (String)DataBinder.Eval(Container.DataItem, "IReasonforIssueID") %>'
                                             EnableItemCaching="True"
                                             EnableLoadOnDemand="True"
                                             emptymessage="Please select one..."
                                             allowcustomtext="True" MarkFirstMatch="True">
                                             </telerik:RadComboBox>
                                               

        
        </EditItemTemplate>
        
        </telerik:GridTemplateColumn>

        
        
        
        <telerik:GridBoundColumn DataField="IOurDocRev" HeaderText="IOurDocRev"
            UniqueName="IOurDocRev">
        </telerik:GridBoundColumn>
        
        <telerik:gridtemplatecolumn UniqueName="IOurTransRetDate"
                                          HeaderText="IOurTransRetDate">
                                         <ItemTemplate>
                                         
                                         <asp:Literal ID="TDate" runat="server"     Text ='<%#Bind("IOurTransRetDateF") %>' ></asp:Literal>
                                         
                                            
                                         
                                         </ItemTemplate>
                                         
                                         <EditItemTemplate>
                                             <telerik:raddatepicker ID="RadIOurTransRetDate" runat="server"
                                                 DbSelectedDate=<%#Eval("IOurTransRetDateF") %> Width="100px"  
                                                 DateInput-DateFormat="dd/MM/yyyy"  >
                                             </telerik:RadDatePicker>
                                         
                                         </EditItemTemplate>
                                         </telerik:GridTemplateColumn>     

                                         
        
     
        <telerik:GridBoundColumn DataField="IOurRtrnTransNo"
            HeaderText="IOurRtrnTransNo" UniqueName="IOurRtrnTransNo">
        </telerik:GridBoundColumn>
        <telerik:GridBoundColumn DataField="OurRtrnCodeID" HeaderText="OurRtrnCodeID"
            UniqueName="OurRtrnCodeID">
        </telerik:GridBoundColumn>
        <telerik:GridBoundColumn DataField="IfaceDocRev" HeaderText="IfaceDocRev"
            UniqueName="IfaceDocRev">
        </telerik:GridBoundColumn>
        
        
         <telerik:gridtemplatecolumn UniqueName="IfaceTransDate"
                                          HeaderText="IfaceTransDate">
                                         <ItemTemplate>                                         
                                         <asp:Literal ID="OurTransRetDate" runat="server"     Text ='<%#Bind("IfaceTransDateF") %>' ></asp:Literal>
                                                                                    
                                         
                                         </ItemTemplate>
                                         
                                         <EditItemTemplate>
                                             <telerik:raddatepicker ID="RadIfaceTransDate" runat="server"
                                                 DbSelectedDate='<%#Eval("IfaceTransDateF") %>' Width="100px"  
                                                 DateInput-DateFormat="dd/MM/yyyy"  >
                                             </telerik:RadDatePicker>
                                         
                                         </EditItemTemplate>
                                         </telerik:GridTemplateColumn>  

                                         
                                         
        
        
        
        <telerik:GridBoundColumn DataField="IfaceTransNo" HeaderText="IfaceTransNo"
            UniqueName="IfaceTransNo">
        </telerik:GridBoundColumn>
    </Columns>
</MasterTableView>
            <ClientSettings>
                <Selecting AllowRowSelect="True" />
            </ClientSettings>
        </telerik:RadGrid>


        <asp:LinqDataSource ID="lnkReason" runat="server" ContextTypeName="DataClassesDataContext"
        TableName="tbl_LU_InterfacerReasonForIssues" AutoPage="False">
        </asp:LinqDataSource>                          
    
    </div>   
                          
       <asp:SqlDataSource ID="sqlInfTRans"
                                    
                            ConnectionString="<%$ ConnectionStrings:SiteSqlServer %>"
                            SelectCommand="SELECT convert(varchar(10),IfaceTransDate,103) as IfaceTransDateF,convert(varchar(10),IOurTransRetDate,103) as IOurTransRetDateF, * from  qry_DATA_InterfacerTransmittals WHERE (DocNo = @DocNo) and ICompanyCode=@ICompanyCode "
                            DeleteCommand ="Delete from [tbl_DATA_InterfacerTransmittals] where ITransID=@ITransID"
                            
                            InsertCommand="insert into tbl_DATA_InterfacerTransmittals ([DocNo],[ICompanyCode],IReasonforIssueID,IOurDocRev,IOurTransRetDate,IOurRtrnTransNo,OurRtrnCodeID,IfaceDocRev,IfaceTransDate,IfaceTransNo)
                            values(@DocNo,@ICompanyCode,@IReasonforIssueID,@IOurDocRev,@IOurTransRetDate,@IOurRtrnTransNo,@OurRtrnCodeID,@IfaceDocRev,@IfaceTransDate,@IfaceTransNo)"
                            
                            
                            UpdateCommand="update tbl_DATA_InterfacerTransmittals set [IReasonforIssueID]=@IReasonforIssueID,IOurDocRev=@IOurDocRev,IOurTransRetDate=@IOurTransRetDate,
                            IOurRtrnTransNo=@IOurRtrnTransNo,OurRtrnCodeID=@OurRtrnCodeID,IfaceDocRev=@IfaceDocRev,IfaceTransDate=@IfaceTransDate,IfaceTransNo=@IfaceTransNo where ITransID=@ITransID"
                            runat="server">
                                                                               
                                    
                                    <SelectParameters>                                                                           
                                        <asp:ControlParameter ControlID="Label1" PropertyName="Text" Type="String" Name="DocNo" />
                                       <asp:ControlParameter ControlID="Label2" PropertyName="Text" Type="String" Name="ICompanyCode" />

                                    </SelectParameters>
                                    <DeleteParameters>
                                        <asp:Parameter Name="ITransID" Type="Int32" />
                                    
                                    </DeleteParameters>
                                    
                                <UpdateParameters>
                                    <asp:ControlParameter ControlID="Label1" PropertyName="Text" Type="String" Name="DocNo" />
                                    <asp:Parameter Name="ITransID" Type="Int32" />            
                                    <asp:ControlParameter ControlID="Label2" PropertyName="Text" Type="String" Name="ICompanyCode" />

                                    <asp:Parameter Name="IReasonforIssueID" Type="String" />
                                    <asp:Parameter Name="IOurDocRev" Type="String" />
                                    <asp:Parameter Name="IOurTransRetDate" Type="String" />
                                    <asp:Parameter Name="IOurRtrnTransNo" Type="String" />
                                    <asp:Parameter Name="OurRtrnCodeID" Type="String" />
                                    <asp:Parameter Name="IfaceDocRev" Type="String" />                                    
                                    <asp:Parameter Name="IfaceTransDate" Type="String" />
                                    <asp:Parameter Name="IfaceTransNo" Type="String" />                                                              
                                </UpdateParameters>
                                    
                        <InsertParameters>
                                                                     
                                    <asp:ControlParameter ControlID="Label1" PropertyName="Text" Type="String" Name="DocNo" />
                                    <asp:ControlParameter ControlID="Label2" PropertyName="Text" Type="String" Name="ICompanyCode" />
                                     
                                    <asp:Parameter Name="IReasonforIssueID" Type="String" />
                                    <asp:Parameter Name="IOurDocRev" Type="String" />
                                    <asp:Parameter Name="IOurTransRetDate" Type="String" />
                                    <asp:Parameter Name="IOurRtrnTransNo" Type="String" />
                                    <asp:Parameter Name="OurRtrnCodeID" Type="String" />
                                    <asp:Parameter Name="IfaceDocRev" Type="String" />                                    
                                    <asp:Parameter Name="IfaceTransDate" Type="String" />
                                    <asp:Parameter Name="IfaceTransNo" Type="String" />
                                    
                          </InsertParameters>                                    
                                </asp:SqlDataSource>

Pavlina
Telerik team
 answered on 16 Oct 2009
4 answers
150 views

Hi, i am trying to use the file explorer on a page which has a master page of which the controls (text boxes) on the pages are genarated from a usercontrol, i'm trying to have two text boxes which both link to the file explorer using the file seletor dialog demo http://demos.telerik.com/aspnet-ajax/fileexplorer/examples/fileselectordialog/defaultcs.aspx, everything seems to work apart from when i click the files on file explorer the window shuts but my file paths are not transfered to the text boxes , below is the code that is genarated from one of the usercontrols on the page which look like its passing the corrent name of the control but i'm not sure if i am mising something? any help would be great

renderd usercontrol
<input name="ctl00$ContentPlaceHolder3$HomeBannerZone2$TXBHeadingLink" type="text" value="some text" id="ctl00_ContentPlaceHolder3_HomeBannerZone2_TXBHeadingLink" style="width:500px;" />

Renderd Java
  function OnFileSelected(wnd, fileSelected)
        {
            var textbox = $get("ctl00_ContentPlaceHolder3_HomeBannerZone2_TXBHeadingLink");
            textbox.value = fileSelected;
        }

Fiko
Telerik team
 answered on 16 Oct 2009
6 answers
133 views
Hi,
I am using RadTreeView from telerik Radcontrols for ASP.Net ajax q2 2009 and RadAjax from telerik radcontrols for asp.net (version 1.8.5) in a page.
on page load everything works fine but when the panel which contains treeview is updated by Ajax Manager, every functionality of treeview is gone.
Before this i had RadTreeView for asp.net (version 6.0.3) and everything worked fine.
but when I upgraded it to asp.net ajax the problem above appeared.

what should I do?



Amir
Top achievements
Rank 1
 answered on 16 Oct 2009
1 answer
65 views
I am using this piece of code for setting the pagestyle.

<

 

PagerStyle Mode="NextPrevAndNumeric" />

 

You can see in the attachment when it renders on the page, there is "select" text displayed adjacent to page size. This happens on the content page. I am using the grid in couple of other pages in the app, it renders fine. so not sure whats going on here.


Dimo
Telerik team
 answered on 16 Oct 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?