Telerik Forums
UI for ASP.NET AJAX Forum
2 answers
80 views
I have a grid that contains a column containing a checkbox.  Clicking the checkbox does an autopostback (the checked rows are saved in an array in the session so that the user's selections are preserved across multiple pages of the grid).  This works fine, but was orginally very slow to refresh in the browser (it wasn't really usable).  To speed it up I added entries to the RadAjaxManagerProxy to enable Partial Page Refreshes when the checkboxes are clicked.  This made the user experience much better; users can now quickly check the boxes in the grid without waiting.

But another feature of this page is that users can click anywhere in a grid row to postback to the server - then the grid is hidden and the detail fields of the record are displayed.  The problem I'm having is that the ajax settings are messing up the row click feature.  Users now have to click the row twice.  (The first click does postback to the server, but the client is doing a partial page refresh which leaves the grid still visible.  The second row click refreshes the whole page, which is the desired result.)

In summary, I want a checkbox in a grid that does an autopostback and a partial page refresh (only the grid should refresh).  Clicking anywhere else in the grid should do a postback and a full page refresh.

Would appreciate suggestions on resolving this. 

Here are the ajax settings:
<telerik:RadAjaxManagerProxy ID="RadAjaxManagerProxy1" runat="server">
        <AjaxSettings>             
            <telerik:AjaxSetting AjaxControlID="chkSelected">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="grdOrders" />
                </UpdatedControls>
            </telerik:AjaxSetting>
        </AjaxSettings>
    </telerik:RadAjaxManagerProxy>

And here's the grid:

<oscarcontrols:OscarGrid runat="server" ID="grdOrders" AutoGenerateColumns="false"
    Visible="true" PageSize="10" AllowPaging="true" ShowHeader="true" Width="100%"
    AllowSorting="true" EnableEmbeddedSkins="true" DataKeyNames="OrdID" OnPageIndexChanged="grdOrders_PageIndexChanged"
    OnPageSizeChanged="grdOrders_PageSizeChanged" OnItemCommand="grdOrders_ItemCommand"
    OnSelectedIndexChanged="grdOrders_SelectedIndexChanged" OnItemDataBound="grdOrders_ItemDataBound"
    Skin="Outlook" OnSortCommand="grdOrders_SortCommand"
    OnPreRender="grdOrders_PreRender">
    <ClientSettings EnableRowHoverStyle="true" EnableAlternatingItems="false" EnablePostBackOnRowClick="true">
        <Selecting AllowRowSelect="True" />
    </ClientSettings>
    <PagerStyle Position="TopAndBottom" Mode="NextPrevAndNumeric" Width="100%" AlwaysVisible="false" />
    <MasterTableView OnPreRender="grdOrders_PreRender" DataKeyNames="OrdID">
        <NoRecordsTemplate>
            <oscarcontrols:OscarPanel runat="server" ID="pnlNoRecords" Width="100%" CssClass="procOrdersNoRecordsFound">
                <h2>
                    <oscarcontrols:OscarLabel runat="server" ID="lblSorry" Text="Sorry. Try Again." /></h2>
                <oscarcontrols:OscarLabel runat="server" ID="lblNoRecords" Text="There were no records found that matched your search criteria." /><br />
                <br />
            </oscarcontrols:OscarPanel>
        </NoRecordsTemplate>
        <Columns>
            <telerik:GridTemplateColumn UniqueName="CheckBoxTemplateColumn">
                <HeaderTemplate>
                    <oscarcontrols:OscarGridCheckBox TargetGrid="grdOrders" IsHeader="true" ID="chkSelectAll"
                        AutoPostBack="true" runat="server"></oscarcontrols:OscarGridCheckBox>
                </HeaderTemplate>
                <ItemTemplate>
                    <oscarcontrols:OscarGridCheckBox TargetGrid="grdOrders" IsItem="true" ID="chkSelected"
                        AutoPostBack="true" runat="server"></oscarcontrols:OscarGridCheckBox>
                </ItemTemplate>
            </telerik:GridTemplateColumn>
            <%--  _columnOrdID --%>
            <telerik:GridTemplateColumn UniqueName="Order #" HeaderText="Order #" SortExpression="OrdID"
                HeaderStyle-VerticalAlign="Top" ItemStyle-VerticalAlign="Top">
                <ItemTemplate>
                    <oscarcontrols:OscarLabel ID="lblOrdID" runat="server" Text='<%# Bind("OrdID") %>' />
                </ItemTemplate>
            </telerik:GridTemplateColumn>
            <%-- _columnOrderStatus --%>
            <telerik:GridTemplateColumn UniqueName="Order Status" HeaderText="Order Status" SortExpression="OrdStatusName"
                HeaderStyle-VerticalAlign="Top" ItemStyle-VerticalAlign="Top">
                <ItemTemplate>
                    <oscarcontrols:OscarLabel ID="lblOrderStatus" runat="server" Text='<%# Bind("OrdStatusName") %>' />
                </ItemTemplate>
            </telerik:GridTemplateColumn>
        </Columns>
    </MasterTableView>
</oscarcontrols:OscarGrid>

Mike
Top achievements
Rank 1
 answered on 02 May 2011
4 answers
204 views
Hi,

I have a radwindow which contains lots of nice functionality, but I need it to be openable by two different OpenerElementIDs.  I'd rather avoid having to duplicate the window just to acheive this.

How can I wire up two OpenerElementIDs to the same RadWindow?
Also...
Once that is done, how can I tell which opener was used to open that instance of the window?

Thanks,

Craig
Emanuele
Top achievements
Rank 2
 answered on 02 May 2011
2 answers
65 views
I have this code to allow users to enter dates into a RadDateInput using the formats mdyy or mddyy, reformatting them as mm/dd/yyyy.  It works great for Firefox and IE8, but it does not work for IE7.  I walked through the code, and set_newValue is in fact fired, but it does not change the date, and it handles those formats as invalid.

I also tried hacking it by setting the textbox and hidden fields directly, but that failed in pretty short order.

Has anyone implemented set_newValue in IE7?

<script type="text/javascript">
    function PreParseDate(sender, eventArgs)
    {
        var reSpace = /\s*/g;
        var reMdyy = /^\d{4}$/;
        var reMddyy = /^\d{5}$/;
        var val = eventArgs.get_newValue().replace(reSpace, '');
        
        if (reMdyy.test(val))
        {           
            eventArgs.set_newValue('0' + val[0] +
      '/0' + val[1] +
      '/' + (val[2] > 1 ? '19' : '20') + val[2] + val[3]);
        }
        else if (reMddyy.test(val))
        {
            eventArgs.set_newValue('0' + val[0] +
      '/' + val[1] + val[2] +
      '/' + (val[3] > 1 ? '19' : '20') + val[3] + val[4]);
        }
    }
</script>
<telerik:RadDateInput ID="rdiDOB" runat="server">
    <ClientEvents OnValueChanging="PreParseDate" />
</telerik:RadDateInput>

Thank you,

Eric
Eric
Top achievements
Rank 1
 answered on 02 May 2011
5 answers
383 views
Hi, I have RadDecorator on my page but I want to exclude only couple of TextBoxes and couple of Labels where I want to apply my own CSS.

 

<telerik:RadFormDecorator ID="FormDecorator1" runat="server" DecoratedControls="all"

 

 

Skin="WebBlue"></telerik:RadFormDecorator>

 


Now, I already applied CSSClass to my textbox but its not applying as I have formDecorator on my page as above.
So How do I exclude specific controls from FormDecorator to apply my own CSS?

Thanks in advance

Emanuele
Top achievements
Rank 2
 answered on 02 May 2011
1 answer
81 views
Hi,
I have a combobox that shows data in columns which are template column with Link buttons. It also has a linkbutton in header.
Linkbutton in header needs to be made visible when the user types in some text.
The combobox shows "Recently viewed records" and when the user types in some text i rebind the combobox with a master data
which is a different collection from the recently viewed items so i clear out the prevoius items and bind matching records from the
typed text from the master recordset.
Each of my record has a menu that has dynamic data as per the record based on a relationship.
When i rebind the data when user types a text i get an error saying "Script control &#39;menuClients&#39; is not a registered script control. Script controls must be registered using RegisterScriptControl() before calling RegisterScriptDescriptors().Parameter name: scriptControl"
also am not able to make the linkbutton in header visible when user types the radcombo textbox.
One of the fixes I found was to make “RegisterWithScriptManager = ‘false’” but then the menu’s clientside events are lost (as in it doesn’t show the menu item list on hover).
Would really appreciate a response.

Thanks,
Sudhir.
Kalina
Telerik team
 answered on 02 May 2011
2 answers
49 views
Hi,
i have a code in page_load like that

Dim scriptstring As String = "radalert('test', 300, 125, 'header test');"
RadAjaxPanel1.ResponseScripts.Add(scriptstring)



it works with IE8 and IE7, but not work with IE9. How can i fix this.

Thanks


Mehmet Tirgil
Top achievements
Rank 1
 answered on 02 May 2011
3 answers
239 views
Hello,

  I am on Q2 2010 SP2, How can i improve the performance of my RadGrid, it has just 75 rows but it takes close to 7 seconds when i navigate between pages each of size 25, Is there a way to improve this latency? I am using filtering and sorting. Here is a sample of my grid declaration.

Lot of the help i got from previous posts don't work for filtering and sorting option. Any help is greatly appreciated.

Thanks,
Kavitha
<telerik:radgrid id="RadGrid1" width="100%" allowfilteringbycolumn="true" showstatusbar="true"
           allowsorting="True" allowpaging="True" pagesize="100" runat="server" autogeneratecolumns="False"
           enablelinqexpressions="false" onitemcommand="RadGrid1_ItemCommand" onneeddatasource="RadGrid1_NeedDataSource"
           allowmultirowselection="true" OnPreRender="RadGrid1_PreRender" OnItemDataBound="RadGrid1_ItemDataBound">
           <PagerStyle Mode="NextPrevAndNumeric" Position="Top" AlwaysVisible="true" />
           <mastertableview datakeynames="WorkOrderID" clientdatakeynames="WorkOrderID">
           <CommandItemSettings ShowAddNewRecordButton="false" />
               <Columns>
                   <telerik:GridClientSelectColumn UniqueName="ClientSelectColumn" HeaderStyle-Width="50px">
                   </telerik:GridClientSelectColumn>
                   <telerik:GridBoundColumn UniqueName="WorkOrderID" DataField="WorkOrderID" HeaderText="Work Order ID">
                       <FilterTemplate>
                           Clear filters
                           <asp:ImageButton ID="btnShowAll" runat="server" ImageUrl="~/Img/filterCancel.gif"
                               AlternateText="Show All" ToolTip="Show All" OnClick="btnShowAll_Click" Style="vertical-align: middle" />
                       </FilterTemplate>
                   </telerik:GridBoundColumn>
                   <telerik:GridBoundColumn UniqueName="DateAdded" DataField="DateAdded" HeaderText="Date Added"
                       DataFormatString="{0:d}" HeaderStyle-Width="90px">
                       <FilterTemplate>
                           <telerik:RadComboBox ID="RadComboDateAdded" DataTextField="DateAdded" DataValueField="DateAdded"
                               Height="200px" AppendDataBoundItems="true" SelectedValue='<%# ((GridItem)Container).OwnerTableView.GetColumn("DateAdded").CurrentFilterValue %>'
                               runat="server" OnClientSelectedIndexChanged="DateAddedIndexChanged" OnLoad="RadComboBoxDateAdded_OnLoad">
                               <Items>
                                   <telerik:RadComboBoxItem Text="All" Selected="true" />
                               </Items>
                           </telerik:RadComboBox>
                           <telerik:RadScriptBlock ID="RadScriptBlock5" runat="server">
                               <script type="text/javascript">
                                   function DateAddedIndexChanged(sender, args) {
                                       var tableView = $find("<%# ((GridItem)Container).OwnerTableView.ClientID %>");
                                       tableView.filter("DateAdded", args.get_item().get_value(), "EqualTo");
                                   }
                               </script>
                           </telerik:RadScriptBlock>
                       </FilterTemplate>
                   </telerik:GridBoundColumn>
                   <telerik:GridBoundColumn UniqueName="DateUpdated" DataField="DateUpdated" HeaderText="Updated Date"
                       DataFormatString="{0:d}" HeaderStyle-Width="90px">
                       <FilterTemplate>
                           <telerik:RadComboBox ID="RadComboDateUpdated" DataTextField="DateUpdated" DataValueField="DateUpdated"
                               Height="200px" AppendDataBoundItems="true" SelectedValue='<%# ((GridItem)Container).OwnerTableView.GetColumn("DateUpdated").CurrentFilterValue %>'
                               runat="server" OnClientSelectedIndexChanged="DateUpdatedIndexChanged" OnLoad="RadComboBoxDateUpdated_OnLoad" OnItemDataBound="RadComboDateUpdated_ItemDataBound">
                               <Items>
                                   <telerik:RadComboBoxItem Text="All" Selected="true" />
                               </Items>
                           </telerik:RadComboBox>
                           <telerik:RadScriptBlock ID="RadScriptBlock6" runat="server">
                               <script type="text/javascript">
                                   function DateUpdatedIndexChanged(sender, args) {
                                       var tableView = $find("<%# ((GridItem)Container).OwnerTableView.ClientID %>");
                                       tableView.filter("DateUpdated", args.get_item().get_value(), "EqualTo");
                                   }
                               </script>
                           </telerik:RadScriptBlock>
                       </FilterTemplate>
                   </telerik:GridBoundColumn>
                   <telerik:GridBoundColumn UniqueName="Status" DataField="Status" HeaderText="Status"
                       HeaderStyle-Width="200px">
                       <FilterTemplate>
                           <telerik:RadComboBox ID="RadComboBoxStatus" DataTextField="Status" DataValueField="Status"
                               Height="200px" AppendDataBoundItems="true" SelectedValue='<%# ((GridItem)Container).OwnerTableView.GetColumn("Status").CurrentFilterValue %>'
                               runat="server" OnClientSelectedIndexChanged="StatusIndexChanged" OnLoad="RadComboBoxStatus_OnLoad" OnItemDataBound="RadComboStatus_ItemDataBound">
                               <Items>
                                   <telerik:RadComboBoxItem Text="All" Selected="true" />
                               </Items>
                           </telerik:RadComboBox>
                           <telerik:RadScriptBlock ID="RadScriptBlock2" runat="server">
                               <script type="text/javascript">
                                   function StatusIndexChanged(sender, args) {
                                       var tableView = $find("<%# ((GridItem)Container).OwnerTableView.ClientID %>");
                                       tableView.filter("Status", args.get_item().get_value(), "EqualTo");
                                   }
                               </script>
                           </telerik:RadScriptBlock>
                       </FilterTemplate>
                   </telerik:GridBoundColumn>
                   <telerik:GridBoundColumn UniqueName="Category" DataField="Category" HeaderText="Category"
                       HeaderStyle-Width="200px">
                       <FilterTemplate>
                           <telerik:RadComboBox ID="RadComboBoxCategory" DataTextField="Category" DataValueField="Category"
                               Height="200px" AppendDataBoundItems="true" SelectedValue='<%# ((GridItem)Container).OwnerTableView.GetColumn("Category").CurrentFilterValue %>'
                               runat="server" OnClientSelectedIndexChanged="CategoryIndexChanged" OnLoad="RadComboBoxCategory_Onload" OnItemDataBound="RadComboCategory_ItemDataBound">
                               <Items>
                                   <telerik:RadComboBoxItem Text="All" />
                               </Items>
                           </telerik:RadComboBox>
                           <telerik:RadScriptBlock ID="RadScriptBlock3" runat="server">
                               <script type="text/javascript">
                                   function CategoryIndexChanged(sender, args) {
                                       var tableView = $find("<%# ((GridItem)Container).OwnerTableView.ClientID %>");
                                       tableView.filter("Category", args.get_item().get_value(), "EqualTo");
                                   }
                               </script>
                           </telerik:RadScriptBlock>
                       </FilterTemplate>
                   </telerik:GridBoundColumn>
                   <telerik:GridBoundColumn UniqueName="Addr1" DataField="Addr1" HeaderText="Street Address"
                       HeaderStyle-Width="100px" AllowFiltering="false">                   
                   </telerik:GridBoundColumn>
                   <telerik:GridBoundColumn UniqueName="City" DataField="City" HeaderText="City"
                       HeaderStyle-Width="100px" AllowFiltering="false">                        
                   </telerik:GridBoundColumn>
                   <telerik:GridBoundColumn UniqueName="State" DataField="State" HeaderText="State"
                       HeaderStyle-Width="100px">
                       <FilterTemplate>
                           <telerik:RadComboBox ID="RadComboBoxState" DataTextField="State" DataValueField="State"
                               Height="200px" AppendDataBoundItems="true" SelectedValue='<%# ((GridItem)Container).OwnerTableView.GetColumn("State").CurrentFilterValue %>'
                               runat="server" OnClientSelectedIndexChanged="StateIndexChanged" OnLoad="RadComboBoxState_OnLoad" Width="50px" OnItemDataBound="RadComboState_ItemDataBound">
                               <Items>
                                   <telerik:RadComboBoxItem Text="All" />
                               </Items>
                           </telerik:RadComboBox>
                           <telerik:RadScriptBlock ID="RadScriptBlock9" runat="server">
                               <script type="text/javascript">
                                   function StateIndexChanged(sender, args) {
                                       var tableView = $find("<%# ((GridItem)Container).OwnerTableView.ClientID %>");
                                       tableView.filter("State", args.get_item().get_value(), "EqualTo");
                                   }
                               </script>
                           </telerik:RadScriptBlock>
                       </FilterTemplate>
                   </telerik:GridBoundColumn>
               </Columns>
           </mastertableview>
           <clientsettings enablerowhoverstyle="true">
               <Selecting AllowRowSelect="True" />
               <ClientEvents OnRowSelected="RadGrid1_RowSelected" OnRowDeselected="RadGrid1_RowDeselected" OnGridCreated="GridCreated" />
           </clientsettings>
       </telerik:radgrid>
Pavlina
Telerik team
 answered on 02 May 2011
1 answer
68 views
Hi,

I need a row in the radgrid to be kept highlighted after the user navigate back to the original page using the pager. By default, if user navigates to a new page after selecting a row, the row will not be highlighted any more after navigating back to the original page. I thought session state might be a way for me to do this, but I failed to do so.

 I am new to telerik and not very familiar with rad controls. Could anyone please help me on how to do this?  Thanks a lot.

Meng
Pavlina
Telerik team
 answered on 02 May 2011
2 answers
93 views
My rad conrol grid is working fine, but one of the user is asking me to put a label right next to the paging icons, the front and previuos icons. Is their any way I can access that area. I need to put a label there that says something about the data that is present in the grid.I could have displayed it in the footer, but he really wants to see the label right next to the navigation buttons.

Any help will be greatly appreciated.
Anjali
Top achievements
Rank 1
 answered on 02 May 2011
9 answers
231 views
Hi everyone,

Please, some light with my problem...

I have a RadGrid (principal) with NestedViewTemplate, in this NestedView I have one RadChar and one RadGrid (slave).

The problem is that when I select one item on main RadGrid (principal) and is showed the RadChart and the RadGrid (slave), the values of RadChart and RadGrid (slave) don´t change anymore. 

I believe that exists a command to force update controls into NestedView, considering the parameters from main RadGrid (principal).

Thanks, best

Daniel
Daniel Aquere
Top achievements
Rank 2
 answered on 02 May 2011
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jay
Top achievements
Rank 3
Bronze
Iron
Iron
yw
Top achievements
Rank 2
Iron
Iron
Stefan
Top achievements
Rank 2
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jay
Top achievements
Rank 3
Bronze
Iron
Iron
yw
Top achievements
Rank 2
Iron
Iron
Stefan
Top achievements
Rank 2
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?