Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
141 views

 

Hi,

I have replaced the rad prometheus grid to new telerik (ASPNETAJAX grid) but it is giving me error in the below code.

Please assist.

private void insertRecord(GridCommandEventArgs e)

{

string args = string.Empty;

// Get the Exam Id

if (e.Item.OwnerTableView.Name == "Detractions")

{

GridDataItem parentExam = e.Item.OwnerTableView.ParentItem;

args = string.Format("\"Detractions/Edit.aspx?eid={0}\", \"DetractionDialog\"",

parentExam.OwnerTableView.DataKeyValues[parentExam.ItemIndex]["ID"].ToString());

}

else

{

args = "\"Edit.aspx\", \"ExamDialog\"";

}

// Create the script to open the editor window

 grdExams.ResponseScripts.Clear();//error  grdExams.ResponseScripts.Add(string.Format("window.radopen({0});", args)); //error

}

//Error

'Telerik.Web.UI.RadGrid' does not contain a definition for 'ResponseScripts' and no extension method 'ResponseScripts' accepting a first argument of type 'Telerik.Web.UI.RadGrid' could be found (are you missing a using directive or an assembly reference?) 

Thanks
vivek

Vlad
Telerik team
 answered on 19 May 2008
1 answer
133 views

Is it just me, or does anyone think it would be nice if you had access to the old value of the Text property as well as the new one in the Serverside TextChanged event?

-- 

Stuart

Dan
Top achievements
Rank 1
 answered on 19 May 2008
4 answers
160 views
Hi,

Can you disable dates prior todays date?  I dont wan the user being able to backdate a record.  Is this possible?

Thanks,

JK
JK
Top achievements
Rank 1
 answered on 19 May 2008
0 answers
124 views
Dear All,

I am implementing a dynamic change of the site theme.
My point is that; 
If I need to create/have custom images and those to be loaded according to the current selected theme for any RadControl that support images like Menu/Grid/ etc .... and if this control is placed inside User Control

How can I assign these Images to RadControls in this case.

I tried for RadMenu to do this:
ClickedImageUrl="App_Themes/<%= Page.Theme %>/Menu/Img/arrow.gif"

But it isn't working ...

Any Ideas
Best regards
Waleed
Waleed Seada
Top achievements
Rank 2
 asked on 19 May 2008
1 answer
107 views
I have a DataTable that is pivoted.  I would like to be able to retrieve the associated ID for an item within a particular cell.  Since the Data is pivoted once it's attached to the RadView, the ID fields show up in a column, rather than with each individual field.  Is it possible to retrieve this from the grid?  I should note also that I am using dynamically created template columns.

Within my template column I am including a popup extender control and wish to set the behavior id to the unique id of the field being bound.
Princy
Top achievements
Rank 2
 answered on 19 May 2008
1 answer
169 views
I'm having trouble understanding just how to use the selected value of a Combobox to display the correct data in a grid.


I have worked through this example but still my code is missing something:

http://www.telerik.com/DEMOS/ASPNET/Prometheus/Controls/Examples/Integration/GridComboAjax/DefaultCS.aspx?product=grid


It only works if I define a default value in the SQLDataSource's wizard.

Any ideas?

Here is my code:

                <telerik:radcombobox id="cboTime" runat="server" skin="Vista" DataSourceID="SqlTime"  DataTextField="sTimeId" AutoPostBack="True">  
                    <CollapseAnimation Type="OutQuint" Duration="200"></CollapseAnimation> 
                </telerik:radcombobox>    
 
 
    <telerik:RadGrid ID="grdGrid" runat="server" DataSourceID="Sqlgrid" GridLines="None" Skin="Vista" AllowSorting="True" AllowPaging="True">  
        <MasterTableView DataSourceID="Sqlgrid">  
            <RowIndicatorColumn Visible="False">  
                <HeaderStyle Width="20px" /> 
            </RowIndicatorColumn> 
            <ExpandCollapseColumn Resizable="False" Visible="False">  
                <HeaderStyle Width="20px" /> 
            </ExpandCollapseColumn> 
            <EditFormSettings> 
                <PopUpSettings ScrollBars="None" /> 
            </EditFormSettings> 
        </MasterTableView> 
        <ClientSettings> 
            <Selecting AllowRowSelect="True" /> 
        </ClientSettings> 
    </telerik:RadGrid> 
 
    <asp:SqlDataSource ID="Sqlgrid" runat="server" ConnectionString="<%$ ConnectionStrings:MyDbConnectionString %>" 
        SelectCommand="Get_TimeTest" SelectCommandType="StoredProcedure">  
        <SelectParameters> 
            <asp:ControlParameter ControlID="cboTime" Direction="InputOutput" 
                Name="sTimeId" PropertyName="SelectedValue" Type="String" /> 
        </SelectParameters> 
    </asp:SqlDataSource> 
 
    <asp:SqlDataSource id="SqlTime" runat="server" SelectCommand="SELECT [sTimeId] FROM [Times]"   
    ConnectionString="<%$ ConnectionStrings:MyDBConnectionString2 %>">  
    </asp:SqlDataSource>      
</asp:Content> 

Sebastian
Telerik team
 answered on 19 May 2008
3 answers
122 views
I am trying to perform some simple data validation of the nodes on client-side editing. The purpose is to disallow two items with the same parent and matching names. I handle OnClientNodeEditing and, if the validation fails, call startEdit() of the edited node.
function RadTreeView1_OnClientNodeEditing(sender, eventArgs) 
{ 
    var node = eventArgs.get_node(); 
    var oldText = node.get_text(); 
    var newText = eventArgs.get_newText(); 
    var siblings = node.get_parent().get_nodes(); 
 
    for(i = 0; i < siblings.get_count(); i++) 
    { 
        var currNode = siblings.getNode(i); 
        if(currNode != node && currNode.get_text() == newText) 
        { 
            alert('A folder with the given name already exists.'); 
            node.set_text(oldText); 
            node.startEdit(); 
            eventArgs.set_cancel(true); 
            return; 
        } 
    } 
    node.set_text(newText); 
    node.set_postBack(true); 
}            
Calling startEdit() shows an edit element on top of the node, looking like a standard EditBox element, not the usual behavior when editing a node. Apart from that, the text in that edit box is selected and can be edited, but pressing Enter or clicking outside the node doesn't cancel edit mode, but does its normal behavior (for example, if clicking on another node, its NodeClick event is fired). Keyboard focus is also not in that edit box element, but on the tree, so pressing the arrow keys navigates trough the nodes instead of moving the cursor inside the edit box.
If I try to end edit mode with node.endEdit() before starting startEdit() again, it throws a null reference error.
Simon
Telerik team
 answered on 19 May 2008
1 answer
151 views
Hi Guys,
 
      I have 2 dropdowns in a radgrid that are displayed when the grid is in edit mode. Dropdown1 is populated with data and dropdown2 is disabled with one value, "Please select from dropdown1 first". When the user selects from dropdown1, I want to populate dropdown2 based on the dropdown1 selection. I have attached a server side OnIndexChange event to dropdown1 but on postback, the grid does not come back in edit mode. Is my best option to create a client event for dropdown1 that calls a webservice to populate dropdown2. If yes, do you have an example of how to populate a dropdown or a combo box using the webservice manager? What is the proper approach here?

Thanks,
Jayvr
Iana Tsolova
Telerik team
 answered on 19 May 2008
3 answers
291 views
I have this column

<telerik:GridDateTimeColumn DataFormatString="{0:dd.MM.yy}"   
DataField="Datum" PickerType="DatePicker" HeaderText="Datum" UniqueName="Datum">  
</telerik:GridDateTimeColumn> 

When I change the PickerType to "DateTimePicker" and then make an automatic update I get

Laufzeitfehler in Microsoft JScript: Sys.ArgumentUndefinedException: Value cannot be undefined.
Parameter name: baseType

This is in the file ScriptResource line 2127.

Thanks for your attention
Karl
Iana Tsolova
Telerik team
 answered on 19 May 2008
4 answers
323 views
I started out using .NET 3.5's ListView to display products on a page and am missing a lot of features that Telerik controls have out of the box, like ajax, user entered pager settings, in-place editting (for administrators), and skins. My ListView display is simple- just a 3 row by 3 column product display, and each product has an image, name and price on top of each other. Can this be done with GridView or is it overkill for something like this? Is there maybe another Telerik control I should be using?
Dimo
Telerik team
 answered on 19 May 2008
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?