Telerik Forums
UI for ASP.NET AJAX Forum
4 answers
220 views
Hello,

We are getting the following error on a page where we have a RadDatePicker on the form during postback. I am wondering if this has something to do with differences in locale between the user and the browser but am not sure. Has anyone encountered this before?

Thanks,
Eric

--------------------------------------------

Ticks must be between DateTime.MinValue.Ticks and DateTime.MaxValue.Ticks.
Parameter name: ticks
   at System.DateTime..ctor(Int64 ticks, DateTimeKind kind)
   at System.Web.Script.Serialization.JavaScriptObjectDeserializer.DeserializeStringIntoDateTime()
   at System.Web.Script.Serialization.JavaScriptObjectDeserializer.DeserializeInternal(Int32 depth)
   at System.Web.Script.Serialization.JavaScriptObjectDeserializer.DeserializeDictionary(Int32 depth)
   at System.Web.Script.Serialization.JavaScriptObjectDeserializer.DeserializeInternal(Int32 depth)
   at System.Web.Script.Serialization.JavaScriptObjectDeserializer.BasicDeserialize(String input, Int32 depthLimit, JavaScriptSerializer serializer)
   at System.Web.Script.Serialization.JavaScriptSerializer.Deserialize(JavaScriptSerializer serializer, String input, Type type, Int32 depthLimit)
   at System.Web.Script.Serialization.JavaScriptSerializer.DeserializeObject(String input)
   at Telerik.Web.UI.RadWebControl.LoadPostData(String postDataKey, NameValueCollection postCollection)
   at Telerik.Web.UI.RadDatePicker.System.Web.UI.IPostBackDataHandler.LoadPostData(String postDataKey, NameValueCollection postCollection)
   at System.Web.UI.Page.ProcessPostData(NameValueCollection postData, Boolean fBeforeLoad)
   at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
Laku
Top achievements
Rank 1
 answered on 26 Sep 2009
1 answer
46 views
Hi,

I am using the Rad Grid to export the Grid Data in CSV format by using the inbuilt method of RADGrid : radGrid.MasterTableView.ExportToCSV() on a button click.

If the Client Explorer is IE7 it displays three buttons : Open , Save , Cancel . Also the file name is the name that was supplied using the :
RadGrid.ExportSettings.FileName

But if the Client Explorer is IE6 it displays only 2 buttons : Save and Cancel. Moreover the file name is the name of the Code Class Name with .aspx extension. for Ex : clsExportData.aspx.

Any clues what could be the Problem with this behaviour in ie6.

Regards,
Kunal Mittal


Daniel
Telerik team
 answered on 26 Sep 2009
1 answer
87 views
Hi,

I have a RadGrid in which I've setup grouping using GroupLoadMode="Client".  When I group on two fields and the second field has data which is lengthy, occasionally the data is displayed offset in the grid somewhere when the group is collapsed.  Screenshots available here.

Any help is much appreciated!

Debbie
Iana Tsolova
Telerik team
 answered on 26 Sep 2009
1 answer
144 views

Folks,

I have a   Heirarchical Grid (MasterTableView  and  DetailTables both uses FormTemplate). Is it possible while I am in DetailTable Edit/Insert mode, populate a label named (MasterTableUserFullName) in DetailTable with the Last+FirstName column values from MasterTableView?

In my RadGrid1_ItemDatabound event, I am able to populate that label (MasterTableUserFullName) with a string “Hellow World” but unsucessful to populate it with MasterTableView Last+FirstName Values.

Below is my code. Any help will be appreciated.

Thanks

protected void RadGrid1_ItemDataBound(object sender, GridItemEventArgs e)

        {

 

            if ((e.Item is GridEditableItem && e.Item.IsInEditMode))

            {

                GridDataItem parentItem = e.Item.OwnerTableView.ParentItem as GridDataItem;

                if (parentItem != null)

                {

                    GridEditableItem item = (GridEditableItem)e.Item;

 

                                     

                    Label txt = (Label)item.FindControl("MasterTableUserFullName");

 

                    txt.Text =  "Hellow World"; // This Works ...

                                      // but need to update the label Box with MasterTableView Last + First Name Values.

                   

                }

 

            }

      }

 

 _____________________________

 

<telerik:RadGrid ID="RadGrid1" runat="server" AllowAutomatic Inserts/Deletes/Updatess ="True" onitemdatabound="RadGrid1_ItemDataBound">           

      

<MasterTableView datakeynames="UserTablePrimaryKey" datasourceid="SqlDataSource1"  AllowFilteringByColumn = "true" CommandItemDisplay="TopAndBottom">

   

<!—Beginning Block of Child DetailTable -->

<DetailTables>

        <telerik:GridTableView runat="server" DataSourceID="SqlDataSource2" DataKeyNames="UserLocationsPrimaryKey"

                Width="100%"  CommandItemDisplay= "TopAndBottom" Name = "Detail" AllowAutomatic Inserts/Deletes/Updates ="True">

                <ParentTableRelation>

                <telerik:GridRelationFields DetailKeyField="UserTableForeignKey" MasterKeyField="UserTablePrimaryKey" /> </ParentTableRelation>

                

 <Columns>

        <telerik:GridBoundColumn DataField="UserTableForeignKey" 

            DataType="System.Int32" HeaderText="UserTableForeignKey"

            SortExpression="UserTableForeignKey" UniqueName="UserTableForeignKey"

                    Display="False" ReadOnly="True" Visible="False">

        </telerik:GridBoundColumn>

        <telerik:GridBoundColumn DataField="Program" HeaderText="Program" HeaderStyle-Width="50%"

            SortExpression="Program" UniqueName="Program" >

<HeaderStyle Width="50%"></HeaderStyle>

        </telerik:GridBoundColumn>

             .

             .

             .

 

    </Columns>

   

   <EditFormSettings EditFormType="Template">

<EditColumn UniqueName="EditCommandColumn1"></EditColumn>

    <FormTemplate>

    <table id="Table1" cellspacing="2" cellpadding="1" width="100%" border="0" rules="none"

                            style="border-collapse: collapse; background: white;">

                            <tr>

                                <td colspan="2" style="font-size:small;  z-index:0;  font-family:Bookman Old Style; color:#669999">

                                <asp:Label ID="MasterTableUserFullName"  runat="server" Text="User Location" Font-Underline="True"> 

               </asp:Label> 

                                  </td>

                            </tr>

             .

             .

             .

                     

   </table>

   

    </FormTemplate>

    </EditFormSettings>

   

        </telerik:GridTableView>

       

    </DetailTables>

 

<!—Ending Block of Child DetailTable -->

 

<!—Beginning Block of MasterTableView -->

 

    <Columns>

        <telerik:GridBoundColumn DataField="UserTablePrimaryKey"

            DataType="System.Int32" HeaderText="UserTablePrimaryKey" ReadOnly="True"

            SortExpression="UserTablePrimaryKey" UniqueName="UserTablePrimaryKey"

            Visible="False">

        </telerik:GridBoundColumn>

       

        <telerik:GridBoundColumn DataField="Last_Name" HeaderText="Last Name"

            SortExpression="Last_Name" UniqueName="Last_Name">

            <HeaderStyle Width="18%" />

            <ItemStyle Width="18%" />

        </telerik:GridBoundColumn>

        <telerik:GridBoundColumn DataField="First_Name" HeaderText="First Name"

            SortExpression="First_Name" UniqueName="First_Name">

            <HeaderStyle Width="18%" />

            <ItemStyle Width="18%" />

        </telerik:GridBoundColumn>

             

    </Columns>

    <EditFormSettings EditFormType="Template">

    <FormTemplate>

   

    <table id="Table2">

                                       

       <tr>

         <td>

           Last Name</td>

         <td>

          <asp:TextBox ID="TxtLast_Name" runat="server" Text='<%# Bind( "Last_Name") %>' TabIndex="1"> </asp:TextBox>

                                       

         </td>

                                                

         <td>

         First Name</td>

         <td>

         <asp:TextBox ID="TxtFirst_Name" runat="server" Text='<%# Bind( "First_Name") %>' TabIndex="2"> </asp:TextBox>

         </td>

                    

     </tr>

             .

             .

             .

 

   </table>

   

    </FormTemplate>

    </EditFormSettings>

    .

           .

    .

</MasterTableView>

 

<!— Ending Block  of MasterTableView -->

       

</telerik:RadGrid>

Martin
Telerik team
 answered on 26 Sep 2009
1 answer
76 views
When I place Radcombobox as itemtemplate in radgrid ( 3 columns) and Radgrid has 15 rows.Its taking almost 30 seconds to render the grid.and moreover if  I give AllowPaging="True".The comboboxes are not getting rendered properly.Please suggest.
Martin
Telerik team
 answered on 26 Sep 2009
1 answer
86 views
Basically, I'd like to render the contents of a page to the screen and then start a long running process.  Is it possible for the page to load and after the contents are loaded to the page, do a partial postback with AJAX and have the contents of the page remain on the screen?
Pavlina
Telerik team
 answered on 26 Sep 2009
5 answers
83 views
I am binding a RadContextMenu control to a hierarchical dataset and am having problems with &nbsp; &nbsp; literals appearing at the bottom of the menu. This only happens when the menu is set longer than the list of items. The control is rendering properly in Firefox.

ASPX Code:
<telerik:RadContexMenu ID="RadMenu1" runat="server" /> 
 

Populated as follows
DataSet links = new DataSet();

adapter.Fill(links);
RadMenu1.DataTextField = "TagName";
RadMenu1.DataNavigateUrlField = "";
RadMenu1.DataFieldID = "TagId";
RadMenu1.DataFieldParentID = "TagParentId";
RadMenu1.DataSource = links;
RadMenu1.DataBind();

RadMenu1.ExpandDelay = 1;
RadMenu1.EnableRootItemScroll = false;
RadMenu1.DefaultGroupSettings.Flow = ItemFlow.Vertical;
RadMenu1.DefaultGroupSettings.Height = Unit.Pixel(200);



Note that with only a couple items added to the root level of the menu I will get the '&nbsp;' literals appearing at the end of the menu. If however the list is longer than the control, the control scrolls as desired and no extraneous characters display.
Simon
Telerik team
 answered on 26 Sep 2009
2 answers
294 views
Hi, I'm using a radgrid with a FormTemplate that has many textboxes and a couple of other standard asp.net controls. One of the textboxes is for saving a password, before the insert is sent to the database I'd like to take the password text, hash it up then send the hash to the database (I'm using entity framework for accessing the db).

Problem is I seem to be able to do everything but actually save the record. Below is some of my code but
a) nothing gets to the db and
b) the grid stays in insert mode and the values clean out on clicking the "insert" like

Any any sight would be much appreciated.


<telerik:RadGrid ID="CandidateGrid" runat="server" AutoGenerateColumns="false" DataSourceID="CandidateData"
            AllowFilteringByColumn="true" AllowPaging="true" OnItemCommand="CandidateGrid_Command" OnInsertCommand="CandidateGrid_Insert">
            <PagerStyle Mode="NumericPages" Visible="true" />
            <MasterTableView DataSourceID="CandidateData" DataKeyNames="OptimumUserId" AllowMultiColumnSorting="true"
                GroupLoadMode="Server" AllowAutomaticUpdates="true" AllowAutomaticInserts="true"
                CommandItemDisplay="Top">
                <Columns>
                    <telerik:GridEditCommandColumn ButtonType="ImageButton" EditImageUrl="../Assets/Images/document_edit.png" />
                    <telerik:GridCheckBoxColumn DataField="IsActive" HeaderText="Active" />
                    <telerik:GridBoundColumn DataField="OptimumPayrollId" HeaderText="Payroll Id" />
                    <telerik:GridBoundColumn DataField="FirstName" HeaderText="First Name" />
                    <telerik:GridBoundColumn DataField="Surname" HeaderText="Surname" />
                    <telerik:GridBoundColumn DataField="Email" HeaderText="Email" />
                </Columns>
                <EditFormSettings EditFormType="Template">
                    <FormTemplate>
                        <table>
                            <tr>
                                <td>
                                    Active:
                                </td>
                                <td class="required">
                                    *
                                </td>
                                <td>
                                    <asp:CheckBox ID="ActiveCheckBox" runat="server" Checked='' />
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    Payroll Id:
                                </td>
                                <td class="required">
                                    *
                                </td>
                                <td>
                                    <asp:TextBox ID="PayrollIdTextBox" runat="server" Text='<%# Bind("OptimumPayrollId") %>' />
                                    <asp:RequiredFieldValidator ID="PayrollIdTextBoxValidation" runat="server" ControlToValidate="PayrollIdTextBox"
                                        ErrorMessage="Required" />
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    First Name:
                                </td>
                                <td class="required">
                                    *
                                </td>
                                <td>
                                    <asp:TextBox ID="FirstNameTextBox" runat="server" Text='<%# Bind("FirstName") %>' />
                                    <asp:RequiredFieldValidator ID="FirstNameValidation" runat="server" ControlToValidate="FirstNameTextBox"
                                        ErrorMessage="Required" />
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    Surname:
                                </td>
                                <td class="required">
                                    *
                                </td>
                                <td>
                                    <asp:TextBox ID="SurnameTextBox" runat="server" Text='<%# Bind("Surname") %>' />
                                    <asp:RequiredFieldValidator ID="SurnameValidation" runat="server" ControlToValidate="SurnameTextBox"
                                        ErrorMessage="Required" />
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    Email:
                                </td>
                                <td class="required">
                                    *
                                </td>
                                <td>
                                    <asp:TextBox ID="EmailTextBox" runat="server" Text='<%# Bind("Email") %>' />
                                    <asp:RequiredFieldValidator ID="EmailValidation" runat="server" ControlToValidate="EmailTextBox"
                                        ErrorMessage="Required" />
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    Password:
                                </td>
                                <td class="required">
                                    *
                                </td>
                                <td>
                                    <asp:TextBox ID="PasswordTextBox" runat="server" Text='' />
                                    <asp:RequiredFieldValidator ID="PasswordValidation" runat="server" ControlToValidate="PasswordTextBox"
                                        ErrorMessage="Required" />
                                </td>
                            </tr>
                            <tr>
                                <td colspan="3">
                                    <asp:LinkButton ID="btnUpdate" Text='<%# (Container is GridEditFormInsertItem) ? "Insert" : "Update" %>'
                                        runat="server" CommandName='<%# (Container is GridEditFormInsertItem) ? "PerformInsert" : "Update" %>'>
                                    </asp:LinkButton>&nbsp;
                                    <asp:LinkButton ID="btnCancel" Text="Cancel" runat="server" CausesValidation="False"
                                        CommandName="Cancel"></asp:LinkButton>
                                </td>
                            </tr>
                        </table>
                    </FormTemplate>
                </EditFormSettings>
...
 protected void CandidateGrid_Insert(object source, GridCommandEventArgs e)
    {

        e.Canceled = true;
        ListDictionary newValues = new ListDictionary();

        OptimumProviders.MembershipProvider p = new MembershipProvider();
        GridEditableItem editedItem = e.Item.OwnerTableView.GetInsertItem();

        string password = (editedItem.FindControl("PasswordTextBox") as TextBox).Text;
        bool isActive = (editedItem.FindControl("ActiveCheckBox") as CheckBox).Checked;
        string encodedPassword = p.EncodePassword(password);

        newValues["Password"] = encodedPassword;
        newValues["IsActive"] = isActive;

        e.Item.OwnerTableView.InsertItem(newValues);
    }
Chris
Top achievements
Rank 1
 answered on 26 Sep 2009
1 answer
183 views
I am trying to remove the border and shadhow from the ProgressArea, but I cannot seem to get rid of the styling on .ruShadow.  How would I remove any kind of border and drop shadow from the ProgressArea.  ruShadow is not specificed in the CSS for the Skin so it seems I can only override it on the ProgressTemple, but I keep getting two divs rendered for ruShadow (the one automatically added by the ProgressArea and the one I seem to be adding below).

                                   <ProgressTemplate> 
                                   <div class="ruShadow" style="background: transparent; margin: 0; padding: 0;">  
                                       <div id="radProgressArea_Panel">  
                                            <ul class="ruProgress" style="border-style: none ;border-width: 0; padding-top: 15px;"> 
                                               <li class="ruFilePortion">  
                                                   <div class="ruBar"> 
                                                        <div runat="server" id="PrimaryProgressBarInnerDiv"><!-- --></div> 
                                                    </div> 
                                                    Part:  <span runat="server" id="PrimaryPercent"></span>% (<span runat="server" id="PrimaryValue"></span>) 
                                                    <br /> 
                                                    Total:  <span runat="server" id="PrimaryTotal"></span> 
                                                </li> 
                                                <li class="ruFileCount">     
                                                    <div class="ruBar"> 
                                                        <div runat="server" id="SecondaryProgressBarInnerDiv"><!-- --></div> 
                                                    </div> 
                                                    Part:  <span runat="server" id="SecondaryPercent"></span>% (<span runat="server" id="SecondaryValue"></span>) 
                                                    <br /> 
                                                    Total:  <span runat="server" id="SecondaryTotal"></span> 
                                                </li> 
                                            </ul> 
                                        </div> 
                                    </div> 
                                    </ProgressTemplate> 

Genady Sergeev
Telerik team
 answered on 26 Sep 2009
1 answer
451 views
Hello,

I want to allow an empty value to be selected in my RadComboBox.  I would just add a manual entry and add the AppendDataBoundItems="true" to it, but the thing is I refresh this RadComboBox on the client side too.  So I would like to allow an empty entry, without having to ensure an empty record is there.  Is that possible?  If not, is adding the empty entry the solution?

Thanks.
Peter
Telerik team
 answered on 26 Sep 2009
Narrow your results
Selected tags
Tags
+? more
Top users last month
Tien
Top achievements
Rank 1
Iron
Krasimir
Top achievements
Rank 3
Bronze
Iron
Iron
Cedar
Top achievements
Rank 1
Iron
Emil
Top achievements
Rank 1
Iron
Kyle Watson
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Tien
Top achievements
Rank 1
Iron
Krasimir
Top achievements
Rank 3
Bronze
Iron
Iron
Cedar
Top achievements
Rank 1
Iron
Emil
Top achievements
Rank 1
Iron
Kyle Watson
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?