Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
111 views
I'm working on a website where I need a radiobutton list to do an asynchronous postback.  I have my radajaxmanager set up to have a div that surrounds most of the page update itself when a control in the div postsback.  This works great for all of my controls except the radiobuttonlist.  When one of the radiobuttons is clicked the page does a regular postback instead of the asynchronous one I'm expecting.

A couple of interesting things:
1.  My page does not exhibit this behavior in FireFox (i.e. in FireFox asynchronous postback happens) but does in IE and Chrome.
2.  If I replace the radiobuttonlist with a checkbox list and the user clicks on one of the checkboxes the page does an asynchronous postback.
3. This website is an interface for taking surveys that have been predefined.  Each survey has a collection of sections, each section has a collection of pages, and each page has a collection of questions.  If the radio button list is inside a question it does the regular postback.  If the radiobuttonlist is anywhere above the question level (e.g. on a page or section) it does the asynchronous postback fine.

I have attached a stripped down version of my website that is the bare minimum I've found that can reproduce this problem.

Does anyone know what is going on here?

telerik controls version:  2011 Q1 and previous versions
Dustin
Top achievements
Rank 1
 answered on 15 Apr 2011
2 answers
86 views
Dear Friends,
could you please help me to get the way to read a percent value (0, 0.1,... to 1) in a textbox using % value like 0%, 1% to 100%
my database has a column with name of percentcomp as float but i field to read it through my application that i convert the value to string to be appeared in my text box but unlikely when i convert to string I lose the value. kindly find my code below


 Protected Sub DivID_load(ByVal sender As Object, ByVal e As System.EventArgs) Handles DivID.Load
        If Not Page.IsPostBack Then


            If Not (DivID.Text = "") Then
                ' Create a Select statement that searches for a record
                ' matching the specific Call Number from the Value property.
                Dim selectSQL As String
                selectSQL = " SELECT MasterEntry.EquiryType, DivisionsInv.ID, DivisionsInv.LogNumber ,  DivisionsInv.SolutionComp, DivisionsInv.Division, DivisionsInv.ProposedValue, DivisionsInv.Employee, DivisionsInv.Status, DivisionsInv.PercentCompl, DivisionsInv.ClosedDate, DivisionsInv.HrsWorked, DivisionsInv.Remarks, Employees.Name, Employees.EmpNumber"
                selectSQL &= " FROM MasterEntry INNER JOIN DivisionsInv ON MasterEntry.LogNumber = DivisionsInv.LogNumber INNER JOIN Employees ON DivisionsInv.Employee = Employees.EmpNumber "
                selectSQL &= "WHERE DivisionsInv.ID='" & DivID.Text & "' "
                selectSQL &= " AND EmpNumber = '" & Profile.EmpNum & "'"


                ' Define the ADO.NET objects.
                Dim strConnString As String = ConfigurationManager.ConnectionStrings("TSDATA2ConnectionString").ConnectionString()
                Dim con As New SqlConnection(strConnString)

                Dim cmd As New SqlCommand(selectSQL, con)
                Dim reader As SqlDataReader
                ' Try to open database and read information.

                Try
                    con.Open()
                    reader = cmd.ExecuteReader()
                    reader.Read()
                    UpdateButton.Enabled = True
                    Panel1.Visible = True
                    ' Fill the controls.
                    ' If reader("AccManager").ToString() <> orgn.SelectedValue Then
                    'UpdateTXT0.Text = "Sorry your are not Authorized"
                    'End If

                    EngineerName.Text = reader("Name").ToString()

                    Eng_LogNumber.Text = reader("LogNumber").ToString
                    SolutionText.Text = reader("SolutionComp").ToString()
                    DivisionText.Text = reader("Division").ToString()
                    ProposedValueText.Text = reader("ProposedValue").ToString()
                    StatusText.SelectedValue = reader("Status").ToString()
                    PercentCompl.Text = reader("PercentCompl").ToString()
                    If Not (reader("ClosedDate").ToString() = "") Then
                        ClosedDate.SelectedDate = reader("ClosedDate").ToString()
                    End If
                    HrsWorked.Text = reader("HrsWorked").ToString()

                    remark.Text = reader("Remarks").ToString()

                    TypeText.Text = reader("EquiryType").ToString()

                Catch err As Exception
                    Labelerr.Text = "This Call may not assigned to you or an Error present "
                    UpdateButton.Enabled = False
                    Panel1.Visible = False






                Finally
                    con.Close()
                End Try
            End If
        End If
    End Sub


Best Regards,
Mohammed
Top achievements
Rank 1
 answered on 14 Apr 2011
13 answers
673 views
Dear,
How to access the controls , example subject textbox and description textbox found in scheduler Advanced Form (by clicking options). I would like to open in edit mode only (not insert mode) and assign some text in description textbox. How to do?

Kind regards
Arockiasamy
Chris
Top achievements
Rank 1
 answered on 14 Apr 2011
1 answer
205 views
I am using RadAjaxPanel on my page, on one button click, i am using Response.Redirect, but redirect not working.
I am getting error :
Microsoft JScript runtime error: Sys.WebForms.PageRequestManagerParserErrorException: The message received from the server could not be parsed.

Please help.
Daniel
Telerik team
 answered on 14 Apr 2011
2 answers
648 views

Hi.!

 

I have a Rad Grid control in my ASPX page,  then I bind this control (server side binding) to a data table that I get from a web service. I want to implement a client side filtering, but I don’t know how to do this or what things I need to change in order to do that. I think this is possible, because all the information I got, is now in client side (My table with all the rows.!! )

 

I successfully implement server side filtering but this is very slow, so sadly this is not an option for me. :(

 

Here’s a sample of my code (server side filtering):

 

ASPX: 

 

<telerik:RadGrid ID="gdOrders" AllowFilteringByColumn="True" runat="server" OnItemCommand="onItemCmd">
        <MasterTableView AllowFilteringByColumn="True">
              <Columns>
                    <telerik:GridBoundColumn DataField="CSOL_FOLIOOTID" ShowFilterIcon="false" HeaderText="Folio"     UniqueName="CSOL_FOLIOOTID"  Resizable="False" AutoPostBackOnFilter="true" CurrentFilterFunction="Contains" AllowFiltering="true"  />
                     .
                     .
                     .
             </Columns>
      </MasterTableView>
</telerik:RadGrid>

 

 

CODE BEHIND

//My binding (Loading function)

myDataTable = myObjInstance.GetOrders();
gdOrders.DataSource = myDataTable;
gdOrders.DataBind();

 
protected void onItemCmd(object source, Telerik.Web.UI.GridCommandEventArgs e)
      {
              switch (e.CommandName)
              {                 
                   case  RadGrid.FilterCommandName:
                      Pair filterPair = (Pair)e.CommandArgument;                      
                      TextBox filterBox = (e.Item as GridFilteringItem) [filterPair.Second.ToString()].Controls[0] as TextBox;
                      this.ApplyFilter((string)filterPair.Second, filterBox.Text);
                      break;
              }
          }        
      }
 
 
 private void ApplyFilter(string clmnName, string value)
      {
         string query = clmnName + " like '%" + value.Trim() + "%'";
         gdOrders.DataSource = myDataTable.Select(query);
         gdOrders.DataBind();
      }

 

Can any one suggest me how to do this, what should I change or implement?

 

Tnks :D

 

 

Sorry for my English!!

 

 

 

Angel
Top achievements
Rank 1
 answered on 14 Apr 2011
2 answers
193 views
I'm new to Telerik controls, so I apologize if this is an easy thing that I've missed in the documentation. 

We used to use a competitor's product that allowed for modifying cell values in a Row Initialization Event.  How would I go about modifying the value in a cell through code before the grid is displayed?  I haven't been able to figure this out yet. 
Dan
Top achievements
Rank 2
 answered on 14 Apr 2011
4 answers
92 views
I am using VS2010 with the latest Telerik controls for asp.net AJAX with ASP.NET 4.0.

I have a business intelligence application that needs to have a customer insert commentary into a report.  Currently we are using AJAX contol toolkit's Modal Popup Extender with Winthusiasm for the WYSIWYG editor.

We would like to replace all controls with Telerik controls.  I was thinking about some kind of modal dialog with a good looking editor.  I am open to other suggestions.

Can anyone point me to a control or two that would help me accomplish what I need.

Thanks,
--jeff
Jeff Kershner
Top achievements
Rank 1
 answered on 14 Apr 2011
2 answers
83 views
Hello-

I have created an aspx page that has a RadGrid on it and when a user inserts, deletes or edits a row in the grid, the correct callback is made and everything works perfectly.

The problem is that when I tie that same aspx page to a master page and put the grid inside a content control, the Insert/Delete/Edit callback is never made.

I spent a lot of time looking to see if this help page applied:  http://www.telerik.com/help/aspnet/grid/grdmakepostbackajaxrequestfromusercontrolwebformmasterpage.html

But I wasn't able to understand how to make it work for the Insert/Delete/Edit callbacks, so hopefully someone can provide me with an answer that is specific to my code.

Thanks in advance for your help!

- G  
Greg
Top achievements
Rank 1
 answered on 14 Apr 2011
4 answers
88 views
I've got a radgrid inside of a panel bar, but the panel bar contents do not show in page load UNTIL you mouse over the panel bar.  Only then will the panel bar's contents appear.  

The posting closest to this my problem is this posting, but it applies to a much older Telerik tools release (we're currently using RadControls for ASP.NET AJAX Q2 for .net 3.5 in a VS2008 web application).  There were other causes suggested  (.css formatting?!) , but those solutions do not work or didn't apply. 

So... Are there any known issues that fall in with this description?  Any leads, hints or links relating to this issue would be helpful.   

I have tried several solutions, but none worked or were appropriate.  Some of them include: 
  • Programatically  adding the AJAX contol update relationships on the page load - it worked great in ajaxifying contols, loading panels, etc, but did not resolve the grid/show/mouseover problem.
  • Setting the grids focus on page load - works - but doesn't work if multiple grids are in play, only the last grid given focus appears
  • Comparing this page(s) in question to OTHER pages in the app that are wired up the same way (data sources, binding, ajax settings, panel bar/item nesting, AJAX, etc). 
  • Creating a new page entirely, copying html and code behind, but no joy...

Thanks in advance,
Todd


Some code snippets...

<%@ Page Title="" Language="C#" MasterPageFile="~/OverShort/OverShort.Master" AutoEventWireup="true" CodeBehind="BillsOfLading.aspx.cs" Inherits="ODSWebSite.OverShort.BillOfLadings" %>
<%@ Register assembly="Telerik.Web.UI" namespace="Telerik.Web.UI" tagprefix="telerik" %>
 
<asp:Content ID="Content1" ContentPlaceHolderID="cphOSHead" runat="server">
 
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="cphOSMain" runat="server">
 
    <!-- NOTE: For export to work... -->
    <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
        <ClientEvents OnRequestStart="onRequestStart" />
        <AjaxSettings>
             <telerik:AjaxSetting AjaxControlID="ButtonSearch">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="pnlAll" LoadingPanelID="AjaxLoadingPanel1" /> 
                    <telerik:AjaxUpdatedControl ControlID="ButtonSearch" />
                    <telerik:AjaxUpdatedControl ControlID="RadGridBOLDetail"/>
                    <telerik:AjaxUpdatedControl ControlID="RadGridBOLSummary"/>
                    <telerik:AjaxUpdatedControl ControlID="lblError" />
                </UpdatedControls>
            </telerik:AjaxSetting>
            <telerik:AjaxSetting AjaxControlID="RadGridBOLDetail">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="pnlAll" LoadingPanelID="AjaxLoadingPanel1" /> 
                    <telerik:AjaxUpdatedControl ControlID="RadGridBOLDetail" /> 
                    <telerik:AjaxUpdatedControl ControlID="lblError" />
                </UpdatedControls>
            </telerik:AjaxSetting>
            <telerik:AjaxSetting AjaxControlID="RadGridBOLSummary">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="pnlAll" LoadingPanelID="AjaxLoadingPanel1" /> 
                    <telerik:AjaxUpdatedControl ControlID="RadGridBOLSummary" /> 
                    <telerik:AjaxUpdatedControl ControlID="lblError" />
                </UpdatedControls>
            </telerik:AjaxSetting>
             
            <telerik:AjaxSetting AjaxControlID="RadDateTimePickerFrom">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="RadDateTimePickerFrom" />
                </UpdatedControls>
            </telerik:AjaxSetting>
            <telerik:AjaxSetting AjaxControlID="RadDateTimePickerTo">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="RadDateTimePickerTo" />
                </UpdatedControls>
            </telerik:AjaxSetting>
            <telerik:AjaxSetting AjaxControlID="RadComboBoxTASLocations">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="RadComboBoxTASLocations" />
                </UpdatedControls>
            </telerik:AjaxSetting>
        </AjaxSettings>
    </telerik:RadAjaxManager>
     
    <telerik:RadAjaxLoadingPanel runat="server" ID="AjaxLoadingPanel1" MinDisplayTime="50"></telerik:RadAjaxLoadingPanel>
    <telerik:RadFormDecorator ID="RadFormDecorator1" runat="server"  DecoratedControls="CheckBoxes, Buttons, Scrollbars, Textarea, Fieldset, Label, Zone, GridFormDetailsViews" />
    <asp:Panel ID="pnlAll" runat="server">
        <telerik:RadAjaxPanel ID="RadAjaxPanel1" runat="server" >
            <asp:Label ID="lblError" runat="server"></asp:Label>
            <table>
                <tr>
                    <td class="tdLabel"><label id="lblLocation" runat="server">Location:</label></td>
                    <td>
                        <telerik:RadComboBox ID="RadComboBoxTASLocations" runat="server"
                            DataSourceID="LocationsDataSource"
                            DataTextField="TypeDisplayValue"
                            DataValueField="TypeValue"
                            AutoPostBack="false"
                            CausesValidation="False"   
                            Height="200" width="200" DropDownWidth="250"
                        >
                        </telerik:RadComboBox>
                    </td>
                    <td class="tdLabel"><label id="lblFrom" runat="server">From:</label></td>
                    <td><telerik:RadDateTimePicker ID="RadDateTimePickerFrom" Runat="server"
                            Width="180" MinDate="2010-01-01">
                            <Calendar runat="server" UseColumnHeadersAsSelectors="False" UseRowHeadersAsSelectors="False" ViewSelectorText="x" ShowRowHeaders="false"></Calendar>
                                            <TimeView ID="TimeView1" runat="server" CellSpacing="-1" Culture="English (United Kingdom)"
                            EndTime="23:59:00" RenderDirection="Vertical"  Columns="2"></TimeView>
                        <TimePopupButton HoverImageUrl="" ImageUrl="" />
                        <DatePopupButton HoverImageUrl="" ImageUrl="" />
                        <DateInput ID="DateInput1" runat="server"
                            DateFormat="M/d/yyyy HH:mm" DisplayDateFormat="M/d/yyyy HH:mm">
                        </DateInput>
                        </telerik:RadDateTimePicker>
                    </td>
                    <td class="tdLabel"><label id="lblTo" runat="server">To:</label></td>
                    <td><telerik:RadDateTimePicker ID="RadDateTimePickerTo" Runat="server"  Width="180"
                            MinDate="2010-01-01">
                            <Calendar runat="server" UseColumnHeadersAsSelectors="False" UseRowHeadersAsSelectors="False" ViewSelectorText="x" ShowRowHeaders="false"></Calendar>
                                            <TimeView ID="TimeView2" runat="server" CellSpacing="-1" Culture="English (United Kingdom)"
                            EndTime="23:59:00" RenderDirection="Vertical"  Columns="2"></TimeView>
                        <TimePopupButton HoverImageUrl="" ImageUrl="" />
                        <DatePopupButton HoverImageUrl="" ImageUrl="" />
                        <DateInput ID="DateInput2" runat="server"
                            DateFormat="M/d/yyyy HH:mm" DisplayDateFormat="M/d/yyyy HH:mm">
                        </DateInput>
                        </telerik:RadDateTimePicker>
                    </td>
                    <td><asp:Button ID="ButtonSearch" runat="server" Text="Search"
                            onclick="ButtonSearch_Click" /></td>
            </tr>
            </table>
            <telerik:RadPanelBar ID="rpbBOLSummary" runat="server" Width="100%" >
                <Items>
                    <telerik:RadPanelItem runat="server" Expanded="True" Text="Summary">
                <Items>
                    <telerik:RadPanelItem runat="server" Value="BOLSummary">
                        <ItemTemplate>
                            <telerik:RadGrid ID="RadGridBOLSummary" runat="server"
                        Visible="false"
                        AllowFilteringByColumn="True" 
                        AllowSorting="True"
                        AutoGenerateColumns="False"
                        DataSourceID="myBillOfLadingsSummaryODS"
                        GridLines="Vertical"
                        onsortcommand="RadGridBOLSummary_SortCommand"
                        onitemdatabound="RadGridBOLSummary_ItemDataBound"
                        OnItemCommand="RadGridBOLSummary_ItemCommand"
                        ShowFooter="True"
                        ShowStatusBar="True"
                        Width="650px"
                        GroupingEnabled="False"
                        >
                        <GroupingSettings CaseSensitive="false" />
                        <MasterTableView DataSourceID="myBillOfLadingsSummaryODS"
                            CommandItemDisplay="Top" GridLines="Vertical"
                            AllowPaging="true" PageSize="20">
                            <PagerStyle Mode="NextPrevNumericAndAdvanced" Position="TopAndBottom" />
                            <commanditemsettings showexporttoexcelbutton="True"
                                showexporttopdfbutton="false"  ShowAddNewRecordButton="false"/>
                            <Columns>
                  
                       <telerik:GridBoundColumn DataField="InventoryDate" HeaderText="Inventory Date"
                            SortExpression="InventoryDate" UniqueName="InventoryDate"
                            DataType="System.DateTime" DataFormatString="{0:MM/dd/yyyy HH:mm}">
                            <ItemStyle Wrap="false" />
                        </telerik:GridBoundColumn>
                         
                        <telerik:GridBoundColumn DataField="ProductID" HeaderText="Product ID"
                            SortExpression="ProductID" UniqueName="ProductID" DataType="System.String"  FilterControlWidth="50px">
                        </telerik:GridBoundColumn>
                         
                        <telerik:GridBoundColumn DataField="BillIDCountATLAS" HeaderText="Bill Count (ATLAS)"
                            SortExpression="BillIDCountATLAS" UniqueName="BillIDCountATLAS" DataType="System.Int32" DataFormatString="{0:#,###0}" FilterControlWidth="60px">
                            <ItemStyle HorizontalAlign="Right" />
                        </telerik:GridBoundColumn>
 
                        <telerik:GridBoundColumn DataField="BillVolumeSumATLAS" HeaderText="Bill Vol (ATLAS)"
                            SortExpression="BillVolumeSumATLAS" UniqueName="BillVolumeSumATLAS" DataType="System.Int32" DataFormatString="{0:#,###0}" FilterControlWidth="60px">
                            <ItemStyle HorizontalAlign="Right" />
                        </telerik:GridBoundColumn>
                         
                        <telerik:GridBoundColumn DataField="BillIDCountTAS" HeaderText="Bill Count (TAS)"
                            SortExpression="BillIDCountTAS" UniqueName="BillIDCountTAS" DataType="System.Int32" DataFormatString="{0:#,###0}" FilterControlWidth="60px">
                            <ItemStyle HorizontalAlign="Right" />
                        </telerik:GridBoundColumn>
 
                        <telerik:GridBoundColumn DataField="BillVolumeSumTAS" HeaderText="Bill Vol (TAS)"
                            SortExpression="BillVolumeSumTAS" UniqueName="BillVolumeSumTAS" DataType="System.Int32" DataFormatString="{0:#,###0}" FilterControlWidth="60px">
                            <ItemStyle HorizontalAlign="Right" />
                        </telerik:GridBoundColumn>
 
                        <telerik:GridBoundColumn DataField="BillVolumeSumTASBBL" HeaderText="Bill Vol (TAS) BBL"
                            SortExpression="BillVolumeSumTASBBL" UniqueName="BillVolumeSumTASBBL" DataType="System.Int32" DataFormatString="{0:#,###0}" FilterControlWidth="60px">
                            <ItemStyle HorizontalAlign="Right" />
                        </telerik:GridBoundColumn>
                         
                        <telerik:GridBoundColumn DataField="VolumeVariance" HeaderText="Vol Variance"
                            SortExpression="VolumeVariance" UniqueName="VolumeVariance" DataType="System.Int32" DataFormatString="{0:#,###0}" FilterControlWidth="60px">
                            <ItemStyle HorizontalAlign="Right" />
                        </telerik:GridBoundColumn>
                         
                         
                    </Columns>
                            <EditFormSettings>
                        <EditColumn UniqueName="EditCommandColumn1">
                        </EditColumn>
                    </EditFormSettings>
                        </MasterTableView>
                        <ClientSettings AllowDragToGroup="False"></ClientSettings>
                    </telerik:RadGrid>
                        </ItemTemplate>
                    </telerik:RadPanelItem>
                </Items>
            </telerik:RadPanelItem>
                </Items>
            </telerik:RadPanelBar>
            <br />
            <telerik:RadPanelBar ID="rpBOLDetail" runat="server" Width="100%" >
                <Items>
                    <telerik:RadPanelItem runat="server" Expanded="True" Text="Detail">
                <Items>
                    <telerik:RadPanelItem runat="server" Value="BOLDetail">
                    <ItemTemplate>
                        <telerik:RadGrid ID="RadGridBOLDetail" runat="server"
                        Visible="false"
                        AllowFilteringByColumn="True" 
                        AllowSorting="True"
                        AutoGenerateColumns="False"
                        DataSourceID="myBillOfLadingsDetailODS"
                        GridLines="Vertical"
                        onsortcommand="RadGridBOLDetail_SortCommand" 
                        OnItemCommand="RadGridBOLDetail_ItemCommand"
                        ShowFooter="True"
                        ShowStatusBar="True"
                        Width="650px"
                        GroupingEnabled="true"
                        >
                        <GroupingSettings CaseSensitive="false" />
                        <MasterTableView DataSourceID="myBillOfLadingsDetailODS"
                            CommandItemDisplay="Top" GridLines="Vertical"
                            AllowPaging="true" PageSize="20">
                            <PagerStyle Mode="NextPrevNumericAndAdvanced" Position="TopAndBottom" />
                                <GroupByExpressions>
                                <telerik:GridGroupByExpression>
                                    <GroupByFields>
                                        <telerik:GridGroupByField FieldName="ProductID" /> 
                                    </GroupByFields
                                    <SelectFields>
                                        <telerik:GridGroupByField FieldName="ProductID" HeaderText="Product ID" /> 
                                    </SelectFields>
                                </telerik:GridGroupByExpression>
                            </GroupByExpressions>
                            <commanditemsettings showexporttoexcelbutton="True" showexporttopdfbutton="false"  ShowAddNewRecordButton="false"/>
                            <Columns>
                  
                        <telerik:GridBoundColumn DataField="InventoryDate" HeaderText="Inventory Date"
                            SortExpression="InventoryDate" UniqueName="InventoryDate"
                            DataType="System.DateTime" DataFormatString="{0:MM/dd/yyyy HH:mm}">
                            <ItemStyle Wrap="false" />
                        </telerik:GridBoundColumn>
 
                        <telerik:GridBoundColumn DataField="BillID" HeaderText="Bill ID"
                            SortExpression="BillID" UniqueName="BillID" DataType="System.String">
                        </telerik:GridBoundColumn>
                         
                        <telerik:GridBoundColumn DataField="DetailType" HeaderText="Detail Type"
                            SortExpression="DetailType" UniqueName="DetailType" FilterControlWidth="50px">
                             
                        </telerik:GridBoundColumn>
                         
                        <telerik:GridBoundColumn DataField="ProductID" HeaderText="Product ID"
                            SortExpression="ProductID" UniqueName="ProductID" FilterControlWidth="50px">
                             
                        </telerik:GridBoundColumn>
                         
                        <telerik:GridBoundColumn DataField="NetVolume" HeaderText="Net Volume"
                            SortExpression="NetVolume" UniqueName="NetVolume" DataType="System.Int32"
                            DataFormatString="{0:#,###0}" FilterControlWidth="70px">
                            <ItemStyle HorizontalAlign="Right" />
                        </telerik:GridBoundColumn>
                         
                        <telerik:GridBoundColumn DataField="UOM" HeaderText="UOM"
                            SortExpression="UOM" UniqueName="UOM" FilterControlWidth="50px">
                            <ItemStyle HorizontalAlign="Center" />
                        </telerik:GridBoundColumn>
                         
                        <telerik:GridBoundColumn DataField="ATLASProcessStatus" HeaderText="ATLASProcessStatus"
                            SortExpression="ATLASProcessStatus" UniqueName="ATLASProcessStatus">
                        </telerik:GridBoundColumn>
                         
                         
                         
                    </Columns>
                            <EditFormSettings>
                        <EditColumn UniqueName="EditCommandColumn1">
                        </EditColumn>
                    </EditFormSettings>
                        </MasterTableView>
                        <ClientSettings AllowDragToGroup="False">
                        </ClientSettings>
                    </telerik:RadGrid>
                    </ItemTemplate>
                </telerik:RadPanelItem>
                </Items>
            </telerik:RadPanelItem>
                </Items>
            </telerik:RadPanelBar>
        </telerik:RadAjaxPanel>
    </asp:Panel>
     
<br />
 
 
<asp:ObjectDataSource ID="LocationsDataSource" runat="server"
    DataObjectTypeName="Enterprise.ODS.DataObjects.Assets.StringCriteriaType"
    TypeName="Enterprise.ODS.BLL.Shared.LocationsODS"
    SelectMethod="GetUserLocationsWithKeyAndDescription"
    onselecting="LocationsDataSource_Selecting"
    >
    <SelectParameters>
        <asp:Parameter Name="user" />
    </SelectParameters>
</asp:ObjectDataSource>
 
<asp:ObjectDataSource ID="myBillOfLadingsDetailODS" runat="server"
    CacheDuration="120"
    DataObjectTypeName="Enterprise.ODS.DataObjects.OverShort.BOLDetail"
    TypeName="Enterprise.ODS.BLL.OverShort.BOLDetailsODS"
    SelectMethod="BillOfLadingDetails"
    OnUpdated="ObjDataSource_Event"
    EnableCaching="False" 
     onselected="ObjDataSource_Selected"
        onselecting="ObjDataSource_Selecting">
     <SelectParameters>
        <asp:ControlParameter Name="locationKey" ControlID="RadComboBoxTASLocations" Type="Int32" Direction="Input"/>
        <asp:ControlParameter Name="dateFrom" ControlID="RadDateTimePickerFrom" Type="DateTime" Direction="Input" />
        <asp:ControlParameter Name="dateTo" ControlID="RadDateTimePickerTo" Type="DateTime" Direction="Input" />
        <asp:Parameter DefaultValue="" Name="sortExpression" Type="String" />
        <asp:Parameter DefaultValue="" Name="sortDirection" Type="String" />
    </SelectParameters>
</asp:ObjectDataSource>
 
<asp:ObjectDataSource ID="myBillOfLadingsSummaryODS" runat="server"
    CacheDuration="120"
    DataObjectTypeName="Enterprise.ODS.DataObjects.OverShort.RackToAtlasComparison"
    TypeName="Enterprise.ODS.BLL.OverShort.RackToAtlasComparisonODS"
    SelectMethod="BillOfLadingSummary"
    OnUpdated="ObjDataSource_Event"
    EnableCaching="False" 
     onselected="ObjDataSource_Selected"
        onselecting="ObjDataSource_Selecting">
     <SelectParameters>
        <asp:ControlParameter Name="locationKey" ControlID="RadComboBoxTASLocations" Type="Int32" Direction="Input"/>
        <asp:ControlParameter Name="dateFrom" ControlID="RadDateTimePickerFrom" Type="DateTime" Direction="Input" />
        <asp:ControlParameter Name="dateTo" ControlID="RadDateTimePickerTo" Type="DateTime" Direction="Input" />
        <asp:Parameter DefaultValue="" Name="sortExpression" Type="String" />
        <asp:Parameter DefaultValue="" Name="sortDirection" Type="String" />
    </SelectParameters>
</asp:ObjectDataSource>
 
     
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="cphOSSideTasks" runat="server">
</asp:Content>


using System;
using System.Globalization;
using System.Web.UI.WebControls;
using Telerik.Web.UI;
using Enterprise.ODS.DataObjects;
using Enterprise.Utilities.DataAccessCore;
using Enterprise.ODS.DAL.OverShort;
 
 
namespace ODSWebSite.OverShort
{
    public partial class BillOfLadings : System.Web.UI.Page
    {
 
 
        protected void Page_Load(object sender, EventArgs e)
        {
            Shared.Helpers.FormatErrorLabel(ref lblError, true, "");// reset error label on page load
            if (!Page.IsPostBack)
            {
                // Select the page in the local nav bar
                ((OverShort)(Page.Master)).SelectPage(OverShort.OverShortPages.BillsOfLading);
 
                ODSWebSite.Shared.Helpers.SetDefaultLocationAndDateRange(User.Identity.Name,
                    ref RadComboBoxTASLocations, ref RadDateTimePickerFrom, ref RadDateTimePickerTo);
 
            }
        }
 
        #region grid events
 
        protected void RadGridBOLSummary_SortCommand(object source, GridSortCommandEventArgs e)
        {
            Shared.Helpers.SetSortOrderForObjDataSource(myBillOfLadingsSummaryODS, e);
        }
 
         
        protected void RadGridBOLDetail_SortCommand(object source, GridSortCommandEventArgs e)
        {
            Shared.Helpers.SetSortOrderForObjDataSource(myBillOfLadingsDetailODS, e);
        }
 
        protected void RadGridBOLSummary_ItemDataBound(object sender, GridItemEventArgs e)
        {
            if (e.Item is GridDataItem )
            {
                GridDataItem dataBoundItem = e.Item as GridDataItem;
                 
                 
 
                    int volVariance ;
                 
                if (int.TryParse(dataBoundItem["VolumeVariance"].Text, 
                   NumberStyles.Integer | NumberStyles.AllowThousands,CultureInfo.InvariantCulture, out volVariance))
                {
                    if (volVariance != 0)
                    {
                        dataBoundItem["VolumeVariance"].ForeColor = System.Drawing.Color.Red;
                        dataBoundItem["VolumeVariance"].Font.Bold = true;
                    }
                }
            }
        }
 
        protected void RadGridBOLDetail_ItemCommand(object source, GridCommandEventArgs e)
        {
            RadGrid grid = ((RadGrid)Shared.Helpers.FindControlRecursive(rpBOLDetail, "RadGridBOLDetail"));
            Shared.Helpers.RadGridItemCommandForExport(ref grid, e);
        }
        protected void RadGridBOLSummary_ItemCommand(object source, GridCommandEventArgs e)
        {
            RadGrid grid = ((RadGrid)Shared.Helpers.FindControlRecursive(rpbBOLSummary, "RadGridBOLSummary"));
            Shared.Helpers.RadGridItemCommandForExport(ref grid, e);
        }
 
        #endregion
 
        #region object data source events
 
        protected void ObjDataSource_Selected(object sender, ObjectDataSourceStatusEventArgs e)
        {
            Shared.Helpers.ObjDataSource_Selected(ref lblError, e);
        }
 
        protected void ObjDataSource_Event(object sender, ObjectDataSourceStatusEventArgs e)
        {
            Shared.Helpers.ObjDataSource_Event(ref lblError, sender, e);
        }
 
        protected void LocationsDataSource_Selecting(object sender, ObjectDataSourceSelectingEventArgs e)
        {
            e.InputParameters["user"] = Page.User.Identity.Name;
        }
 
        #endregion
 
        protected void ButtonSearch_Click(object sender, EventArgs e)
        {
            string errorMessage = "";
            if (Shared.Helpers.LocationDateRangeIsOK(
                ref RadComboBoxTASLocations,
                ref RadDateTimePickerFrom,
                ref RadDateTimePickerTo,
                ref errorMessage))
            {
                ((RadGrid)Shared.Helpers.FindControlRecursive(rpBOLDetail, "RadGridBOLDetail")).Rebind();
                ((RadGrid)Shared.Helpers.FindControlRecursive(rpBOLDetail, "RadGridBOLDetail")).Visible = true;
                //myBillOfLadingsDetailODS.Select();
 
                ((RadGrid)Shared.Helpers.FindControlRecursive(rpbBOLSummary, "RadGridBOLSummary")).Rebind();
                ((RadGrid)Shared.Helpers.FindControlRecursive(rpbBOLSummary, "RadGridBOLSummary")).Visible = true;
                //myBillOfLadingsSummaryODS.Select();
 
            }
            else
                Shared.Helpers.FormatErrorLabel(ref lblError, false, errorMessage);
 
        }
 
        protected void ObjDataSource_Selecting(object sender, ObjectDataSourceSelectingEventArgs e)
        
            // Stop data from loading on intial page load
            if (!Page.IsPostBack)
            {
                //don't auto-search when page loads
                e.Cancel = true;
            }
            else
            {
                string errorMessage = "";
 
                if (!(Shared.Helpers.LocationDateRangeIsOK(
                ref RadComboBoxTASLocations,
                ref RadDateTimePickerFrom,
                ref RadDateTimePickerTo,
                ref errorMessage)))
                {
                    Shared.Helpers.FormatErrorLabel(ref lblError, false, errorMessage);
                    e.Cancel = true;
                }
                else
                {
                    Shared.Helpers.FormatErrorLabel(ref lblError, true, "");
                }
            }
              
        }
 
 
    }
}







Todd
Top achievements
Rank 1
 answered on 14 Apr 2011
2 answers
246 views
That's basically my problem, just need to know what method in javascript will allow me to click (i.e. fire a click event) of a toolbarbutton. To be more precise, I actually need the onclientbuttonclicking event to be called.

Thanks,

Dan
Brian Azzi
Top achievements
Rank 2
 answered on 14 Apr 2011
Narrow your results
Selected tags
Tags
+? more
Top users last month
Ambisoft
Top achievements
Rank 2
Iron
Pascal
Top achievements
Rank 2
Iron
Matthew
Top achievements
Rank 1
Sergii
Top achievements
Rank 1
Iron
Iron
Andrey
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Ambisoft
Top achievements
Rank 2
Iron
Pascal
Top achievements
Rank 2
Iron
Matthew
Top achievements
Rank 1
Sergii
Top achievements
Rank 1
Iron
Iron
Andrey
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?