Telerik Forums
UI for ASP.NET AJAX Forum
2 answers
93 views
I've a required validations for 1 column
After validations fire, the column change Width.

How I can Fix this?

I Attach image.

regards
July
Top achievements
Rank 2
 answered on 06 Nov 2011
2 answers
128 views
hi, im trying to implement the webservice binding client side demos on my own project but, the radgrid wont bind the json result
here is my aspx file
<%@ Page Language           = "C#"
         AutoEventWireup    = "true"
         CodeBehind         = "LogSms.aspx.cs"
         Inherits           = "Course.Pages.WebForm.LogSms"
         MasterPageFile     = "../../SharedPage/PageMaster.Master" %>
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
          
<asp:Content runat                = "server"
             Id                   = "HeadContent"
             ContentPlaceHolderID = "HeadContent">
</asp:Content>
 
<asp:Content Id                     = "LeftContent"
             ContentPlaceHolderID   = "LeftContent"
             runat                  = "server">
              
</asp:Content>
<asp:Content runat                = "server"
             Id                   = "MainContent" 
             ContentPlaceHolderID = "MainContent">
             <telerik:RadCodeBlock ID="RadCodeBlock1" runat="server">
             <script type="text/javascript">
             //<![CDATA[
            function pageLoad(sender, args)
            {
                setInterval(getData, 10000);
            }
            function getData()
            {
               Course.FakeWebService.GetSmsRequestLog(updateGrid);
            }
 
            function updateGrid(result) {
                var tableView = $find("<%= RadGridKu.ClientID %>");
                var mtv = tableView.get_masterTableView();
                mtv.set_dataSource(result);
                mtv.dataBind();
            }
         //]]>
        </script>
    </telerik:RadCodeBlock>
    <asp:ScriptManager ID="ScriptManager" runat="server">
       <Services>
           <asp:ServiceReference Path="../../FakeWebService.asmx"/>
       </Services>
    </asp:ScriptManager>
    <telerik:RadGrid ID="RadGridKu" runat="server">
        <MasterTableView Enabled="true">
            <Columns>
                <telerik:GridBoundColumn DataField="RequestId" UniqueName="RequestId" HeaderText="Request ID" Display="true">
                </telerik:GridBoundColumn>
                <telerik:GridBoundColumn DataField="HeadParam" UniqueName="HeadParam" HeaderText="Head Param" Display="true">
                </telerik:GridBoundColumn>
                <telerik:GridBoundColumn DataField="DataParam" UniqueName="DataParam" HeaderText="Data Param" Display="true">
                </telerik:GridBoundColumn>
                <telerik:GridBoundColumn DataField="LogDate" UniqueName="LogDate" HeaderText="Log Date" Display="true">
                </telerik:GridBoundColumn>
            </Columns>
        </MasterTableView>
        <ClientSettings>
            <ClientEvents OnCommand="function(){}"></ClientEvents>
            <DataBinding Location="../../FakeWebService.asmx" SelectMethod="GetSmsRequestLog"/>
        </ClientSettings>
    </telerik:RadGrid>
</asp:Content>


and here is my service.cs
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Globalization;
using System.Linq;
using System.Net;
using System.Net.Security;
using System.Text;
using System.Web;
using System.Web.Script.Services;
using System.Web.Services;
using System.Xml;
using Course.Entity;
 
namespace Course
{
    /// <summary>
    /// Summary description for FakeWebService
    /// </summary>
    [WebService(Namespace = "http://tempuri.org/")]
    [WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
    [ScriptService]
    public class FakeWebService : WebService
    {
 
        [WebMethod]
        public string HelloWorld()
        {
            return "Hello World";
        }
 
        private string SessionLogSmsRequest
        {
            get { return (string)HttpContext.Current.Session["LogSmsRequest"]; }
            set { HttpContext.Current.Session["LogSmsRequest"] = value; }
        }
        public FakeWebService()
        {
            new Random(DateTime.Now.Millisecond);
        }
 
        [WebMethod(EnableSession = true), Description("Ambil Feed Sms Request")]
         
        public DataSet GetSmsRequestLog()
        {
            //// create data table
            var service    = new ServiceReference1.SMSListenerClient();
            var listObject = new List<ObjectEntityClass.LogSmsRequest>();
            if(SessionLogSmsRequest != null)
            {
                var myobject = service.GetListLogSms(1);
                listObject = Class.JsonHelper.Deserialize<List<ObjectEntityClass.LogSmsRequest>>(myobject);
            }
            else
            {
                var myobject = service.GetListLogSms(1);
                listObject = Class.JsonHelper.Deserialize<List<ObjectEntityClass.LogSmsRequest>>(myobject);
            }
            SerializeData(listObject);
            var dataSet = new DataSet("LogSmsRequestDataSet");
            var reader = XmlReader.Create(new System.IO.StringReader(SessionLogSmsRequest));
            dataSet.ReadXml(reader);
            return dataSet;
        }
 
 
        private List<ObjectEntityClass.LogSmsRequest> GetListData(string xmlData)
        {
            var xmlDocument = new XmlDocument();
            xmlDocument.LoadXml(xmlData);
            var listSmsRequest = new List<ObjectEntityClass.LogSmsRequest>();
            if (xmlDocument.DocumentElement != null)
            {
                listSmsRequest = (from XmlNode quoteNode in xmlDocument.DocumentElement.ChildNodes select GetLogSmsRequest(quoteNode)).ToList();
            }
            return listSmsRequest;
        }
 
        private static ObjectEntityClass.LogSmsRequest GetLogSmsRequest(XmlNode logSmsRequest)
        {
            // ReSharper disable PossibleNullReferenceException
            var requestId = logSmsRequest.Attributes["RequestID"].Value;
            // ReSharper restore PossibleNullReferenceException
            var headParam = logSmsRequest.Attributes["HeadParam"].Value;
            var dataParam = logSmsRequest.Attributes["DataParam"].Value;
            var logDate   = DateTime.Parse(logSmsRequest.Attributes["LogDate"].Value, CultureInfo.InvariantCulture);
            return new ObjectEntityClass.LogSmsRequest
            {
                RequestId = requestId,
                HeadParam = headParam,
                DataParam = dataParam,
                LogDate = logDate
            };
        }
 
        private IEnumerable<ObjectEntityClass.LogSmsRequest> GetListSmsData(string xmlData)
        {
            var xmlDocument = new XmlDocument();
            xmlDocument.LoadXml(xmlData);
 
            var list = new List<ObjectEntityClass.LogSmsRequest>();
            ObjectEntityClass.LogSmsRequest obj;
            foreach (XmlNode Node in xmlDocument.DocumentElement.ChildNodes)
            {
                obj = GetLogSmsRequest(Node);
                list.Add(obj);
            }
            return list;
        }
 
 
        private void SerializeData(IEnumerable<ObjectEntityClass.LogSmsRequest> LogSmsRequests)
        {
            var str = new StringBuilder("<data>");
            try
            {
                foreach (var items in LogSmsRequests)
                {
                    str.Append("<sms ");
                    str.Append("RequestId=\"" + items.RequestId.ToString(CultureInfo.InvariantCulture) + "\" ");
                    str.Append("HeadParam=\"" + items.HeadParam.ToString(CultureInfo.InvariantCulture) + "\" ");
                    str.Append("DataParam=\"" + items.DataParam.ToString(CultureInfo.InvariantCulture) + "\" ");
                    str.Append("LogDate=\""   + items.LogDate.ToString("MM/dd/yyyy HH:mm:ss") + "\" ");
                    str.Append(" />");
                }
            }
            catch (Exception ex)
            {
                throw new Exception(ex.Message);
            }
            str.Append("</data>");
            SessionLogSmsRequest = str.ToString();
        }
 
 
    }
}

i've debug the code with firebug and fiddler and its there the json result, but radgrid keep show "no records to display"

please help me, thanks
regards

dimas
dimas
Top achievements
Rank 1
 answered on 05 Nov 2011
1 answer
230 views
Hi,

I am facing a problem with RadBinaryImage1. I have one byte[] object with some data and i am assigning it to RadBinaryImage1.DataValue and then RadBinaryImage1.DataBind() but not showing any Image in RadBinaryImage1.

RadBinaryImage1.DataValue = Image;
RadBinaryImage1.DataBind();
here the Image object is byte[] type. this thing i am doing in one user control.

and I am calling this user Control under RadDataGrid on <EditFormSettings>.

Can anyone tell me What i am doing wrong here ?

Thanks,
--Jai
Jayesh Goyani
Top achievements
Rank 2
 answered on 05 Nov 2011
1 answer
614 views
hi
I am using AsyncUpload. After selecting multiple images i have to upload all images to a rotator.

At the time of button  upload clicking i have to check any duplicate files occurs.
So I need the input files of radAsyncUpload,....  How can i get using script???

In RadUpload ,,,,,,,,radUpload.getFileInputs()  will get all fileinputs.. I tried it,But its not working in AsyncUpload

If anyone tried Please reply
Thanks in advance
Lekha








Jayesh Goyani
Top achievements
Rank 2
 answered on 05 Nov 2011
1 answer
80 views
Hi,

Is there any way to add "fake" files to the uploaded files list ?

In the web app I'm developing, I have a "create / edit profile" page where the user can create/edit his/her profile  ... ( once again, this page has two modes "create" and "edit" ) ... in the edit mode I want the RadAsyncUpload  to show up the file that is associated with the user ... so I want to programatically add this file to the list of uploaded files :-) ..How can I do this ?

Seb
Jayesh Goyani
Top achievements
Rank 2
 answered on 05 Nov 2011
2 answers
120 views
Hi,
I´ve been trying to radopen an url  as follows:
<telerik:RadCodeBlock ID="java" runat="server">
<script type="text/javascript">

function redebp(sender, args) {

radopen("http://www.redebp.com.br/LoginUno.aspx?p=169","redebp")
}

 

The page is correctly load but parameter p is always null.

If instead I open the same page on the same site as below,
<telerik:RadCodeBlock ID="java" runat="server">
<script type="text/javascript">

function redebp(sender, args) {

radopen("LoginUno.aspx?p=169,"redebp");

}
The page is correctly load as before, but now the parameter p holds the expected value (169).

Can someone please explain this weird behaviour ?

TIA



Zenute Marins
Top achievements
Rank 1
 answered on 05 Nov 2011
1 answer
105 views
Hi there - Is there a specific forum for Rad Textboxes ?

If not, where should I post threads that the admins of this site will read ?


Thanks,
Scott

Jayesh Goyani
Top achievements
Rank 2
 answered on 05 Nov 2011
6 answers
122 views
I have two checkboxes that I've added in a CommandItemTemplete, how can I get the check status  in the RadGrid1_NeedDataSource ?
Thanks

 <CommandItemTemplate>
                                 <table width="100%">
                             <tr class="customFont">
                         
                            <td align="left">
                             <asp:LinkButton ID="LinkButton2" runat="server" OnClientClick="openWin('/portals/0/NewSearch.aspx'); return false;"  >
                                <img style="border:0px;vertical-align:middle;" alt="" src="/portals/0/Images/add-icon.png" />New Search</asp:LinkButton>                              
                               &nbsp;&nbsp;&nbsp; 
                                <td align="left">
                                    <asp:CheckBox ID="cbAffiliation" Text="Show Affiliation"  OnCheckedChanged="CheckBox_CheckedChanged"  runat="server" AutoPostBack="True" />
                                     &nbsp;  &nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
                                        <asp:CheckBox ID="cbAbstract"  Text="Show Abstract"   OnCheckedChanged="CheckBox_CheckedChanged"   runat="server" AutoPostBack="True" />
                                                                    
                                </td>
                              
                         
                            <td align="right">
                                <asp:LinkButton ID="LinkButton4" runat="server" OnClientClick="refreshGrid(); return false;" >
                                <img style="border:0px;vertical-align:middle;" alt="" src="/portals/0/Images/Refresh.png" /> Refresh</asp:LinkButton>
                                &nbsp;&nbsp;&nbsp;
                            </td>
                        </tr>
         
             </table>
                </CommandItemTemplate>



Jayesh Goyani
Top achievements
Rank 2
 answered on 05 Nov 2011
1 answer
128 views
I have tried with a skin (Skin="Vista") and wihtout a skin (Skin="") to adjust Font and/or Font Family, and nothing affects thees font properties.
Stangely enough when I first set up the grid it had a few columns that I adjusted these properties on and had my col widths adjusted to look proper. Somewhere on down the line as I worked with the page converting the functions over from asp.net grid I noticed that the font size was larger.
First, I started at the MasterTableView Font-Size= 8, and nadda. I worked my way down the grid heirarchy to no avail.
Now other props work like strikethrough, Italic, underline. However, I did get a font size change on the header at the item level, but still no change in the item, edit, or footer templates.
I read quite a few posts about the skin overriding the properties, but this seems odd.

-Thank you
<telerik:RadGrid runat="server" ID="rgvPlan"
    OnUpdateCommand="rgvPlan_UpdateCommand"
    AllowFilteringByColumn="true"
    AllowMultiRowEdit="true"
    AllowPaging="true"
    AllowSorting="true"
    AutoGenerateColumns="false"
    PageSize="10" 
    Skin="Vista"
    PagerStyle-Mode="Slider"
    CellSpacing="0" 
    GridLines="Horizontal"
    ShowFooter="true"
    Width="720"
    Height="355px">
    <MasterTableView Width="700px"
        DataKeyNames="ListID"
        ClientDataKeyNames="ListID"
        EditMode="InPlace" Font-Names="Arial" Font-Size="8">
        <Columns>
            <telerik:GridEditCommandColumn ButtonType="LinkButton" ItemStyle-Width="60px" HeaderStyle-Width="60px"></telerik:GridEditCommandColumn>
            <telerik:GridButtonColumn CommandName="Delete" Text="Delete" UniqueName="DeleteColumn" ></telerik:GridButtonColumn>
            <telerik:GridTemplateColumn ItemStyle-HorizontalAlign="Right" HeaderText="Week Ending" ItemStyle-Width="50px" HeaderStyle-Width="50px" AllowFiltering="false" >
                <ItemTemplate>
                    <asp:LinkButton ID="lbWeekEndDate" OnClick="WeekEndDateChanged" runat="server" Text='<%# Bind("WeekEndDate", "{0:d}") %>'></asp:LinkButton>
                </ItemTemplate>
            </telerik:GridTemplateColumn>
            <telerik:GridTemplateColumn HeaderText="Fiscal M/Y" ItemStyle-Width="40px" HeaderStyle-Width="40px" AllowFiltering="false">
                <ItemTemplate>
                    <asp:Label ID="lblFsclMnthP" runat="server" Text='<%# Eval("FsclMnth") %>'></asp:Label>
                </ItemTemplate>
            </telerik:GridTemplateColumn>
            <telerik:GridTemplateColumn UniqueName="Network" HeaderText="Network  | Network Activity" AllowFiltering="true" HeaderStyle-Width="130px">
                <EditItemTemplate>
                    <asp:DropDownList ID="ddlNetwork" runat="server" DataSourceID="dsNetwork" SelectedValue='<%# Bind("NW_NWAct") %>'
                        DataTextField="NW_NWAct" DataValueField="NW_NWAct">
                    </asp:DropDownList>
                </EditItemTemplate>
                <ItemTemplate>
                    <asp:Label ID="Label7" runat="server" Text='<%# Eval("NW_NWAct") %>'></asp:Label>
                </ItemTemplate>
            </telerik:GridTemplateColumn>
            <telerik:GridTemplateColumn ItemStyle-Font-Size="XX-Small" UniqueName="Activity"  HeaderText="Activity" AllowFiltering="true" HeaderStyle-Width="110px">
                <EditItemTemplate>
                    <asp:DropDownList ID="ddlActivity" runat="server" DataSourceID="dsActivityType" SelectedValue='<%# Bind("ActivityType") %>'
                        ToolTip='<%# Bind("ActivityDesc") %>' DataTextField="ActivityType" DataValueField="ActivityType">
                    </asp:DropDownList>
                </EditItemTemplate>
                <ItemTemplate>
                    <asp:Label ID="Label8" runat="server" Text='<%# Eval("ActivityType") %>' ToolTip='<%# Eval("ActivityDesc") %>'> </asp:Label>
                </ItemTemplate>
            </telerik:GridTemplateColumn>
            <telerik:GridTemplateColumn UniqueName="Grade"  HeaderText="Grade" AllowFiltering="false">
                <EditItemTemplate>
                    <asp:TextBox ID="tbGrade" Text='<%# Bind("Grade") %>' runat="server" MaxLength="5"
                        Width="40"></asp:TextBox>
                </EditItemTemplate>
                <ItemTemplate>
                    <asp:Label ID="Label1" runat="server" Text='<%# Eval("Grade") %>'></asp:Label>
                </ItemTemplate>
            </telerik:GridTemplateColumn>
            <telerik:GridTemplateColumn UniqueName="STHours"  HeaderText="ST Hours"  AllowFiltering="false" ItemStyle-HorizontalAlign="Right">
                <EditItemTemplate>
                    <asp:TextBox runat="server" ID="tbSTHours" Text='<%# Bind("STHours") %>' Width="55"></asp:TextBox>
                </EditItemTemplate>
                <ItemTemplate>
                    <asp:Label ID="Label6" runat="server" Text='<%# Eval("STHours") %>'></asp:Label>
                </ItemTemplate>
                <FooterTemplate>
                    <strong><%#GetTotals("STHours", "P")%></strong>
                </FooterTemplate>
            </telerik:GridTemplateColumn>
            <telerik:GridTemplateColumn UniqueName="OTHours"  HeaderText="OT Hours" AllowFiltering="false" ItemStyle-HorizontalAlign="Right">
                <EditItemTemplate>
                    <asp:TextBox runat="server" ID="tbOTHours" Text='<%# Bind("OTHours") %>' Width="55"></asp:TextBox>
                </EditItemTemplate>
                <ItemTemplate>
                    <asp:Label ID="Label5" runat="server" Text='<%# Eval("OTHours") %>'></asp:Label>
                </ItemTemplate>
                <FooterTemplate>
                    <strong><%#GetTotals("OTHours", "P")%></strong>
                </FooterTemplate>
            </telerik:GridTemplateColumn>
            <telerik:GridTemplateColumn HeaderText="Total Hours" AllowFiltering="false" ItemStyle-HorizontalAlign="Right">
                <ItemTemplate>
                    <asp:Label ID="lblTotalHrs" runat="server" Text='<%# Eval("TotalHrs") %>'></asp:Label>
                </ItemTemplate>
                <FooterTemplate>
                    <strong><%#GetTotals("TotalHrs", "P")%></strong>
                </FooterTemplate>
            </telerik:GridTemplateColumn>
        </Columns>
    </MasterTableView>
      
    <StatusBarSettings LoadingText="Loading..." ReadyText="Ready" />
  
    <ClientSettings AllowColumnsReorder="False" ReorderColumnsOnClient="False"  >
        <Selecting AllowRowSelect="True" />
        <Scrolling  EnableVirtualScrollPaging="true" AllowScroll="true" UseStaticHeaders="True" />
    </ClientSettings>
  
    <FilterMenu EnableImageSprites="True" EnableRoundedCorners="true" ></FilterMenu>
 </telerik:RadGrid>
Jayesh Goyani
Top achievements
Rank 2
 answered on 05 Nov 2011
1 answer
212 views
Hello,

Our team noticed that when Sorting is enabled on the RadGrid, the user can click the column header to sort the table but focus does not stay on that link. This is an accessibility issue because the page focus goes back to the top of the page after the grid is sorted and a keyboard user would have to tab all the way back down to the grid. We were wondering, is there a client-side event that we could call when the sortable column is clicked on the RadGrid? We could then call a custom JavaScript method to set focus to that link.

Thank you,

Lauren Jones
Jayesh Goyani
Top achievements
Rank 2
 answered on 05 Nov 2011
Narrow your results
Selected tags
Tags
+? more
Top users last month
Hiba
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Rakhee
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Hiba
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Rakhee
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?