Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
88 views
Hi,

I have a rad grid with some records.

When I collapse a record for edit and click on submit button a java script function is called. I need to get the all field values of this row in java script. Please help me on how can I get all values of current record in java script.

Thanks.
Shinu
Top achievements
Rank 2
 answered on 12 Aug 2011
1 answer
119 views

I set the AlwaysVisible property on the MasterTableView, but I also set the Position to be Top and Bottom. When the PageSize is greater than the record count and there is only 1 page of data (PageSize is 10, but 4 records are returned) the pager only displays at the bottom. I would like the Pager to either display top and bottom OR allow for the section where the pager resides to be available to the user to display page count and record count (4 records).

How can I provide this? It seems like "something is missing" when the pager doesnt display in with records less than the page size.

Thanks,
Shinu
Top achievements
Rank 2
 answered on 12 Aug 2011
1 answer
376 views

Hello.

In order to familiarize with the RadGrid component, I have created a small application whose grid is populated by a web service.

Default.aspx

<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="WebApplication1._Default" %>
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  
<head runat="server">
    <title></title>
</head>
<body>
    <form id="form1" runat="server">
        <telerik:RadScriptManager ID="RadScriptManager1" runat="server">
        </telerik:RadScriptManager>
  
        <telerik:RadGrid ID="RadGrid1" runat="server">
            <MasterTableView>
                <Columns>
                    <telerik:GridBoundColumn DataField="ID" HeaderText="ID" DataType="System.Int32" />
                    <telerik:GridBoundColumn DataField="Name" HeaderText="Name" DataType="System.String" />
                </Columns>
            </MasterTableView>
            <ClientSettings>
                <DataBinding Location="WebService.cs" SelectMethod="RetrieveRows" />
            </ClientSettings>
        </telerik:RadGrid>
    </form>   
</body>
</html>

WebService.cs:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.ServiceModel;
using Telerik.Web.UI;
  
namespace WebApplication1
{
    [ServiceContract(Namespace = "")]
    [System.Web.Script.Services.ScriptService]
    public class WebService
    {
        public WebService () 
        {
        }
   
        [OperationContract]
        public Dictionary<string, object> RetrieveRows(int startRowIndex, int maximumRows, List<GridSortExpression> sortExpression, List<GridFilterExpression> filterExpression)
        {
            Dictionary<string, object> dictionary = new Dictionary<string, object>();
            dictionary.Add("Data", new[] { new { ID = 1234, Name = "Test" }});
            dictionary.Add("Count", 1);
            return dictionary;
        }
    }
}

The compilation was successful, but the following error message was displayed at runtime by the built-in script debugger of Internet Explorer:
Line: 6563
Error: Sys.ArgumentException: Cannot deserialize empty string.
Parameter name: data

I would appreciate whether some assistance could be provided to solve this problem.

Last but not least:
a) I was wondering how the application could be implemented using a server-side binding solution.
b) What is Telerik's recommendation in regard to client versus server-side binding implementations using a web service?

Thank you in advance.
Paulo

Shinu
Top achievements
Rank 2
 answered on 12 Aug 2011
5 answers
167 views
hi,
plz give me a sample for manually insert update delete in rad-grid with using session for row by row user entry.
save data on final submit button.
i am creating row dynamically on click of newrow button user make entry then again for new row untill last entry.
so plz give me any sample code related to such example where user first make all entry and store in session variable
and at last on submit button save all value in database here i am using 3 tables.
thanks
Shinu
Top achievements
Rank 2
 answered on 12 Aug 2011
2 answers
90 views
Hi,

I have a RadTreeView inside a RadComboBox which in turn is inside a UpdatePanel.
Data is loaded in a heirarchical manner.

It works fine. But I get a "stack overflow at line:2086" error randomly from
the WebResource.xsd file.

I am not sure what is the cause of this error.
Does anyone has any inputs on this.

Thanks
Steven
Top achievements
Rank 1
 answered on 11 Aug 2011
1 answer
131 views
I have been searching all over for an answer to this but to no avail... I am hoping someone here can help me.
I have a form that is intended to send field information to a support email address. I have disabled validation on all of the controls on this form to troubleshoot this.
When i fill the form out and click submit, it works fine, i get my Email as expected...

However, if i have special characters in any of the radtextbox fields, i get a validation error. Just the simple phrase <ValidateThis> will break the page.

Now i have created a routine to clean the text and replace the characters which ascii equivalents but the problem is that the validation error occurs before anything is run. How do i intercept this?

Thanks
Phil
Pavlina
Telerik team
 answered on 11 Aug 2011
2 answers
153 views
i have allot of Charts in My Dashboard and all of them are working fine some with DataGroupColumn  and some without

but i have problem with one of them,  i have { DDate , MOVE , Count } as data

DataGroupColumn = "MOVE" and DataLabelsColumn = "DDate"
The problem is Chart puts data's with different DDate in Same Column. (chart.jpg is attched)

            e.Result = from MMove in dvMoveInOut._Ds.Tables[0].AsEnumerable()
                      where (MMove.Field<DateTime>("DDATE") > NOW.AddDays(-15))
                       orderby MMove.Field<string>("INOUT")
                      select new
                      {
                          DDate = MMove.Field<DateTime>("DDATE").ToString("M/d"),
                          MOVE = (MMove.Field<string>("INOUT") =="I") ? ("In") : ("Out")  ,
                          Count = ((MMove.Field<string>("INOUT") == "I") ? (MMove.Field<int>("CCOUNT")) : (-1 * MMove.Field<int>("CCOUNT")))
};
{ DDate = "8/5", MOVE = "In", Count = 1 }
{ DDate = "8/3", MOVE = "In", Count = 1 }
{ DDate = "8/1", MOVE = "In", Count = 1 }
{ DDate = "7/31", MOVE = "In", Count = 1 }
{ DDate = "7/31", MOVE = "Out", Count = -1 }
{ DDate = "7/30", MOVE = "In", Count = 2 }
{ DDate = "7/25", MOVE = "In", Count = 1 }
{ DDate = "7/25", MOVE = "Out", Count = -1 }
{ DDate = "7/24", MOVE = "In", Count = 1 }
{ DDate = "7/23", MOVE = "In", Count = 1 }
{ DDate = "7/23", MOVE = "Out", Count = -1 }
{ DDate = "7/22", MOVE = "In", Count = 1 }
{ DDate = "8/4", MOVE = "Out", Count = -1 }







   
Ashim
Top achievements
Rank 1
 answered on 11 Aug 2011
1 answer
87 views
Hello all,

Can I keep the RadCombo Open even after selecting an item.Any help is appreciated.

Thanks
Renj
Thad
Top achievements
Rank 2
 answered on 11 Aug 2011
3 answers
159 views
Hi,

I have telerik radgrid being used in the application with the add option also included in the grid. I added AddNewRecordText as "Add User & Employee" for add button. Please note that there is an ampersand in the text that was given. Now the "Add" button that appears on the grid shows the text correctly. However the tooltip for the button doesn't show up right. It encodes the ampersand symbol and shows it in the tooltip. Is there any workaround to fix this problem? 
<telerik:RadGrid ID="testEdit" AllowMultiRowEdit="True" ShowFooter="false" ShowStatusBar="true"
                        runat="server" ShowHeader="false" AutoGenerateColumns="true">
                        <MasterTableView CommandItemDisplay="Top" InsertItemPageIndexAction="ShowItemOnCurrentPage">
                            <CommandItemSettings ShowRefreshButton="false" AddNewRecordText="Add User & Employee" />


Regards,
Kishan G K
Daniel
Telerik team
 answered on 11 Aug 2011
1 answer
287 views
I've noticed that for some reason when filtering is enabled, any datafields that are numeric have a span tag with 4 different input elements and the textbox is styled with the riInput class, and an inline width of 125px that I can't override (either through CSS or by setting the FilterItemStyle-Width attribute, but every other datatype is just a textbox and a button, styled as rgFilterBox. 

Can someone explain 1) why exactly does it work this way? and 2) how can go about styling the controls that are using the radInput styles without messing with how every other radInput in my application is styled?  Because that seems pretty ridiculous to me.

<!--numeric filter box -->
<
TD style="WHITE-SPACE: nowrap">
    <SPAN style="WHITE-SPACE: nowrap" id=tabs_tabExportDetail_rgExportDetail_ctl00_ctl02_ctl03_RNTBF_LineNum_wrapper class="RadInput RadInput_IP">
        <INPUT style="WIDTH: 125px" id=tabs_tabExportDetail_rgExportDetail_ctl00_ctl02_ctl03_RNTBF_LineNum_text class="riTextBox riEnabled" onkeypress="if((event.keyCode == 13 || event.keyCode == 20)){event.returnValue=false; return false;}" alt="Filter LineNum column" type=text name=tabs_tabExportDetail_rgExportDetail_ctl00_ctl02_ctl03_RNTBF_LineNum_text>
        <INPUT style="BORDER-BOTTOM: 0px; BORDER-LEFT: 0px; PADDING-BOTTOM: 0px; MARGIN: -18px 0px 0px -1px; PADDING-LEFT: 0px; WIDTH: 1px; PADDING-RIGHT: 0px; HEIGHT: 1px; VISIBILITY: hidden; OVERFLOW: hidden; BORDER-TOP: 0px; BORDER-RIGHT: 0px; PADDING-TOP: 0px" id=tabs_tabExportDetail_rgExportDetail_ctl00_ctl02_ctl03_RNTBF_LineNum class=rdfd_ title="" type=text>
        <INPUT style="BORDER-BOTTOM: 0px; BORDER-LEFT: 0px; PADDING-BOTTOM: 0px; MARGIN: -18px 0px 0px -1px; PADDING-LEFT: 0px; WIDTH: 1px; PADDING-RIGHT: 0px; HEIGHT: 1px; VISIBILITY: hidden; OVERFLOW: hidden; BORDER-TOP: 0px; BORDER-RIGHT: 0px; PADDING-TOP: 0px" id=tabs_tabExportDetail_rgExportDetail_ctl00_ctl02_ctl03_RNTBF_LineNum_Value class=rdfd_ title="" type=text name=tabs$tabExportDetail$rgExportDetail$ctl00$ctl02$ctl03$RNTBF_LineNum>
        <INPUT id=tabs_tabExportDetail_rgExportDetail_ctl00_ctl02_ctl03_RNTBF_LineNum_ClientState type=hidden name=tabs_tabExportDetail_rgExportDetail_ctl00_ctl02_ctl03_RNTBF_LineNum_ClientState autocomplete="off">
        </LINK>
    </SPAN>
    <INPUT id=tabs_tabExportDetail_rgExportDetail_ctl00_ctl02_ctl03_Filter_LineNum class=rgFilter title=Filter onclick='$find("tabs_tabExportDetail_rgExportDetail")._showFilterMenu("tabs_tabExportDetail_rgExportDetail_ctl00", "LineNum", event); return false;' type=submit name=tabs$tabExportDetail$rgExportDetail$ctl00$ctl02$ctl03$Filter_LineNum>
</TD>
 <!--non-numeric filter box -->
<TD style="WHITE-SPACE: nowrap">
    <INPUT id=tabs_tabExportDetail_rgExportDetail_ctl00_ctl02_ctl03_FilterTextBox_ProductNum class=rgFilterBox onkeypress="if((event.keyCode == 13 || event.keyCode == 20)) return false;" alt="Filter ProductNum column" size=10 type=text name=tabs$tabExportDetail$rgExportDetail$ctl00$ctl02$ctl03$FilterTextBox_ProductNum>
    <INPUT id=tabs_tabExportDetail_rgExportDetail_ctl00_ctl02_ctl03_Filter_ProductNum class=rgFilter title=Filter onclick='$find("tabs_tabExportDetail_rgExportDetail")._showFilterMenu("tabs_tabExportDetail_rgExportDetail_ctl00", "ProductNum", event); return false;' value=" " type=submit name=tabs$tabExportDetail$rgExportDetail$ctl00$ctl02$ctl03$Filter_ProductNum>
</TD>
Daniel
Telerik team
 answered on 11 Aug 2011
Narrow your results
Selected tags
Tags
+? more
Top users last month
Chester
Top achievements
Rank 1
Iron
Simon
Top achievements
Rank 1
Iron
Douglas
Top achievements
Rank 2
Iron
Iron
SUNIL
Top achievements
Rank 3
Iron
Iron
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Chester
Top achievements
Rank 1
Iron
Simon
Top achievements
Rank 1
Iron
Douglas
Top achievements
Rank 2
Iron
Iron
SUNIL
Top achievements
Rank 3
Iron
Iron
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?