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

i am using telerik 2009.20 version ajax aspnet toolkit..

i have a gridview which is binded via dataset at Runtime in Need Datasource Event of RadGrid. with this binding i am binding two checkboxes also based on some condition.. and these two columns are taken as template columns.. i want to search the grid like if a user has selected one checkbox and presses ENTER key, he must see the grid that has only checked values corresponding to the checkbox.

Please help ASAP.

Thanks



Shinu
Top achievements
Rank 2
 answered on 20 Aug 2009
1 answer
100 views
Hi,

I have a TabStrip with 2 tabs. On each tab, there is a refresh button, and a RadGrid. When you hit the refresh button on the tab, it will do the following: (retrieves data + re-binds to grid)

  function bLoadPrices_OnClientClick(sender,args){
            QTXClient.WebServices.MonitorWebService.GetMonitorData(bLoadPrices_Complete,bLoadPrices_Error);
        }
        
         function bLoadPrices_Complete(result){
            var tableView = $find("<%= gMonitor.ClientID %>").get_masterTableView();
            tableView.set_dataSource(result);
            tableView.dataBind(); 
        }
        function bLoadPrices_Error(result){
            window.alert("Error! " + result);
        }

The problem I am having is that when I rebind the data on 1 grid, it clears all data from the other grid. I don't understand why re-binding one grid will cause the other grid to refresh? 

Please help!


thanks,
sharon

elmosi
Top achievements
Rank 2
 answered on 20 Aug 2009
2 answers
195 views
hi,

i have a radgrid in my aspx page. The default sorting is not working.

below is the code

in aspx

<

 

telerik:RadGrid ID="rgPParts" DataSourceID="dsParts" Width="675px" Height='<%# SetHeight() %>'

 

 

AutoGenerateColumns="False" GridLines="None" AllowPaging="True" PageSize="30"

 

 

runat="server" CellPadding="0" OnItemDataBound="rgPParts_ItemDataBound" OnSelectedIndexChanged="rgPParts_SelectedIndexChanged"

 

 

Skin="" EnableEmbeddedSkins="False" ImagesPath="~\Images\Grid\" CssClass="grid"

 

 

OnPreRender="rgPParts_PreRender" AllowSorting="True" OnPageIndexChanged="rgPParts_PageIndexChanged">

 

 

<PagerStyle Position="Bottom" Mode="NextPrevAndNumeric" PagerTextFormat="{4} Showing {2}-{3} of {5}"

 

 

CssClass="gridpager" />

 

 

<MasterTableView AllowPaging="true" DataKeyNames="SkuId">

 

 

 

<HeaderStyle CssClass="gridheaderstyle"></HeaderStyle>

 

 

<Columns>

 

 

<telerik:GridBoundColumn HeaderText="PN" DataField="PartNumber">

 

 

<HeaderStyle Width="80px"></HeaderStyle>

 

 

<ItemStyle Width="80px"></ItemStyle>

 

 

</telerik:GridBoundColumn>

 

 

<telerik:GridBoundColumn HeaderText="DESC" DataField="Description">

 

 

<HeaderStyle Width="108px"></HeaderStyle>

 

 

<ItemStyle Width="108px"></ItemStyle>

 

 

</telerik:GridBoundColumn>

 

 

<telerik:GridBoundColumn HeaderText="CD" DataField="Condition">

 

 

<HeaderStyle Width="30px"></HeaderStyle>

 

 

<ItemStyle Width="30px"></ItemStyle>

 

 

</telerik:GridBoundColumn>

 

 

<telerik:GridBoundColumn HeaderText="WH" DataField="WarehouseId" AllowSorting="false">

 

 

<HeaderStyle Width="60px"></HeaderStyle>

 

 

<ItemStyle Width="60px"></ItemStyle>

 

 

</telerik:GridBoundColumn>

 

 

<telerik:GridBoundColumn HeaderText="Q" DataField="Quantity">

 

 

<HeaderStyle Width="60px"></HeaderStyle>

 

 

<ItemStyle Width="60px"></ItemStyle>

 

 

</telerik:GridBoundColumn>

 

 

<telerik:GridBoundColumn HeaderText="QA" DataField="QuantityAvailable">

 

 

<HeaderStyle Width="60px"></HeaderStyle>

 

 

<ItemStyle Width="60px"></ItemStyle>

 

 

</telerik:GridBoundColumn>

 

 

<telerik:GridBoundColumn HeaderText="CST" DataField="AverageCostPrice" AllowSorting="false">

 

 

<HeaderStyle Width="60px"></HeaderStyle>

 

 

<ItemStyle Width="60px"></ItemStyle>

 

 

</telerik:GridBoundColumn>

 

 

<telerik:GridBoundColumn HeaderText="LST" DataField="ListPrice" AllowSorting="false">

 

 

<HeaderStyle Width="60px"></HeaderStyle>

 

 

<ItemStyle Width="60px"></ItemStyle>

 

 

</telerik:GridBoundColumn>

 

 

<telerik:GridBoundColumn HeaderText="WS" DataField="WholesalePrice" AllowSorting="false">

 

 

<HeaderStyle Width="60px"></HeaderStyle>

 

 

<ItemStyle Width="60px"></ItemStyle>

 

 

</telerik:GridBoundColumn>

 

 

<telerik:GridBoundColumn HeaderText="RT" DataField="RetailPrice" AllowSorting="false">

 

 

 

</telerik:GridBoundColumn>

 

 

<telerik:GridTemplateColumn HeaderText="" Visible="False">

 

 

<ItemTemplate>

 

 

<asp:Label ID="lblType" runat="server" Text='<%# Bind("InventoryType") %>' Visible="false">

 

 

</asp:Label>

 

 

</ItemTemplate>

 

 

</telerik:GridTemplateColumn>

 

 

</Columns>

 

 

</MasterTableView>

 

 

<SelectedItemStyle BackColor="#FFFFCC" />

 

 

<ClientSettings EnablePostBackOnRowClick="true">

 

 

<Scrolling AllowScroll="True" UseStaticHeaders="true" ScrollHeight="260" />

 

 

<Selecting AllowRowSelect="true" />

 

 

</ClientSettings>

 

 

<SortingSettings SortToolTip="" />

 

 

<ActiveItemStyle BackColor="#FFFFCC" />

 

 

<CommandItemStyle BorderColor="White" HorizontalAlign="Right" />

 

 

</telerik:RadGrid>

 

<

 

csla:CslaDataSource ID="dsParts" runat="server" TypeName="Cis.Cims.Library.Vendor"

 

 

 

 

 

TypeSupportsPaging="false" TypeSupportsSorting="true" OnSelectObject="dsParts_SelectObject">

 

 

 

 

 

</csla:CslaDataSource>

in Codebehind

 

 

protected void dsParts_SelectObject(object sender, Csla.Web.SelectObjectArgs e)

 

{

 

try

 

 

 

 

{

 

if (Page.IsPostBack)

 

{

e.BusinessObject = GetParts();

}

}

 

catch (Exception ex)

 

{

lblSystemMessage.Text = ex.Message;

}

}

 

private

 

InventoryInfoList GetParts()

 

{

 

InventoryInfoList invenInfoList = SessionHelper.SessionBusinessObjectsInfo.InventoryInfoListBusinessObject;

 

 

try

 

 

 

 

 

{

 

 

if (invenInfoList == null)

 

{

 

rgPParts.CurrentPageIndex = 0;

 

 

 

 

 

 

 

 

string PCategory = ClassificationMenu1.ClassificationText;

 

 

if (PCategory.ToUpper() == "ALL")

 

{

PCategory =

"";

 

}

 

 

 

 

 

invenInfoList =

InventoryInfoList.GetPartsBySearch(ddlVendor.SelectedValue, txtPartNumber.Text.Trim(), GlobalHelper.ReplaceEscapeChars(txtKeywords.Text.Trim()), Convert.ToInt32(ddlCondition.SelectedValue.Trim()), PCategory);

 

 

SessionHelper.SessionBusinessObjectsInfo.InventoryInfoListBusinessObject = invenInfoList;

 

 

 

 

 

}

 

catch (Exception ex)

 

{

 

throw ex;

 

}

 

return invenInfoList;

 

}

i dont know where i have made mistake any help on this will be greatly appreciated.

Prakash
Top achievements
Rank 1
 answered on 20 Aug 2009
2 answers
132 views
 I believe Telerik should correct this issue. You should be able to click a row without it affecting the rest of the other rows.

If the row clicked is already selected, the it should deselect that row (only), and vice versa, if it's deselected already then it should select that row only.

I CAN'T STAND IT when I have selected 20 rows and then when I accidently click outside a checkbox, I loose all my selections. I have the following radgrid, please show me if there is a way, how to achieve this. I already tried the ToggleSelection.js solution, but I get alot of errors because it was not designed for Heirarchy Grid.

 

<telerik:RadGrid ID="rgChildObjects" AllowMultiRowSelection="true" AutoGenerateColumns="false" Width="295px" runat="server">

 

 

 

<MasterTableView HierarchyDefaultExpanded="false" HierarchyLoadMode="client" Name="ChildObjects" DataKeyNames="ReportingChildObjectID">

 

 

 

<DetailTables>

 

 

 

<telerik:GridTableView Name="Columns" Width="100%" ShowHeader="true" DataKeyNames="ReportingColumnID">

 

 

 

<Columns>

 

 

 

<telerik:GridClientSelectColumn />

 

 

 

<telerik:GridBoundColumn HeaderStyle-Font-Bold="true" itemstyle-wrap="false" UniqueName="DefaultDescription" DataField="DefaultDescription" HeaderText="Child Report Column(s)" />

 

 

 

</Columns>

 

 

 

</telerik:GridTableView>

 

 

 

</DetailTables>

 

 

 

<Columns>

 

 

 

<telerik:GridBoundColumn ItemStyle-font-bold="true" HeaderStyle-Font-Bold="true" HeaderStyle-wrap="false" UniqueName="ChildObjectName" DataField="ChildObjectName" HeaderText="Child Reports" />

 

 

 

</Columns>

 

 

 

</MasterTableView>

 

 

 

<ClientSettings AllowExpandCollapse="true">

 

 

 

 

<Selecting EnableDragToSelectRows="false" AllowRowSelect="true" />

 

 

 

</ClientSettings>

 

 

 

</telerik:RadGrid>

Felipe Saldana
Top achievements
Rank 1
 answered on 19 Aug 2009
2 answers
151 views
I have read over the existing documentation and searched in the forums but I cannot seem to find a solution

I have a RadGrid that is using the "GroupBy" functionality. I just want to drag and drop a grid item from one group to another.

I capture the OnRowDropping event and this is working fine.
Inside this event I want to retrieve the corresponding DataKey value from the underlying grid so that I can perform a look up and verify that the dragged row is going into a different group.

Does anyone know how to retrieve the DataKey value from the underlying grid for both the target and the dragged item?

I have tried this
http://www.telerik.com/help/aspnet-ajax/grdextractkeyvaluesclientside.html



                    var targetIndex = args.get_targetItemIndexHierarchical(); 
 
                    var targetListingId = $find("ctl00_contentMember_subscriberList_gridList_ctl00").get_dataItems()[targetIndex]; 
 

but targetListingId.getDataKeyValue("subscriberListId") is null.


Any help is appreciated.

Felipe




Felipe Saldana
Top achievements
Rank 1
 answered on 19 Aug 2009
2 answers
218 views

        <telerik:RadEditor ID="RadEditorRodape" runat="server" Width="100%" Height="150px"
            EditModes="Design, Html" ToolsFile="~/Controles/EditorConfigRodape.xml" EnableResize="false" Language="pt-BR">
            <Paragraphs>
                <telerik:EditorParagraph Tag="<h1>" Title="Titulo 1" />
                <telerik:EditorParagraph Tag="<h2>" Title="Titulo 2" />
                <telerik:EditorParagraph Tag="<h3>" Title="Titulo 3" />
                <telerik:EditorParagraph Tag="<h4>" Title="Titulo 4" />
                <telerik:EditorParagraph Tag="<h5>" Title="Titulo 5" />
            </Paragraphs>
            <Content>
            </Content>
        </telerik:RadEditor>

Files resx is in folder App_GlobalResources.

Language remains in english. 

Who knows what happens? Why not work?

Tks,


Yoly
Top achievements
Rank 2
 answered on 19 Aug 2009
1 answer
118 views
Hello,
I'm trying to build a page with RadScheduler and encounters issues with datatype 'date'.  Could some one give some help please?  Thank you in advance. 

Windows XP Pro
Visual Studio 2005
MS SQL 2005

Scenario:
1. Setup database structure for Appointments/Rooms/Users Tables  (Followed provided example from Telerik)
2. Build the page (Copy most of the sample code from Telerik)
3. Page loads the scheduler, enter information for a time slot, click "Save" button and get this error below:

 

Server Error in '/server' Application.

The version of SQL Server in use does not support datatype 'date'.

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.ArgumentException: The version of SQL Server in use does not support datatype 'date'.

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Stack Trace:

[ArgumentException: The version of SQL Server in use does not support datatype 'date'.]
   Telerik.Web.UI.Scheduling.DataSourceViewSchedulerProvider.OnDataSourceOperationComplete(Int32 count, Exception e) +16
   System.Web.UI.DataSourceView.Insert(IDictionary values, DataSourceViewOperationCallback callback) +73
   Telerik.Web.UI.Scheduling.DataSourceViewSchedulerProvider.Insert(RadScheduler owner, Appointment appointmentToInsert) +130
   Telerik.Web.UI.Scheduling.AppointmentController.InsertAppointmentThroughProvider(Appointment appointment) +32
   Telerik.Web.UI.RadScheduler.ProcessPostBackCommand(SchedulerPostBackEvent postBack) +182
   Telerik.Web.UI.RadScheduler.RaisePostBackEvent(String eventArgument) +62
   Telerik.Web.UI.RadScheduler.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +10
   System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +13
   System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +170
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +2863
Bao Tonthat
Top achievements
Rank 1
 answered on 19 Aug 2009
1 answer
320 views
I am creating a grid dynamically within the Page_Init event.  Within my grid I have a GridTemplateColumn that has a Textbox in it.  In order to do this I created a GridTemplateColumn_TextBox class.

I want to add an event handler to the TextChanged event.  I can do this from within my GridTemplateColumn_Textbox class and everything works fine (ie. AddHandler txtBox.TextChanged, AddressOf txtBox_TextChanged)

The problem is that I don't want to add it from within my class, because I want my class to be a very generic class that I can use whenever I want to add this particular GridTemplateColumn to a grid, but the particular event handler in question is very specific to one particular page.

Is there a way to get a reference to the Textbox within my GridTemplateColumn and add my event handler from within my page itself instead of the class?

Hopefully I'm clear as to what I'm trying to do.  If not, please let me know.

Thanks.

Steve
Daniel
Telerik team
 answered on 19 Aug 2009
4 answers
263 views
Hi,

What I'm trying to do is programatically create anywhere from 5-15 comboboxes on a page (number will vary based on user information).  While this part is easy enough, I also have need to make them related.  If I were dropping the control on the page, I'd be using the OnItemsRequested method, but since I'm doing this programmatically and the method is Protected, I'm stuck.

Here's what I've attempted:

 
Dim cmbo As New RadComboBox
cmbo.ID = "cmboTest"
cmbo.OnClientItemsRequested = "" 'Telerik.Web.UI.RadComboBox.Protected Overrideable Sub OnItemsRequested(...) is not accessible in this context because it is Protected.
cmbo.EnableLoadOnDemand = True  
cmbo.DataSource = GetValues("Test")
cmbo.DataBind()

 

Rajesh Meenrajan
Top achievements
Rank 1
 answered on 19 Aug 2009
0 answers
74 views
Hi,

Q2.2009.
I have problems to fire my RadTimePicker and returning the value in the Box. After each selected item over highlighted item (<a>) my page scroll and no time is returned in the box. I have used clients events and in this case my events not fire. I have tested many configurations and have this problem every time. I need to select the items between the highlighted item and the border ( only in the left or right borders). In this case the item fire and return the value but is not possible to work in this case need to push between 2 or 3px in borders. I have observed the html and styles and suspect some problem with <a>items like <a href="#">13:00</a>. Could you suggest some solution please.

regards Romi.

<div class="boxLunVen"> 
                <div class="boton1"><img  alt='' src="../VistaStatic/images/Submenu/configurador1/semana.png" /></div> 
                <div class="time"> 
                <telerik:RadTimePicker ID="RadTimeInLunVen" runat="server" style="vertical-align:middle;" Width="60px" 
                         StartTime="13:0:0" EndTime="22:31:00" Interval="0:30:0" Columns="2" TimeFormat="HH:mm" Culture="es-ES"    
                         DateFormat="HH:mm" OnClientTimeSelected="OnTimeSelectedSem">      
                </telerik:RadTimePicker> 
                <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ErrorMessage="*" ControlToValidate="RadTimeInLunVen" ValidationGroup="group1"></asp:RequiredFieldValidator> 
                </div> 
                <div class="clear"></div>  
                
            </div> 
            <div class="boxSamedi"> 
                <div class="boton1"><img  alt='' src="../VistaStatic/images/Submenu/configurador1/weekend.png" /></div> 
                <div class="time"> 
                <telerik:RadTimePicker ID="RadTimeInSamedi" runat="server" style="vertical-align:middle;" Width="60px"> 
                        <ClientEvents OnPopupClosing="OnPopupClosing" /> 
                        <TimeView StartTime="13:0:0" EndTime="22:31:00" Interval="0:30:0" Columns="2" TimeFormat="HH:mm" Culture="en-US" OnClientTimeSelected="OnTimeSelected" runat="server">  
                        </TimeView> 
                        <DateInput DateFormat="HH:mm" Culture="en-US" runat="server"></DateInput>    
                </telerik:RadTimePicker> 
                <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" ErrorMessage="*" ControlToValidate="RadTimeInSamedi" ValidationGroup="group1"></asp:RequiredFieldValidator> 
           
                </div> 
                <div class="clear"></div>  
                 
            </div> 

Pierre
Top achievements
Rank 1
 asked on 19 Aug 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?