Telerik Forums
UI for ASP.NET AJAX Forum
2 answers
157 views

Hi

I have a radgrid inside RadPageView. I have a submit button and uses jquery click event to retrieve data using wcf. I am getting data and able to bind it. After binding, some scroll event gets triggered and causes a postback. As I don't have any logic to retrieve data on the page postback, the grid is empty again.

How to stop the events from triggering...

Also, paging is enabled, but the grid displays all records at one shot which I believe causes the scrolling, but which one ?.

Here is my code snippet.

 

Default.aspx

$(document).ready(function () {
//alert('To Date Click');
$('#ctl00_ContentPlaceHolder1_btnSubmit').click(function () {

 var uri = "../Default.svc.cs/GetData";

var datival = "userId="+12345;

$.ajax({
url:uri+dataval,
type:'GET',
async:false,
dataType:"json",
contentType: "application/json;charset=utf-8",

error: function (XMLHttpRequest, textStatus, errorThrown) {
//$('#loading').hide();
alert(errorThrown);
alert(XMLHttpRequest.statusText);
alert(textStatus);
                        
                        return true;
},

success:function(data){
alert('Data retrieved:' + data);
var gridDealers = $find("<%=radGrid1.ClientID %>").get_masterTableView();
gridDealers.set_dataSource([]);
gridDealers.dataBind();
var gridData = data["DataGridList"];
gridDealers.set_dataSource(gridData);
gridDealers.dataBind();
                        
                        
                        }

}):

});

<telerik:RadTabStrip ID="RadTabStrip1" runat="server" Skin="Office2007" MultiPageID="RadMultiPage1"
SelectedIndex="0" >
<Tabs>
<telerik:RadTab Text="Inspection Report" Font-Bold="true" Font-Size="Small" runat="server"
Selected="True">
</telerik:RadTab>
</Tabs>
</telerik:RadTabStrip>
<telerik:RadMultiPage runat="server" ID="RadMultiPage1" SelectedIndex="0" ScrollBars="None">
<telerik:RadPageView runat="server" ID="RadPageView1">
<asp:Panel runat="server" ID="pnlTopRight" Width="100%">

<telerik:RadGrid ID="radGrid1" OnSortCommand="radGrid1_SortGrid"
runat="server" AutoGenerateColumns="False" Skin="Office2007"
AllowPaging="True" AllowSorting="True" PagerStyle-Mode="NextPrevAndNumeric"
OnNeedDataSource="radGrid1_NeedDataSource" onpageindexchanged="radGrid1_PageIndexChanged"
AllowFilteringByColumn="True" FilterItemStyle-Height="10px" onpagesizechanged="radGrid1_PageSizeChanged"
GroupPanelPosition="Top" ResolvedRenderMode="Classic" VirtualItemCount="10"
ExportSettings-OpenInNewWindow="true" ExportSettings-Excel-Format="Xlsx"
onitemdatabound="radGrid1_ItemDataBound1"
onhtmlexporting="radGrid1_Exporting">
<HeaderStyle Font-Bold="true" HorizontalAlign="Center" Font-Size="Smaller" Font-Names="Verdana" />
<ItemStyle Font-Size="Smaller"/>
<AlternatingItemStyle Font-Size="Smaller"/>
<ExportSettings Excel-Format="Xlsx" IgnorePaging="true"></ExportSettings>
<MasterTableView DataKeyNames="Code, ID">
<NoRecordsTemplate>
<div>
There are no records to display</div>
</NoRecordsTemplate>
<Columns>

    <telerik:GridBoundColumn .....>

     .......

    </telerik:GridBoundColumn>

</Columns>

</MasterTableView>
</telerik:RadGrid>
</telerik:RadPageView>
</telerik:RadMultiPage>

 

Default.svc.cs

public IList GetData(int userId)

{

    // process sql data and return list.

}

 

Sumathi
Top achievements
Rank 1
 answered on 15 Apr 2015
3 answers
142 views
Hey,

i recently updated the Telerik.Web.UI dll to version: 2013.3.1114.40

since then i've been getting this error:

Method not found: 'Int32 Telerik.Web.UI.UploadedFile.get_ContentLength()'.

when i try to upload a doc. this is happening on the following line:

byte[] bytes = new byte[file.ContentLength];
file.InputStream.Read(bytes, 0, file.ContentLength);

can anybody help on this?

Thanks,
Tony.
Vessy
Telerik team
 answered on 15 Apr 2015
3 answers
240 views

I am using UI for ASP.NET AJAX v.2015.1.401.45, when I use the upload function for documents (also for images, media or flash) I can create a new folder, delete files inside those folders, delete the folder and  browse from folder to folder. But when I try to upload a new document, I see for a second the process circle then nothing get uploaded to the server. Since I can work with other functions, I don't think is a permission problem. My radeditor code is this:

<telerik:RadEditor ID="reTemplateHTML" runat="server" Content='<%# Bind("EmailBody")%' Width="100%" Height="800px" ContentFilters="DefaultFilters,MakeUrlsAbsolute" Editable="true" EditModes="All" AllowScripts="true" >
<ImageManager 
ViewPaths="~/uploads/images/" 
UploadPaths="~/uploads/images/"  
DeletePaths="~/uploads/images/"  
EnableAsyncUpload="true" 
MaxUploadFileSize="3145728"  />
<TemplateManager 
ViewPaths="~/templates/" 

MaxUploadFileSize="3145728"  />
<FlashManager 
ViewPaths="~/uploads/flash/" 
UploadPaths="~/uploads/flash/" 
DeletePaths="~/uploads/flash/" 
EnableAsyncUpload="true" 
MaxUploadFileSize="3145728"  />
<DocumentManager 
ViewPaths="~/uploads/documents/" 
UploadPaths="~/uploads/documents/" 
DeletePaths="~/uploads/documents/" 
EnableAsyncUpload="true"
MaxUploadFileSize="3145728" />
<MediaManager 
ViewPaths="~/uploads/media/" 
UploadPaths="~/uploads/media/" 
DeletePaths="~/uploads/media/"
EnableAsyncUpload="true"
MaxUploadFileSize="3145728"  />
</telerik:RadEditor>

Any Ideas. I have another app that use this feature and is working fine. But that is in the previous version of ASP.NET AJAX. Any Idea?

 

Thanks

JMC

Misho
Telerik team
 answered on 15 Apr 2015
10 answers
1.3K+ views
Hello,

I have a problem when loading radgrid. Grid loading time is fast If my dataset is only 10 records or so. But if it is over 100 records, loading takes at least 10 seconds which is not acceptable. I already have paging and my paging set as 31. I tried to set page size to 10 and it is also not working. I've also tried to do as suggested here . I tried to disable viewstate and my grid is gone. I have to use row double click features since I need to show more details. Please suggest. 

<telerik:RadGrid ID="gvViewTrans" AllowFilteringByColumn="false" runat="server" AllowSorting="false"
                       AutoGenerateColumns="false" Skin="MySkin" EnableEmbeddedSkins="false" AllowMultiRowEdit="false"
                       PageSize="31" AllowPaging="true" OnNeedDataSource="gvViewTrans_NeedDataSource"
                       OnItemDataBound="gvViewTrans_ItemDataBound" OnItemCommand="gvViewTrans_ItemCommand">
                       <ClientSettings EnableRowHoverStyle="true">
                           <Selecting AllowRowSelect="True"></Selecting>
                           <ClientEvents OnRowClick="RowClick" OnRowDblClick="RowDblClick" OnGridCreated="gvViewTransCreated"
                               OnGridCreating="GridCreated4" />
                           <Scrolling AllowScroll="True" UseStaticHeaders="true" SaveScrollPosition="true" FrozenColumnsCount="5">
                           </Scrolling>
                       </ClientSettings>
                       <MasterTableView DataKeyNames="SID" ClientDataKeyNames="SID" CommandItemDisplay="Top"
                           AutoGenerateColumns="false" Width="100%">
                           <CommandItemTemplate>
                               <div style="display: none;">
                                   <telerik:RadButton ID="btnSave" runat="server" Text="Save" Width="80px" Skin="Sitefinity"
                                       CommandName="Save" EnableEmbeddedSkins="false">
                                       <Icon PrimaryIconUrl="Images/save.png" PrimaryIconTop="3px" PrimaryIconLeft="5px" />
                                   </telerik:RadButton>
                               </div>
                           </CommandItemTemplate>
                           <HeaderStyle BackColor="#941922" ForeColor="White" />
                           <Columns>
                               <telerik:GridBoundColumn UniqueName="Date" HeaderText="Date" ReadOnly="true" DataFormatString="{0:dd/MM/yyyy}"
                                   DataField="Trans_Date" ItemStyle-Height="25px" Display="false">
                                   <ItemStyle BackColor="#F6EFD7"></ItemStyle>
                                   <HeaderStyle Width="90px" />
                               </telerik:GridBoundColumn>
                               <telerik:GridBoundColumn UniqueName="Day" HeaderText="Day" ReadOnly="true" DataField="Trans_Date"
                                   DataFormatString="{0:ddd}" Display="false" ItemStyle-Height="25px">
                                   <ItemStyle BackColor="#F6EFD7"></ItemStyle>
                                   <HeaderStyle Width="60px" />
                               </telerik:GridBoundColumn>
                               <telerik:GridBoundColumn UniqueName="EmployeeID" HeaderText="EmployeeID" ReadOnly="true"
                                   DataField="EmployeeID" ItemStyle-Height="25px" Display="false">
                                   <ItemStyle BackColor="#F6EFD7"></ItemStyle>
                                   <HeaderStyle Width="100px" />
                               </telerik:GridBoundColumn>
                               <telerik:GridBoundColumn UniqueName="TempEmpID" HeaderText="EmployeeID" ReadOnly="true"
                                   DataField="TempEmpID" ItemStyle-BackColor="#F6EFD7" HeaderStyle-Width="100px"
                                   ItemStyle-Height="50px" ItemStyle-Width="36px" Display="true">
                                   <ItemStyle BackColor="#F6EFD7"></ItemStyle>
                               </telerik:GridBoundColumn>
                               <telerik:GridBoundColumn UniqueName="EmployeeName" HeaderText="Employee" ReadOnly="true"
                                   DataField="EmployeeName" ItemStyle-Height="25px">
                                   <ItemStyle BackColor="#F6EFD7"></ItemStyle>
                                   <HeaderStyle Width="150px" />
                               </telerik:GridBoundColumn>
                               <telerik:GridCheckBoxColumn UniqueName="Locked" HeaderText="Lock" DataField="Locked"
                                   Visible="false" Display="false">
                                   <ItemStyle BackColor="#F6EFD7"></ItemStyle>
                                   <HeaderStyle Width="50px" />
                               </telerik:GridCheckBoxColumn>
                               <telerik:GridTemplateColumn HeaderText="Locked" Visible="true">
                                   <ItemTemplate>
                                       <asp:CheckBox ID="chkLocked" runat="server" AutoPostBack="true" OnCheckedChanged="chkLocked_CheckedChanged"
                                           Checked='<%#bool.Parse(Eval("Locked").ToString())%>' />
                                   </ItemTemplate>
                                   <ItemStyle BackColor="#F6EFD7"></ItemStyle>
                                   <HeaderStyle Width="50px" />
                               </telerik:GridTemplateColumn>
                               <telerik:GridCheckBoxColumn UniqueName="Freeze" HeaderText="Freeze" DataField="Freeze"
                                   Visible="true">
                                   <ItemStyle BackColor="#F6EFD7"></ItemStyle>
                                   <HeaderStyle Width="50px" />
                               </telerik:GridCheckBoxColumn>
                               <telerik:GridCheckBoxColumn UniqueName="Edit" HeaderText="Edit" DataField="Edit"
                                   Display="false" Visible="false">
                                   <%--<ItemStyle BackColor="#F6EFD7"></ItemStyle>--%>
                                   <HeaderStyle Width="50px" />
                               </telerik:GridCheckBoxColumn>
                               <telerik:GridBoundColumn UniqueName="In" HeaderText="In" ReadOnly="true" DataFormatString="{0:HH:mm}"
                                   DataField="In1">
                                   <%--<ItemStyle BackColor="#F2F2F2"></ItemStyle>--%>
                                   <HeaderStyle BackColor="#941922" Width="60px" />
                               </telerik:GridBoundColumn>
                               <telerik:GridBoundColumn UniqueName="Out" HeaderText="Out" ReadOnly="true" DataFormatString="{0:HH:mm}"
                                   DataField="Out1">
                                   <%--<ItemStyle BackColor="#F2F2F2"></ItemStyle>--%>
                                   <HeaderStyle BackColor="#941922" Width="60px" />
                               </telerik:GridBoundColumn>
                               <telerik:GridBoundColumn UniqueName="NRM" HeaderText="NRM" ReadOnly="true" DataField="TotalFinalWkhr">
                                   <%--<ItemStyle BackColor="#F2F2F2"></ItemStyle>--%>
                                   <HeaderStyle BackColor="#941922" Width="60px" />
                               </telerik:GridBoundColumn>
                               <telerik:GridBoundColumn UniqueName="Late" HeaderText="Late" ReadOnly="true" DataField="TotalLate">
                                   <%--<ItemStyle BackColor="#F2F2F2"></ItemStyle>--%>
                                   <HeaderStyle BackColor="#941922" Width="60px" />
                               </telerik:GridBoundColumn>
                               <telerik:GridBoundColumn UniqueName="EarlyOut" HeaderText="EOut" ReadOnly="true"
                                   DataField="TotalEarlyOut">
                                   <%--<ItemStyle BackColor="#F2F2F2"></ItemStyle>--%>
                                   <HeaderStyle BackColor="#941922" Width="60px" />
                               </telerik:GridBoundColumn>
                               <telerik:GridBoundColumn UniqueName="WKOT" HeaderText="WKOT" ReadOnly="true" DataField="WKOT">
                                   <%--<ItemStyle BackColor="#F2F2F2"></ItemStyle>--%>
                                   <HeaderStyle BackColor="#941922" Width="60px" />
                               </telerik:GridBoundColumn>
                               <telerik:GridBoundColumn UniqueName="OFFOT" HeaderText="OFFOT" ReadOnly="true" DataField="OFFOT">
                                   <%--<ItemStyle BackColor="#F2F2F2"></ItemStyle>--%>
                                   <HeaderStyle BackColor="#941922" Width="60px" />
                               </telerik:GridBoundColumn>
                               <telerik:GridBoundColumn UniqueName="Part_Time" HeaderText="PTHrs" ReadOnly="true"
                                   DataField="Part_Time">
                                   <%--<ItemStyle BackColor="#F2F2F2"></ItemStyle>--%>
                                   <HeaderStyle BackColor="#941922" Width="60px" />
                               </telerik:GridBoundColumn>
                               <telerik:GridBoundColumn UniqueName="TotalActualWkhr" HeaderText="Act Hrs" ReadOnly="true"
                                   DataField="TotalActualWkhr">
                                   <%--<ItemStyle BackColor="#F2F2F2"></ItemStyle>--%>
                                   <HeaderStyle BackColor="#941922" Width="60px" />
                               </telerik:GridBoundColumn>
                               <telerik:GridBoundColumn UniqueName="SEVent" HeaderText="SEvent" ReadOnly="true"
                                   DataField="SEVent">
                                   <%--<ItemStyle BackColor="#F2F2F2"></ItemStyle>--%>
                                   <HeaderStyle BackColor="#941922" Width="60px" />
                               </telerik:GridBoundColumn>
                               <telerik:GridBoundColumn UniqueName="SplitShiftAllowance" HeaderText="SShift" ReadOnly="true"
                                   DataField="SplitShiftAllowance">
                                   <%--<ItemStyle BackColor="#F2F2F2"></ItemStyle>--%>
                                   <HeaderStyle BackColor="#941922" Width="60px" />
                               </telerik:GridBoundColumn>
                               <telerik:GridBoundColumn UniqueName="Others1" HeaderText="Others1" ReadOnly="true"
                                   DataField="Others1">
                                   <%--<ItemStyle BackColor="#F2F2F2"></ItemStyle>--%>
                                   <HeaderStyle BackColor="#941922" Width="60px" />
                               </telerik:GridBoundColumn>
                               <telerik:GridBoundColumn UniqueName="Others2" HeaderText="Others2" ReadOnly="true"
                                   DataField="Others2">
                                   <%--<ItemStyle BackColor="#F2F2F2"></ItemStyle>--%>
                                   <HeaderStyle BackColor="#941922" Width="60px" />
                               </telerik:GridBoundColumn>
                               <telerik:GridBoundColumn UniqueName="Others3" HeaderText="Others3" ReadOnly="true"
                                   DataField="Others3">
                                   <%--<ItemStyle BackColor="#F2F2F2"></ItemStyle>--%>
                                   <HeaderStyle BackColor="#941922" Width="60px" />
                               </telerik:GridBoundColumn>
                               <telerik:GridBoundColumn UniqueName="Others4" HeaderText="Others4" ReadOnly="true"
                                   DataField="Others4">
                                   <%--<ItemStyle BackColor="#F2F2F2"></ItemStyle>--%>
                                   <HeaderStyle BackColor="#941922" Width="60px" />
                               </telerik:GridBoundColumn>
                               <telerik:GridBoundColumn UniqueName="Others5" HeaderText="Others5" ReadOnly="true"
                                   DataField="Others5">
                                   <%--<ItemStyle BackColor="#F2F2F2"></ItemStyle>--%>
                                   <HeaderStyle BackColor="#941922" Width="60px" />
                               </telerik:GridBoundColumn>
                               <telerik:GridBoundColumn UniqueName="Location" HeaderText="Location" ReadOnly="true"
                                   DataField="MLocation">
                                   <%--<ItemStyle BackColor="#F2F2F2"></ItemStyle>--%>
                                   <HeaderStyle BackColor="#941922" Width="100px" />
                               </telerik:GridBoundColumn>
                               <telerik:GridBoundColumn UniqueName="Skill" HeaderText="Skill" ReadOnly="true" DataField="MSkill">
                                   <%--<ItemStyle BackColor="#F2F2F2"></ItemStyle>--%>
                                   <HeaderStyle BackColor="#941922" Width="100px" />
                               </telerik:GridBoundColumn>
                               <telerik:GridBoundColumn UniqueName="CCenter" HeaderText="C.Center" ReadOnly="true"
                                   DataField="MCostCenter">
                                   <%--<ItemStyle BackColor="#F2F2F2"></ItemStyle>--%>
                                   <HeaderStyle BackColor="#941922" Width="100px" />
                               </telerik:GridBoundColumn>
                               <telerik:GridTemplateColumn UniqueName="Reason" HeaderText="Reason">
                                   <HeaderStyle BackColor="#941922" Width="100px" />
                                   <ItemTemplate>
                                       <asp:Label ID="lblReason" runat="server" Text=""></asp:Label>
                                       <%-- <telerik:RadComboBox ID="RCB_ReasonCode" runat="server" Width="80px" ZIndex="1000000"
                                           AllowCustomText="false" EnableLoadOnDemand="true" OnItemsRequested="cboReason_ItemsRequested">
                                       </telerik:RadComboBox>
                                       <br />
                                       <telerik:RadComboBox ID="RCB_ReasonCode2" runat="server" Width="80px" ZIndex="1000000"
                                           AllowCustomText="false" EnableLoadOnDemand="true" OnItemsRequested="cboReason_ItemsRequested">
                                       </telerik:RadComboBox>--%>
                                   </ItemTemplate>
                               </telerik:GridTemplateColumn>
                               <telerik:GridTemplateColumn UniqueName="ReasonCodeTemp" HeaderText="ReasonCodeTemp"
                                   Visible="false">
                                   <HeaderStyle BackColor="#941922" Width="40px" />
                                   <ItemTemplate>
                                       <asp:TextBox ID="txtReason1" Text='<%# DataBinder.Eval(Container.DataItem, "ReasonCode") %>'
                                           Width="450px" runat="server"></asp:TextBox>
                                       <br />
                                       <asp:TextBox ID="txtReason2" Text='<%# DataBinder.Eval(Container.DataItem, "ReasonCode2") %>'
                                           Width="450px" runat="server"></asp:TextBox>
                                   </ItemTemplate>
                               </telerik:GridTemplateColumn>
                               <%--<telerik:GridTemplateColumn UniqueName="TxnRemarks" HeaderText="Remarks" Display="false">
                                   <HeaderStyle BackColor="#941922" Width="200px" />
                                   <ItemTemplate>
                                       <asp:TextBox ID="TxnRemarks" Text='<%# DataBinder.Eval(Container.DataItem, "TxnRemarks") %>'
                                           Width="450px" runat="server"></asp:TextBox>
                                   </ItemTemplate>
                               </telerik:GridTemplateColumn>--%>
                               <%--<telerik:GridTemplateColumn UniqueName="SchLoc" HeaderText="SchLoc">
                                   <ItemStyle BackColor="#F2F2F2"></ItemStyle>
                                   <HeaderStyle BackColor="#941922" Width="100px" />
                                   <ItemTemplate>
                                       <telerik:RadComboBox ID="RCB_SchLoc" runat="server" Width="80px" OnItemsRequested="cboLocation_ItemsRequested"
                                           EnableLoadOnDemand="true" ZIndex="1000000" Enabled="False" EnableEmbeddedSkins="False"
                                           EnableEmbeddedScripts="False">
                                       </telerik:RadComboBox>
                                       <br />
                                       <telerik:RadComboBox ID="RCB_SchLoc2" runat="server" Width="80px" OnItemsRequested="cboLocation_ItemsRequested"
                                           EnableLoadOnDemand="true" ZIndex="1000000" Enabled="False" EnableEmbeddedSkins="False"
                                           EnableEmbeddedScripts="False">
                                       </telerik:RadComboBox>
                                   </ItemTemplate>
                               </telerik:GridTemplateColumn>
                               <telerik:GridTemplateColumn UniqueName="SchSkill" HeaderText="SchSkill">
                                   <ItemStyle BackColor="#F2F2F2"></ItemStyle>
                                   <HeaderStyle BackColor="#941922" Width="100px" />
                                   <ItemTemplate>
                                       <telerik:RadComboBox ID="RCB_SchSkill" runat="server" Width="80px" ZIndex="1000000"
                                           EnableLoadOnDemand="true" OnItemsRequested="cboSchSkill1_ItemsRequested" Enabled="False"
                                           EnableEmbeddedSkins="False" EnableEmbeddedScripts="False">
                                       </telerik:RadComboBox>
                                       <br />
                                       <telerik:RadComboBox ID="RCB_SchSkill2" runat="server" Width="80px" ZIndex="1000000"
                                           EnableLoadOnDemand="true" OnItemsRequested="cboSchSkill2_ItemsRequested" Enabled="False"
                                           EnableEmbeddedSkins="False" EnableEmbeddedScripts="False">
                                       </telerik:RadComboBox>
                                   </ItemTemplate>
                               </telerik:GridTemplateColumn>
                               <telerik:GridTemplateColumn UniqueName="SchSection" HeaderText="SchC.Center">
                                   <ItemStyle BackColor="#F2F2F2"></ItemStyle>
                                   <HeaderStyle BackColor="#941922" Width="100px" />
                                   <ItemTemplate>
                                       <telerik:RadComboBox ID="RCB_SchSection" runat="server" Width="80px" ZIndex="1000000"
                                           EnableLoadOnDemand="true" OnItemsRequested="cboSchSection1_ItemsRequested" Enabled="False"
                                           EnableEmbeddedSkins="False" EnableEmbeddedScripts="False">
                                       </telerik:RadComboBox>
                                       <br />
                                       <telerik:RadComboBox ID="RCB_SchSection2" runat="server" Width="80px" ZIndex="1000000"
                                           EnableLoadOnDemand="true" OnItemsRequested="cboSchSection2_ItemsRequested" Enabled="False"
                                           EnableEmbeddedSkins="False" EnableEmbeddedScripts="False">
                                       </telerik:RadComboBox>
                                   </ItemTemplate>
                               </telerik:GridTemplateColumn>
                               <telerik:GridTemplateColumn UniqueName="SchLocTemp" HeaderText="SchLocTemp" Visible="false">
                                   <HeaderStyle BackColor="#941922" Width="40px" />
                                   <ItemTemplate>
                                       <asp:TextBox ID="txtSchLoc1" Text='<%# DataBinder.Eval(Container.DataItem, "SchLoc1") %>'
                                           Width="450px" runat="server"></asp:TextBox>
                                       <br />
                                       <asp:TextBox ID="txtSchLoc2" Text='<%# DataBinder.Eval(Container.DataItem, "SchLoc2") %>'
                                           Width="450px" runat="server"></asp:TextBox>
                                   </ItemTemplate>
                               </telerik:GridTemplateColumn>
                               <telerik:GridTemplateColumn UniqueName="SchSkillTemp" HeaderText="SchSkillTemp" Visible="false">
                                   <HeaderStyle BackColor="#941922" Width="40px" />
                                   <ItemTemplate>
                                       <asp:TextBox ID="txtSchSkill1" Text='<%# DataBinder.Eval(Container.DataItem, "SchSkill1") %>'
                                           Width="450px" runat="server"></asp:TextBox>
                                       <br />
                                       <asp:TextBox ID="txtSchSkill2" Text='<%# DataBinder.Eval(Container.DataItem, "SchSkill2") %>'
                                           Width="450px" runat="server"></asp:TextBox>
                                   </ItemTemplate>
                               </telerik:GridTemplateColumn>
                               <telerik:GridTemplateColumn UniqueName="SchSectionTemp" HeaderText="SchSectionTemp"
                                   Visible="false">
                                   <HeaderStyle BackColor="#941922" Width="40px" />
                                   <ItemTemplate>
                                       <asp:TextBox ID="txtSchSection1" Text='<%# DataBinder.Eval(Container.DataItem, "SchSection1") %>'
                                           Width="450px" runat="server"></asp:TextBox>
                                       <br />
                                       <asp:TextBox ID="txtSchSection2" Text='<%# DataBinder.Eval(Container.DataItem, "SchSection2") %>'
                                           Width="450px" runat="server"></asp:TextBox>
                                   </ItemTemplate>
                               </telerik:GridTemplateColumn>--%>
                               <telerik:GridBoundColumn UniqueName="TxnRemarks" HeaderText="Remarks" DataField="TxnRemarks">
                                   <HeaderStyle BackColor="#941922" Width="360px" />
                               </telerik:GridBoundColumn>
                               <telerik:GridBoundColumn UniqueName="ClockIn" ReadOnly="true" HeaderText="Clk1" DataField="ClockIn1"
                                   DataFormatString="{0:HH:mm}">
                                   <ItemStyle BackColor="#F6EFD7"></ItemStyle>
                                   <HeaderStyle BackColor="#941922" Width="45px" />
                               </telerik:GridBoundColumn>
                               <telerik:GridBoundColumn UniqueName="ClockOut" ReadOnly="true" HeaderText="Clk2"
                                   DataField="ClockOut1" DataFormatString="{0:HH:mm}">
                                   <ItemStyle BackColor="#F6EFD7"></ItemStyle>
                                   <HeaderStyle BackColor="#941922" Width="45px" />
                               </telerik:GridBoundColumn>
                               <telerik:GridBoundColumn UniqueName="ClockIn2" ReadOnly="true" HeaderText="Clk3"
                                   DataField="ClockIn2" DataFormatString="{0:HH:mm}">
                                   <ItemStyle BackColor="#F6EFD7"></ItemStyle>
                                   <HeaderStyle BackColor="#941922" Width="45px" />
                               </telerik:GridBoundColumn>
                               <telerik:GridBoundColumn UniqueName="ClockOut2" ReadOnly="true" HeaderText="Clk4"
                                   DataField="ClockOut2" DataFormatString="{0:HH:mm}">
                                   <ItemStyle BackColor="#F6EFD7"></ItemStyle>
                                   <HeaderStyle BackColor="#941922" Width="45px" />
                               </telerik:GridBoundColumn>
                               <telerik:GridBoundColumn UniqueName="ClockIn3" ReadOnly="true" HeaderText="Clk5"
                                   DataField="ClockIn3" DataFormatString="{0:HH:mm}">
                                   <ItemStyle BackColor="#F6EFD7"></ItemStyle>
                                   <HeaderStyle BackColor="#941922" Width="45px" />
                               </telerik:GridBoundColumn>
                               <telerik:GridBoundColumn UniqueName="ClockOut3" ReadOnly="true" HeaderText="Clk6"
                                   DataField="ClockOut3" DataFormatString="{0:HH:mm}">
                                   <ItemStyle BackColor="#F6EFD7"></ItemStyle>
                                   <HeaderStyle BackColor="#941922" Width="45px" />
                               </telerik:GridBoundColumn>
                               <telerik:GridBoundColumn UniqueName="ClockIn4" ReadOnly="true" HeaderText="Clk7"
                                   DataField="ClockIn4" DataFormatString="{0:HH:mm}">
                                   <ItemStyle BackColor="#F6EFD7"></ItemStyle>
                                   <HeaderStyle BackColor="#941922" Width="45px" />
                               </telerik:GridBoundColumn>
                               <telerik:GridBoundColumn UniqueName="ClockOut4" ReadOnly="true" HeaderText="Clk8"
                                   DataField="ClockOut4" DataFormatString="{0:HH:mm}">
                                   <ItemStyle BackColor="#F6EFD7"></ItemStyle>
                                   <HeaderStyle BackColor="#941922" Width="45px" />
                               </telerik:GridBoundColumn>
                               <telerik:GridBoundColumn UniqueName="ClockIn5" ReadOnly="true" HeaderText="Clk9"
                                   DataField="ClockIn5" DataFormatString="{0:HH:mm}">
                                   <ItemStyle BackColor="#F6EFD7"></ItemStyle>
                                   <HeaderStyle BackColor="#941922" Width="45px" />
                               </telerik:GridBoundColumn>
                               <telerik:GridBoundColumn UniqueName="ClockOut5" ReadOnly="true" HeaderText="Clk10"
                                   DataField="ClockOut5" DataFormatString="{0:HH:mm}">
                                   <ItemStyle BackColor="#F6EFD7"></ItemStyle>
                                   <HeaderStyle BackColor="#941922" Width="45px" />
                               </telerik:GridBoundColumn>
                               <telerik:GridBoundColumn UniqueName="ClockIn6" ReadOnly="true" HeaderText="Clk11"
                                   DataField="ClockIn6" DataFormatString="{0:HH:mm}">
                                   <ItemStyle BackColor="#F6EFD7"></ItemStyle>
                                   <HeaderStyle BackColor="#941922" Width="45px" />
                               </telerik:GridBoundColumn>
                               <telerik:GridBoundColumn UniqueName="ClockOut6" ReadOnly="true" HeaderText="Clk12"
                                   DataField="ClockOut6" DataFormatString="{0:HH:mm}">
                                   <ItemStyle BackColor="#F6EFD7"></ItemStyle>
                                   <HeaderStyle BackColor="#941922" Width="45px" />
                               </telerik:GridBoundColumn>
                               <telerik:GridBoundColumn UniqueName="ClockIn7" ReadOnly="true" HeaderText="Clk13"
                                   DataField="ClockIn7" DataFormatString="{0:HH:mm}">
                                   <ItemStyle BackColor="#F6EFD7"></ItemStyle>
                                   <HeaderStyle BackColor="#941922" Width="45px" />
                               </telerik:GridBoundColumn>
                               <telerik:GridBoundColumn UniqueName="ClockOut7" ReadOnly="true" HeaderText="Clk14"
                                   DataField="ClockOut7" DataFormatString="{0:HH:mm}">
                                   <ItemStyle BackColor="#F6EFD7"></ItemStyle>
                                   <HeaderStyle BackColor="#941922" Width="45px" />
                               </telerik:GridBoundColumn>
                               <telerik:GridBoundColumn UniqueName="ClockIn8" ReadOnly="true" HeaderText="Clk15"
                                   DataField="ClockIn8" DataFormatString="{0:HH:mm}">
                                   <ItemStyle BackColor="#F6EFD7"></ItemStyle>
                                   <HeaderStyle BackColor="#941922" Width="45px" />
                               </telerik:GridBoundColumn>
                               <telerik:GridBoundColumn UniqueName="ClockOut8" ReadOnly="true" HeaderText="Clk16"
                                   DataField="ClockOut8" DataFormatString="{0:HH:mm}">
                                   <ItemStyle BackColor="#F6EFD7"></ItemStyle>
                                   <HeaderStyle BackColor="#941922" Width="45px" />
                               </telerik:GridBoundColumn>
                           </Columns>
                       </MasterTableView>
                       <PagerStyle AlwaysVisible="true" />
                   </telerik:RadGrid>


Best regards,
Ei Wai
Eyup
Telerik team
 answered on 15 Apr 2015
2 answers
63 views

I have created a radgrid hierarchy in which I have set

TestGrid2.ClientSettings.Selecting.CellSelectionMode = GridCellSelectionMode.SingleCell;

 When I press the enter key the grid expands instead of entering edit mode. I have tried to intercept the expand to manually enter edit mode, but it while I can execute javascript before the expanding I can't seem to stop it.
I have tried the approach from this article and from RvdGrint in this forum post

I hope some one is able to help

 

Regards

Casper

Eyup
Telerik team
 answered on 15 Apr 2015
4 answers
245 views
Hello,

I'm using the rad controls radial gauge and have 4 ranges of various colors in the gauge.  My issue is that the color bands appear very thin.  Is it possible to adjust the thickness of these bands so they are more easily visible?  Thanks.

Greg
Danail Vasilev
Telerik team
 answered on 15 Apr 2015
1 answer
69 views

Hi

I have a Grid with batch edit mode .The user fill grid rows then press save button.Then a valdation occurs on server side for code duplication chek .How we can restore grid rows(items) after postback and validation fails?

 

Thanks very much.

 

Maria Ilieva
Telerik team
 answered on 15 Apr 2015
1 answer
473 views

i am trying to set the rowheight of RadGrid to eg. 20 px.

RadGrid provides a property: mastertableview.itemstyle.height

but this doesnt work :-)

Is there any possibility to set RadGrids rowheight to fixed heigth???

 

Thanks in advance.

Alexander
Top achievements
Rank 1
 answered on 14 Apr 2015
2 answers
165 views
I've got a TabStrip that is generated dynamically server side.  With this, all the tabs start out disabled and I have a Next/Previous button setup so that as you click Next, it enables the next tab and selects it.

As I click the Next button, it does not seem the show any contents for the tab which was odd.  But, as I go through, the selection of the tabs seems to work fine.  If I click on a tab to jump to it after it's been enabled, I see the contents just fine. ( TabClick Event ).

So, I took a look and during inspection, all of my content is on the page, but it looks like the server side selection ( tab.Selected = true ) isn't removing the class="rmpHiddenView" from the tab, so it's never visible.

Thoughts?

Guillermo
Top achievements
Rank 1
 answered on 14 Apr 2015
1 answer
83 views

The following code doesn't work - it doesn't cause the controls to fire their client-side events in edit mode - any thoughts?

 CS:

protected void rgRepricingApproval_ItemCreated(object sender, GridItemEventArgs e)
        {
            if (e.Item is GridEditableItem && e.Item.IsInEditMode)
            {
                GridEditableItem item = (GridEditableItem)e.Item;
 
                GridEditManager editMan = item.EditManager;
                 
                GridNumericColumnEditor editorAgreedSellPrice = (GridNumericColumnEditor)editMan.GetColumnEditor("AgreedSellPrice");
                RadNumericTextBox txtAgreedSellPrice = editorAgreedSellPrice.NumericTextBox;
                txtAgreedSellPrice.ClientEvents.OnValueChanged += string.Format("return ToggleValues({0});", e.Item.ItemIndex);
 
                RadDropDownList rcbHibernate = (RadDropDownList)item.FindControl("ddlHibernateID");               
                rcbHibernate.OnClientSelectedIndexChanged += string.Format("return ToggleValues({0});", e.Item.ItemIndex);
 
                // ONLY THIS WORKS (non-Telerik)
                CheckBox chkIsError = (CheckBox)item.FindControl("chkIsError");
                chkIsError.Attributes["onchange"] += string.Format("return ToggleValues({0});", e.Item.ItemIndex);
            }           
        }

 

 ASPX:

 

<telerik:GridNumericColumn HeaderText="Agreed Sell Price" UniqueName="AgreedSellPrice" DataField="AgreedSellPrice" NumericType="Currency" DecimalDigits="3" ColumnEditorID="ceAgreedSellPrice">
                    <HeaderStyle Width="120px" />
                    <ItemStyle Width="120px" />
                </telerik:GridNumericColumn>               
                <telerik:GridTemplateColumn HeaderText="Hibernate Period" UniqueName="HibernateID" DataField="HibernateID" ConvertEmptyStringToNull="true">
                    <HeaderStyle Width="110px" CssClass="headerHibernate" />
                    <ItemStyle Width="110px" Height="50px" />
                    <ItemTemplate>
                        <asp:Label runat="server" ID="lblHibernate" Text='<%# Eval("Hibernate.HibernateText") %>' />
                    </ItemTemplate>
                    <EditItemTemplate>
                        <telerik:RadDropDownList runat="server" ID="ddlHibernateID" AppendDataBoundItems="true" DataSourceID="edsHibernate" DataValueField="HibernateID" DataTextField="HibernateText">
                            <Items>
                                <telerik:DropDownListItem Value="" Text="" />
                            </Items>
                        </telerik:RadDropDownList>
                    </EditItemTemplate>
                </telerik:GridTemplateColumn>
                <telerik:GridTemplateColumn HeaderText="Error?" UniqueName="Error" AllowSorting="false" AllowFiltering="false">
                    <HeaderStyle Width="60px" CssClass="headerError" />
                    <ItemStyle Width="60px" HorizontalAlign="Center" />
                    <ItemTemplate>
                        <asp:CheckBox ID="chkIsError" runat="server" />
                    </ItemTemplate>
                </telerik:GridTemplateColumn>
                <telerik:GridTemplateColumn HeaderText="Error Reason" UniqueName="ErrorReason" DataField="ErrorReason">
                    <HeaderStyle Width="200px" CssClass="headerError" />
                    <ItemStyle Width="200px" />
                    <ItemTemplate>
                        <asp:TextBox ID="txtErrorReason" runat="server" TextMode="MultiLine" Columns="20" Rows="2" Enabled="false" />
                    </ItemTemplate>
                </telerik:GridTemplateColumn>

 All items are in edit mode:

 

protected void rgRepricingApproval_PreRender(object sender, EventArgs e)
        {
            for (int i = 0; i < rgRepricingApproval.MasterTableView.PageSize; i++)
            {
                rgRepricingApproval.EditIndexes.Add(i);
            }

            rgRepricingApproval.Rebind();
        }

Viktor Tachev
Telerik team
 answered on 14 Apr 2015
Narrow your results
Selected tags
Tags
+? more
Top users last month
Anislav
Top achievements
Rank 6
Silver
Bronze
Bronze
Jianxian
Top achievements
Rank 1
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Jim
Top achievements
Rank 2
Iron
Iron
Nurik
Top achievements
Rank 2
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Anislav
Top achievements
Rank 6
Silver
Bronze
Bronze
Jianxian
Top achievements
Rank 1
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Jim
Top achievements
Rank 2
Iron
Iron
Nurik
Top achievements
Rank 2
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?