Telerik Forums
UI for ASP.NET AJAX Forum
2 answers
138 views
The Excel-Like Radgrid code that given by telerik is very useful. I am using the code excellikegrid-updated.zip in my application. It is working fine for the first set of records.

I am using virtual paging in that Excel-like RadGrid solution. For first page, the records displaying as like excel editable mode and we are able to add/Update data in those cells. But when we go to second page using pagination it throws an exception follows. 
"Specified argument was out of the range of valid values.
Parameter name: index".

at the line   "TextBox textBox = (item[column.UniqueName].Controls[0]) as TextBox;"    Inside pre-render event of RadGrid.

At the first time(page load), After "Need Datasource" event, the event "Data Binding" firing and sets all the records in the grid to edit mode.

protected void radGridProducts_DataBinding(object sender, EventArgs e)
   {
       DataTable currentProducts = _presenter.GetCurrentDataTable();
       for (int i = 0; i < currentProducts.Rows.Count; i++)
       //for (int i = 0; i < radGridProducts.VirtualItemCount; i++)
       {
           radGridProducts.EditIndexes.Add(i);
       }
   }

At the time of postback for Next page, after the event "Need Datasource", the "radGridProducts_DataBinding" event is not firing and it goes to pre-render event; no controls in any item of grig and displays the above error message.

I have tried to set all grid items to editable mode in pre-render event iteself as follows.

protected void radGridProducts_PreRender(object sender, EventArgs e)
       {
           //Added for Test purpose
           DataTable currentProducts = _presenter.GetCurrentDataTable();
           for (int i = 0; i < currentProducts.Rows.Count; i++)           
           {
               radGridProducts.EditIndexes.Add(i);
           //Added for Test purpose
           radGridProducts.Attributes.Add("onkeydown", "onKeyDown(this,event);");
           int itemsCount = 0;
           int columnsCount = 0;
           StringBuilder builder = new StringBuilder();
           // Attach the event handlers to the client side events of the TextBoxes. 
           foreach (GridDataItem item in radGridProducts.MasterTableView.Items)
           {
               if (item is GridDataItem)
               {
                   columnsCount = 0;
                   for (int i = 2; i < radGridProducts.MasterTableView.RenderColumns.Length; i++)
                   {
                       GridColumn column = radGridProducts.MasterTableView.RenderColumns[i];
                       //if (item[column.UniqueName].Controls.Count != 0)
                       //{
                           TextBox textBox = (item[column.UniqueName].Controls[0]) as TextBox;
                           if (textBox != null)
                           {
                               textBox.Attributes.Add("ondblclick", "cellDoubleClickFunction('" + textBox.ClientID + "');");
                               textBox.Attributes.Add("onclick", "cellClick('" + textBox.ClientID + "');");
                           }
                           if (i == 2 && !string.IsNullOrEmpty(textBox.Text))
                           {
                               textBox.ReadOnly = true;
                               textBox.Attributes.Add("class", "readOnly");
                           }
                       //}
                       columnsCount++;
                   }
                   itemsCount++;
               }
           }
           RadScriptManager.RegisterStartupScript(Page, Page.GetType(), "init", "colls = " + columnsCount + ";rows=" + itemsCount + ";", true);
                  
       }


But still, it throws the same "Index out of bound" exception while getting the TextBox control. 

Any solution for this Issue? 
Thanks in Advance.
Revathi Panneerselvam
Top achievements
Rank 1
 answered on 01 Oct 2010
3 answers
95 views
We want whether there are some way to implement  the effect that when mouse move up some cell, the cell will become to editable status. just like link:http://dev.sencha.com/deploy/dev/examples/grid/edit-grid.html
when we scan, input only by keyboard,or edit by batch, it is very important. I think rad.edit provide many good function. but the basic input function is lack. whether or not care more about it?
Mira
Telerik team
 answered on 01 Oct 2010
1 answer
130 views
Hi.
I have RadFileExplorer on RadTabStrip/RadMultiPage.
I can upload files, create folders, move files between folders and delete files, but when I try to delete folder, rename it or move it, a Session is ended (I see it in Global.asax file having debugger breakpoint on Session_End event) and a refresh of the grid on RadFileExplorer work constantly.
I have only ViewPaths, UploadPaths, DeletePaths set, and that's all in my file explorer configuration.
Could you pleade advice me how to solve such problem?
Greetings:
Pawel
Fiko
Telerik team
 answered on 01 Oct 2010
1 answer
254 views
<telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1"  runat="server" />
<telerik:RadAjaxManagerProxy ID="AjaxManagerProxy1" runat="server" >
    <AjaxSettings>
        <telerik:AjaxSetting AjaxControlID="RadGrid1">
            <UpdatedControls>
                <telerik:AjaxUpdatedControl ControlID="RadGrid1" LoadingPanelID="RadAjaxLoadingPanel1" />
                <telerik:AjaxUpdatedControl ControlID="txtSelectedValues" LoadingPanelID="RadAjaxLoadingPanel1" />
            </UpdatedControls>
        </telerik:AjaxSetting>
    </AjaxSettings>
</telerik:RadAjaxManagerProxy>

So I have the following setting in a user control.  Now in a master page, I have this control and another control (say control 2).  What I want is to update control 2 when the user control get a select index change event.  I can fire the event and set the control 2 but it does not refresh cause it is not listed in the updatedcontrol.  So my question is.
1) can controls from a master page be added to a list of updated controls in the user control.  If so, how
2) Is there a way to force the update (override the ajax setting) in the master page so that it recognizes the refresh of control 2.

Thanks for any help, suggestions.
Mira
Telerik team
 answered on 01 Oct 2010
0 answers
159 views
Problem: The latest Q2 2010 SP2 release greatly improves RadStyleSheetManager and it now combines style sheets registered after AJAX updates. By implementing this functionality we inadvertently broke the scenario when your page does not have a <head> element. Now all style sheets registered with RSSM fail to load if this element is missing.

Solution: The problem will be fixed in the next internal build (version 2010.2.1001+).

Workaround: Add a <head runat="server"> tag to your page.
Telerik Admin
Top achievements
Rank 1
Iron
 asked on 01 Oct 2010
1 answer
343 views
Hi guys,
I have a RadDatePicker (txtDOB) and it is a mandatory field.
I have used the RFV for txtDOB which validates txtDOB but
I have a search button which searches for the DOB and returns some value.
If I enter 'abcdefg' in txtDOB and click Search button it gives me 
        Nullable object must have a value.

What is the custom validator in Javascript to validate alphabets and invalid input on click of button.
I have seen your demo which did not help me.Here is my code below.......
<li>
         <asp:Label ID="lbDOB" runat="server" Text="Date of Birth: (dd/mm/yyyy)"  
             AssociatedControlID="txtDOB" Height="35px" Width="300px"></asp:Label>         
         <telerik:RadDatePicker ID="txtDOB" runat="server" DateFormat="dd/MM/yyyy" 
             Culture="English (United Kingdom)" Width="125px" MinDate="01/01/1950 00:00:00" 
                         
         </telerik:RadDatePicker>             
       <asp:Button ID="btnSearch" runat="server" CausesValidation="true" 
           Text="Search" onclick="btnSearch_Click" />  
            <asp:RequiredFieldValidator ID="RFV_txtDOB" runat="server" 
             ControlToValidate="txtDOB" ErrorMessage="Please enter DOB" 
             ValidationGroup="DateValidate" Font-Size="Large" SetFocusOnError="true" Display="dynamic">*</asp:RequiredFieldValidator>          
          
    </li>
.
Please help me.
S
Princy
Top achievements
Rank 2
 answered on 01 Oct 2010
8 answers
200 views
Hi ,
           I am using telerik rad grid in my  Application .The main motive for using the radgrid is to implement the drag and drop row functionality , which is working great . My issue is i have given different colors to the rows on the grids  item data bound event based on some conditions , so when i select a row the color i have given to the row is over ridden by the default color of grid(when we select a row). That breaks my design because the new color doesn't completely overlaps the row it ,   i will attach a screen shot so that u can see( it looks very odd) . in screen shot the row color red which i have given is not completely over lapped by the default color of row select .

Either it must completely over lap or the color should not change . please advise 

Regards,
Sankardeep V
Associate Software Engineer
Digital Mesh Softech India (P) Limited
sankardeep v
Top achievements
Rank 1
 answered on 01 Oct 2010
1 answer
67 views
Hi Friends!!!!
I am using RadGrid and using EditFormSetting for addition and updation i have a radcombobox in editformsetting when user click on add new link besides radcombobox i open pop to add some values in radcombobox, however when user click on edit he should get the selected values of radcombobox which he wants to update, so problem is that i am not able to get the selected values of radcombobox in editformsetting which i will pass to popup window thruogh query string for update.

How can i achieve this, please help ASAP.
Thanks In Advance.

Manoj Gupta 
Shinu
Top achievements
Rank 2
 answered on 01 Oct 2010
3 answers
127 views
For the RadEditor in MOSS, is there any configuration or parameters to adjust the default display font size color when users switch to the HTML Editor?
Stanimir
Telerik team
 answered on 01 Oct 2010
3 answers
260 views
How can I use a radtextbox with an attribute of uppercase in all of the keyboards inputs?
Daniel
Telerik team
 answered on 01 Oct 2010
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
Andrey
Top achievements
Rank 1
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
Andrey
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?