Telerik Forums
UI for ASP.NET AJAX Forum
2 answers
196 views
I want use grid's multi-row edit, but I find a problem:
1. Set three rows enter in-line edit mode.
2. Change all these three rows values.
3. Save the edit row #1
4. After the edit row #1 saved, the new modified values for the other two edit row #2, #3 are lost.

How to solve this problem?
Liu Peng
Top achievements
Rank 1
 answered on 04 Dec 2009
4 answers
206 views
I am unable to disable radUpload during client-side pageLoad().  What I want to do is during pageLoad() disable the control and then enable after two or more rows in a grid on the page have been selected.

Here is the tag for the radUpload control and pageLoad() function:

<

telerik:RadUpload ID="RadUploadBasicFile" runat="server" Skin="Telerik">

 

 

</telerik:RadUpload>

 

function

pageLoad() {

 

 

var basicUpload = $find('<%=RadUploadBasicFile.ClientID%>');

 

 

if (basicUpload != null)

 

basicUpload.Enabled =

false;

 

}

I did verify that it is hitting the pageLoad() function and the basicUpload.Enabled line.  I also tried the set_enabled() method for the radupload object, but that didn't work either.

Any ideas how I can disable the control client-side.  I did read on another thread that if you disable a control on the server-side that you cannot enable on the client-side.

I am using RadControls for ASP.NET AJAX Q3 2008.

Thanks.

Shrikant Kale
Top achievements
Rank 1
 answered on 04 Dec 2009
2 answers
140 views

I have a server bound grid that allows the user to expand the top level using the keyboard.  every thing works fine except the grid doesn't maintain focus after the ajax call.  I've tried both javascript to set focus to the grid as well as some server side code, but the page alway has focus not the grid. 

here's the code

telerik:RadCodeBlock ID="codeblock1" runat="server" > 
 
  <script type="text/javascript">  
 
          var selectedRow;  
 
          function RowSelected(sender, eventArgs) {  
              selectedRow = eventArgs.get_itemIndexHierarchical();  
          }  
 
         function RowDblClicked(sender, eventArgs) {  
 
             $find("<%= RadGrid1.MasterTableView.ClientID %>").fireCommand("ExpandSelected", eventArgs.get_itemIndexHierarchical());  
         }  
           
 
         function KeyPress(sender, eventArgs, key) {  
             var originalEvent = window.event;  
 
              
             if (originalEvent.ctrlKey) {  
 
                 if (originalEvent.keyCode == 39) {  
       
                     $find("<%= RadGrid1.MasterTableView.ClientID %>").fireCommand("ExpandSelected", selectedRow);  
                       
                       
                 }  
             }  
         }    
           
           
        
           
           
 
       
      </script> 
 
</telerik:RadCodeBlock>          
    <telerik:RadGrid ID="RadGrid1" DataSourceID="SessionDataSource1" runat="server" ShowStatusBar="True" 
        AutoGenerateColumns="False" PageSize="3" AllowSorting="True" AllowPaging="True" 
        AllowMultiRowEdit="True" GridLines="None" Skin="Web20" > 
        <ClientSettings AllowKeyboardNavigation="True"   > 
                    <ClientEvents  OnRowDblClick="RowDblClicked" OnKeyPress="KeyPress"   
                        OnRowSelected="RowSelected"      /> 
                     <Scrolling AllowScroll="true" UseStaticHeaders="true" /> 
                     <Selecting AllowRowSelect="True" /> 
                     <KeyboardNavigationSettings FocusKey="G" /> 
                 </ClientSettings>    
        <pagerstyle mode="NumericPages"></pagerstyle> 
        <mastertableview datasourceid="SessionDataSource1" datakeynames="CustomerID" allowmulticolumnsorting="True" 
            width="100%" commanditemdisplay="Top" name="Customers" allowautomaticupdates="true" EditMode="InPlace"   
            allowautomaticinserts="true" allowautomaticdeletes="true">  
              
            <DetailTables> 
              
                <telerik:GridTableView DataKeyNames="OrderID" DataSourceID="SessionDataSource2" Width="100%" 
                    runat="server" CommandItemDisplay="Top" Name="Orders"  AllowPaging="false" EditMode="InPlace"   > 
                     
                    <ParentTableRelation> 
                        <telerik:GridRelationFields DetailKeyField="CustomerID" MasterKeyField="CustomerID" /> 
                    </ParentTableRelation> 
                      
                    <DetailTables  > 
                      
                      
                        <telerik:GridTableView DataKeyNames="OrderID,ProductID" DataSourceID="SessionDataSource3" 
                            Width="100%" runat="server" CommandItemDisplay="Top" Name="Details"  EditMode="InPlace" 
                            AllowPaging="false" >    
                                                  
                            
                            <ParentTableRelation> 
                                <telerik:GridRelationFields DetailKeyField="OrderID" MasterKeyField="OrderID" /> 
                            </ParentTableRelation> 
                              
                            <Columns > 
                                <telerik:GridEditCommandColumn ButtonType="ImageButton" UniqueName="EditCommandColumn1" > 
                                    <HeaderStyle Width="20px" /> 
                                    <ItemStyle CssClass="MyImageButton"  /> 
                                </telerik:GridEditCommandColumn> 
                                <telerik:GridBoundColumn SortExpression="OrderID" HeaderText="OrderID" HeaderButtonType="TextButton" 
                                    DataField="OrderID" UniqueName="OrderID" ReadOnly="true" Visible="false">  
                                </telerik:GridBoundColumn> 
                                <telerik:GridBoundColumn SortExpression="UnitPrice" HeaderText="Unit Price" HeaderButtonType="TextButton" 
                                    DataField="UnitPrice" UniqueName="UnitPrice">  
                                </telerik:GridBoundColumn> 
                                <telerik:GridBoundColumn SortExpression="Quantity" HeaderText="Quantity" HeaderButtonType="TextButton" 
                                    DataField="Quantity" UniqueName="Quantity">  
                                </telerik:GridBoundColumn> 
                                <telerik:GridBoundColumn SortExpression="Discount" HeaderText="Discount" HeaderButtonType="TextButton" 
                                    DataField="Discount" UniqueName="Discount">  
                                </telerik:GridBoundColumn> 
                                <telerik:GridButtonColumn ConfirmText="Delete this product?" ButtonType="ImageButton" 
                                    CommandName="Delete" Text="Delete" UniqueName="DeleteColumn1">  
                                    <HeaderStyle Width="20px" /> 
                                    <ItemStyle HorizontalAlign="Center" CssClass="MyImageButton" /> 
                                </telerik:GridButtonColumn> 
                            </Columns> 
                              
                            <SortExpressions> 
                                <telerik:GridSortExpression FieldName="Quantity" SortOrder="Descending"></telerik:GridSortExpression> 
                            </SortExpressions> 
                              
                            <EditFormSettings EditFormType="Template"  > 
                               
                            <FormTemplate > 
                              
                                    <asp:Panel ID="pnlEdit" runat="server" BackColor="DimGray"   > 
                                      
                                        <telerik:RadTextBox ID="tbox1" runat="server"  ></telerik:RadTextBox> 
                                        <telerik:RadTextBox ID="tbox2" runat="server"  ></telerik:RadTextBox> 
                                        <telerik:RadTextBox ID="tbox3" runat="server"  ></telerik:RadTextBox> 
                                      
                                    </asp:Panel> 
                                      
                            </FormTemplate>   
                              
                            </EditFormSettings>   
                        </telerik:GridTableView> 
                          
                          
                    </DetailTables> 
                    <ExpandCollapseColumn Visible="True">  
                    </ExpandCollapseColumn> 
                    <Columns> 
                        <telerik:GridEditCommandColumn ButtonType="ImageButton" UniqueName="EditCommandColumn2">  
                            <HeaderStyle Width="20px" /> 
                            <ItemStyle CssClass="MyImageButton" /> 
                        </telerik:GridEditCommandColumn> 
                        <telerik:GridBoundColumn SortExpression="OrderID" HeaderText="OrderID" HeaderButtonType="TextButton" 
                            DataField="OrderID" UniqueName="OrderID" ReadOnly="true">  
                        </telerik:GridBoundColumn> 
                        <telerik:GridBoundColumn SortExpression="OrderDate" HeaderText="Date Ordered" HeaderButtonType="TextButton" 
                            DataField="OrderDate" UniqueName="OrderDate">  
                        </telerik:GridBoundColumn> 
                        <telerik:GridBoundColumn SortExpression="RequiredDate" HeaderText="RequiredDate" 
                            HeaderButtonType="TextButton" DataField="RequiredDate" UniqueName="RequiredDate">  
                        </telerik:GridBoundColumn> 
                        <telerik:GridBoundColumn SortExpression="EmployeeID" HeaderText="EmployeeID" HeaderButtonType="TextButton" 
                            DataField="EmployeeID" UniqueName="EmployeeID">  
                        </telerik:GridBoundColumn> 
                        <telerik:GridButtonColumn ConfirmText="Delete these details record?" ButtonType="ImageButton" 
                            CommandName="Delete" Text="Delete" UniqueName="DeleteColumn2">  
                            <HeaderStyle Width="20px" /> 
                            <ItemStyle HorizontalAlign="Center" CssClass="MyImageButton" /> 
                        </telerik:GridButtonColumn> 
                    </Columns> 
                    <SortExpressions> 
                        <telerik:GridSortExpression FieldName="OrderDate"></telerik:GridSortExpression> 
                    </SortExpressions> 
                </telerik:GridTableView> 
            </DetailTables> 
              
              
            <ExpandCollapseColumn Visible="True">  
            </ExpandCollapseColumn> 
              
              
            <Columns> 
                <telerik:GridEditCommandColumn ButtonType="ImageButton" UniqueName="EditCommandColumn">  
                    <HeaderStyle Width="20px" /> 
                    <ItemStyle CssClass="MyImageButton" /> 
                </telerik:GridEditCommandColumn> 
                <telerik:GridBoundColumn SortExpression="CustomerID" HeaderText="CustomerID" HeaderButtonType="TextButton" 
                    DataField="CustomerID" UniqueName="CustomerID" ReadOnly="true">  
                </telerik:GridBoundColumn> 
                <telerik:GridBoundColumn SortExpression="ContactName" HeaderText="Contact Name" HeaderButtonType="TextButton" 
                    DataField="ContactName" UniqueName="ContactName">  
                </telerik:GridBoundColumn> 
                <telerik:GridBoundColumn SortExpression="CompanyName" HeaderText="Company" HeaderButtonType="TextButton" 
                    DataField="CompanyName" UniqueName="CompanyName">  
                </telerik:GridBoundColumn> 
                <telerik:GridBoundColumn SortExpression="Address" HeaderText="Address" HeaderButtonType="TextButton" 
                    DataField="Address" UniqueName="Address">  
                </telerik:GridBoundColumn> 
                <telerik:GridButtonColumn ConfirmText="Delete this customer?" ButtonType="ImageButton" 
                    CommandName="Delete" Text="Delete" UniqueName="DeleteColumn">  
                    <HeaderStyle Width="20px" /> 
                    <ItemStyle HorizontalAlign="Center" CssClass="MyImageButton" /> 
                </telerik:GridButtonColumn> 
            </Columns>   
              
            <SortExpressions> 
                <telerik:GridSortExpression FieldName="CompanyName"></telerik:GridSortExpression> 
            </SortExpressions> 
              
            <EditFormSettings> 
                <EditColumn UniqueName="EditCommandColumn1">  
                </EditColumn> 
            </EditFormSettings> 
              
        </mastertableview> 
    </telerik:RadGrid> 
      
        <!-- content start --> 
        <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">  
            <AjaxSettings> 
                <telerik:AjaxSetting AjaxControlID="RadGrid1">  
                    <UpdatedControls> 
                        <telerik:AjaxUpdatedControl ControlID="RadGrid1" /> 
                        <telerik:AjaxUpdatedControl ControlID="RadAjaxPanel1" /> 
                    </UpdatedControls> 
                </telerik:AjaxSetting> 
            </AjaxSettings> 
        </telerik:RadAjaxManager> 


        If e.CommandName = "ExpandSelected" Then 
 
            If IsNumeric(e.CommandArgument) Then 
                Dim otv As GridTableView = CType(e.Item.OwnerTableView, GridTableView)  
 
                otv.Items(CInt(e.CommandArgument)).Expanded = True 
 
            End If 
 
        End If 



Due to the amount of data that being pulled the grid needs to pull the detail records on demand.   But there is a MAJOR push to do as much with the keyboard as possible.  Everything works great, I just need to set focus after the grid is expanded using the keyboard.

Thanks,
matchbx
Matthew Johnson
Top achievements
Rank 1
 answered on 04 Dec 2009
8 answers
162 views
Hello
I have a Grid with many gridboundcolumn. When one of the cell doesn,t contain data, it taking off the line around the cell...how can I work around this problem?
Thanks in advance
Jason Lee
Top achievements
Rank 1
 answered on 04 Dec 2009
1 answer
160 views
Hi, When I upload a specified file, I would like to display a page count next to the each upload document in the list. Is there a way to get the page count for the byte array document attached to the telerik uploader??

I have a filter to attach only specified files like word and pdf. any suggestions???


so it should be something like

file1.doc (4 pages)
file2.pdf (3 pages)

or total attached files pages count = 7. in the footer area??

much appreciated, thank you.
Vijay
Schlurk
Top achievements
Rank 2
 answered on 03 Dec 2009
2 answers
140 views

The Below Aspx Code produces unwanted scrollbars horizontal and vertical with  RadControls for ASP.NET AJAX Q2 2009 in IE7
Whereas works fine in IE6
Is there any solution for this.

                              
<telerik:RadDock runat="server" ID="RadDock1" EnableDrag="false"   DefaultCommands="ExpandCollapse" Skin="Web20"  Title="List of Email Addresses" Width="99%"
                                <ContentTemplate> 
                                    <telerik:RadGrid ID="Grid1" runat="server"  EnableClientScript="False" AutoPostBack="false" CausesValidation="false"  AllowMultiRowSelection="false" AutoGenerateColumns="False" GridLines="None" Skin="Office2007" Width="100%"  > 
                                                <MasterTableView DataKeyNames="Address,AStatus,IStatus,IsOk" TableLayout="Auto">                                                                                                     
                                                    <Columns> 
                                                        <telerik:GridTemplateColumn UniqueName="TemplateColumn" ItemStyle-Width="5%"
                                                            <ItemStyle HorizontalAlign="Center" /> 
                                                            <ItemTemplate> 
                                                                <asp:CheckBox runat="server" ID="ChkBox1" AutoPostBack="false" CausesValidation="false" EnableClientScript="False" /> 
                                                            </ItemTemplate> 
                                                        </telerik:GridTemplateColumn> 
                                                        <telerik:GridBoundColumn DataField="Address" HeaderText="Address" ItemStyle-Width="30%" ></telerik:GridBoundColumn>   
                                                        <telerik:GridBoundColumn DataField="AStatus" HeaderText="A Status" ItemStyle-Width="20%" ></telerik:GridBoundColumn>   
                                                        <telerik:GridBoundColumn DataField="IStatus" HeaderText="I Status" ItemStyle-Width="10%" ></telerik:GridBoundColumn> 
                                                        <telerik:GridBoundColumn DataField="IsOk" HeaderText="IsOk" ItemStyle-Width="10%" ></telerik:GridBoundColumn>  
                                                    </Columns> 
                                                </MasterTableView> 
                                                <AlternatingItemStyle BackColor="#EFF3FB" /> 
                                                <HeaderContextMenu  Skin="Office2007"
                                                    <CollapseAnimation Duration="200" Type="OutQuint" /> 
                                                </HeaderContextMenu> 
                                                <FilterMenu  Skin="Office2007"
                                                    <CollapseAnimation Duration="200" Type="OutQuint" /> 
                                                </FilterMenu>                                                                              
                                                <ClientSettings EnablePostBackOnRowClick="false"
                                                    <Selecting AllowRowSelect="false" />                                                                                                   
                                                </ClientSettings> 
                                        </telerik:RadGrid> 
                                    </ContentTemplate> 
                               </telerik:RadDock> 


you
Top achievements
Rank 1
 answered on 03 Dec 2009
6 answers
2.1K+ views
Hi,

I am using rad grid, how can I hide or unhide columns.
I have made the AllowColumnHide to true.

Regards
Sudheep
Daniel
Telerik team
 answered on 03 Dec 2009
1 answer
135 views
Hi,
Is Webservice or wcf databinding possible on clientside?
Or should I look for a jquery chart?
Thanks.
Schlurk
Top achievements
Rank 2
 answered on 03 Dec 2009
1 answer
117 views
Dear Sirs,

i need to reduce the space between treeview row, i try to reduce the font size but nothing happen.
How can i solve?
Many thanks
Schlurk
Top achievements
Rank 2
 answered on 03 Dec 2009
2 answers
113 views
I have a RadGrid that is enabled for client events like RowClick, RowDblClick and RowDrop. None of these events work when the user clicks on a column that has an image in it. I was able to get rowclick and rowdblclick events work by wiring up oncolumnclick and oncloumndblclick events for the image column. However I was not able to achieve OnRowDrop functionality for image column. Is there any work around for this issue?
Ramya
Top achievements
Rank 1
 answered on 03 Dec 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?