Javascript - Accessing The MasterTableView Edit Form In Radgrid To Get Reference To Textbox?

Mar 11, 2011

accessing the currently edited existing row in the Radgrid, as as well as the index of the Edit form when trying to add a new record to the table/

function OnClientSelectedIndexChanged(sender, eventArgs) {
var item = eventArgs.get_item();
// alert(item.get_value());
grid = $find("<%= rgSecurity.ClientID %>");

[Code]....

View 1 Replies


Similar Messages:

Javascript - Getting ClientID Of Control In RadGrid Edit Form

Aug 16, 2010

I have Telerik RadGrid with a custom edit form. In my edit form there is a RadDatePicker to which I have added a custom footer template containing a 'Today' button. In the OnClick event of the button I call a Javascript function which takes the control ID to set the selected date. However, because the control is inside the edit form there is no variable created for it and the compiler throws an error when I try getting the client ID. The RadDatePicker is declared with:

<telerik:RadDatePicker ID="ControlName" runat="server" SelectedDate='<%# Bind("Field") %>'>
<Calendar ID="Calendar1" runat="server">
<FooterTemplate>
<div style="width: 100%; text-align: center; background-color: Gray;">
<input id="Button1" type="button" value="Today" class="button"
onclick="GoToToday('<%= ControlName.ClientID %>')" />
</div>
</FooterTemplate>
</Calendar>
</telerik:RadDatePicker>

The error I get is CS0103: The name 'ControlName' does not exist in the current context on the line referencing the ClientID. Is there another way in which to get the ID to pass to the Javascript function?

View 3 Replies

Web Forms :: Accessing UserControl TextBox Null Reference?

Jan 20, 2011

I have a .ascx file residing in another page which has a button on it. On click I run a select statement that accesses the textbox for a value.

However, it keeps returning a Null Exception Error. I am trying access the textbox and its text through

[Code]....

I also tried -[Code]....

I also tried -[Code]....

But none of them work. Please can someone advise me how I find the textbox and then access its text?I have looked round the forums / google and cant find a way of doing this!

View 4 Replies

Only Allow One Edit Or Insert In A RadGrid?

Jul 22, 2010

I'm using the Telerik rad grid and I'm allow the user to enter data directly to the grid.

I am using the "EditForms" edit mode and I also allow inserts using the same.

If the user edits a row, then I don't want to allow any other edits or inserts until the current one is complete or cancelled.

View 1 Replies

Jquery - Reference Form By Name In Javascript Using An BeginForm Html Helper

Apr 5, 2011

I'm sure I'm going about this wrong but I'm trying to write a simple javascript method that will set a hidden type value upon a link click. I'm using the Html.BeginForm() helper that contains two links similar to:

@Html.ActionLink("Delete Review Only", "Delete", new { id = Model.ReviewId }, new { onclick = "SetDeleteType(1);" })

<script language="JavaScript" type="text/javascript">
function SetDeleteType(selectedtype) {
document.supportform.deleteType.value = selectedtype;
document.supportform.submit();
}

The supportform name obviously doesn't exists since I'm using BeginForm() and can't specify a form name. Is there a clever way of doing this without calling Forms(0) using jQuery or something or am I completely off?

View 1 Replies

JavaScript Error In IE6 When Opening ASPxGridView Edit Form

Jul 24, 2010

I'm using DevExpress ASPxGridView edit form, using default edit form. However when I open the edit form in IE6 and click "update" to insert the record, it causes a JavaScript error that says "type" is null or not an object". However it works fine in IE7. I am puzzled and unsure of how to resolve this. Code is below.

<dx:ASPxGridView ID="ASPxGridView_JobTitles" runat="server"
AutoGenerateColumns="False" Caption="Titles"
ClientInstanceName="ASPxClientGridView_Titles"
DataSourceID="SqlDataSource_JobTitle" KeyFieldName="Title" Width="500px">
<Settings UseFixedTableLayout="True" />
<Columns>
<dx:GridViewCommandColumn ButtonType="Image" Caption=" " VisibleIndex="0"
Width="65px">
<UpdateButton Visible="True">
<Image Url="~/images/update.png">
</Image>
</UpdateButton>
<CancelButton Visible="True">
<Image Url="~/images/cancel.png">
</Image>
</CancelButton>
<EditButton>
<Image Url="~/images/file_edit.png">
</Image>
</EditButton>
<HeaderTemplate>
<dx:ASPxButton ID="ASPxButton_New0" runat="server" AutoPostBack="false"
Image-Url="~/images/file_add.png" Text="New">
<ClientSideEvents Click="function(s,e){ASPxClientGridView_Titles.AddNewRow();}" />
</dx:ASPxButton>
</HeaderTemplate>
</dx:GridViewCommandColumn>
<dx:GridViewDataTextColumn FieldName="Title" VisibleIndex="1">
<PropertiesTextEdit>
<ValidationSettings CausesValidation="True">
<RequiredField ErrorText="Is Required" IsRequired="True" />
</ValidationSettings>
</PropertiesTextEdit>
</dx:GridViewDataTextColumn>
<dx:GridViewCommandColumn ButtonType="Image" Caption=" " VisibleIndex="2"
Width="65px">
<DeleteButton Visible="True">
<Image Url="~/images/file_delete.png">
</Image>
</DeleteButton>
</dx:GridViewCommandColumn>
</Columns>
<SettingsBehavior ConfirmDelete="True" />
</dx:ASPxGridView>
<asp:SqlDataSource ID="SqlDataSource_Title" runat="server"
ConnectionString="<%$ ConnectionStrings:TEST %>"
SelectCommand="SELECT [Title] FROM [Titles]"
UpdateCommand="UPDATE Titles SET Title = @Title WHERE (Title = Title)"
DeleteCommand="DELETE FROM Titles WHERE (Title = @Title)"
InsertCommand="INSERT INTO Titles(Title) VALUES (@Title)">
<InsertParameters>
<asp:Parameter Name="Title" Type="String" />
</InsertParameters>
<UpdateParameters>
<asp:Parameter Name="Title" Type="String" />
</UpdateParameters>
</asp:SqlDataSource>

View 2 Replies

Radgrid Edit / Update Not Working?

Oct 26, 2010

I'm having a wired problem with Radgrid.. Im using a Radgrid to display some results where the user can edit/update/delete them. I'm using a single SQL Server 2000 table to fetch the results... Not sure why the events are not firing in radgrid. But I am able to do it successfully using the Gridview control... Im using .NET framework 4

Radgrid code

<telerik:RadGrid ID="RadGrid1" runat="server" AutoGenerateColumns="False" AutoGenerateDeleteColumn="True"
AutoGenerateEditColumn="True" DataSourceID="SSDS" GridLines="None" Width="844px"
DataMember="DefaultView">[code]....

View 1 Replies

Set Telerik RadGrid To Edit Mode By Default?

Dec 7, 2010

I have a checkbox column in a RadGrid that I want the user to be able to check/uncheck it and set the attached property. When the grid renders however, the checkboxes are disabled, because the grid is not in "edit mode". All the examples I'm finding want me to go through a lengthy process of selecting the record, putting it into edit mode, changing the value, saving the value.... yada yada yada...I just want the whole grid to be in edit mode (or the column, or whatever works) from the get-go, so the end user can make a one-click change to the data value. I know there must be a way to do this, I just can't seem to find it.

View 1 Replies

Setting A RadGrid To Edit Mode From An External Button?

May 20, 2010

I have a rad grid where I can insert/update and delete items of data. i have set up a CommandItemTemplate with a button that, when clicked will put the grid in edit mode. What I would like to do is have the same functionality but from an external asp.net button. If I can get this button to trigger the adGrid_ItemCommand event then I could get it working. But how do I pass the relevant GridCommandEventArgs from a asp.net button ?

View 1 Replies

Using Telerik RadGrid - How To Set The Date Format For Autogenerated Column In Edit Mode

May 23, 2010

Using VS2008, and Telerik radGrid version 2010.1.519.35

I have a about 50 DNN modules using telerik radgrid and I need to display my dates in dd/mm/yy format. It is possible to do this easily in view mode, but when I switch to edit mode, it is more of a struggle. I can write a snippit of code to reformat the displayed date values to dd/mm/yy, but for inserts the user must enter mm/dd/yy.

IOW, I need to change the culture of the form to en-GB culture.

In my DotnetNuke App, I have made a change to the web.config, but it still assumes en-US format.

I am not sure whether I need to set this at web.config level, page level or at the column within the control.

View 3 Replies

Javascript - Textbox Not Recognized In Gridview Edit Item Template?

Aug 12, 2010

I'm trying to use a calendar control to populate a textbox in a gridview cell in edit mode.

The error is with this line

[Code]....

I added runat="server" to the <a> and now I am not getting an error, but when a date is selected in the calendar control is it not being inserted int the txtGvEditTeDate textbox.

View 2 Replies

.NET Form Name - JavaScript Variables That (sign) Reference "aspnetForm" That Are Broken?

Jul 23, 2010

From what I understand, the id of the master on an ASP.NET page is "aspnetForm". I noticed today that for some reason in one of our pages it's now "form1". What would cause this change? Where should I look for the root cause of this naming change? We've got a lot of JavaScript variables that (sign) reference "aspnetForm" that are now broken.

View 1 Replies

C# - Add Textbox To Telerik Radgrid Confirmation Dialog?

Dec 3, 2010

I need to collect additional information from the user when they initiate a delete on a radgrid. Right now I am presenting the user with a confirmation dialog box that lets them click "OK" to continue but I need to add an additional textbox to collect a reason.

View 1 Replies

C# - Telerik RadGrid - How To Set The MaxLength For The Insert Textbox

Jul 23, 2010

I have a radGrid on the page with the "Add New Record" button. When I click the "Add New Record" button, a textbox appears above each column that allows me to enter values. I want to limit the number of characters that can be entered in the textbox. How do I set the MaxLength of those textboxes

View 1 Replies

How To Refresh Telerik:radgrid Contorl Using Javascript

Oct 5, 2010

How to refresh Telerik:radgrid contorl using Javascript ?

View 2 Replies

Forms Data Controls :: Click To Edit Button Twice In Form View To Change To Edit Mode?

Mar 1, 2010

I have a page where I have a tab container and four tabs. the problem is on the first tab "manage quote request" I have a Gridview with the quote request general informatin listed and have a template field created with a link button to databind to the formview quote details. the porblem comes in when after I click on the select linkbutton. the Formview loads right. Then Whe I try to click on the edit linkbuttin in the form view I have to click it twice to change the mode to edit.

here is the page code:

[Code]....

Here is the Codebehind:

[Code]....

View 1 Replies

Web Forms :: Accessing Panel Control Of One Form In Another Form?

Oct 12, 2010

i friends i am having two forms say form a and formb and having two panels in formb and i want to show this panels from forma based on some condition and the code which i am using is

Dim capfrmobj As New CaptureForm
capfrmobj.panelvf.Visible = True
capfrmobj.pnlc.Visible = False
capfrmobj.pnlnc.Visible = False

then also i am not getting the output

View 1 Replies

Forms Data Controls :: How To Web Form Development - Accessing Data In Form View Control

Aug 4, 2010

I am using a from view for data entry. I need to verify that a check box is true or false after editing a record.

I have been accessing label text using the following|
CType(FormView1.FindControl("RespDeptLabel"), Label).Text

How can I access the state of a checkbox in the form view to determine if it is true or false

View 4 Replies

Controls :: Change Radgrid Header Text When Checked Change With JavaScript

Nov 20, 2012

i have radgrid in my asp.net web page with some columns and rows in each row i have some checkbox that they are in one column. so i have one checkbox in each row and column.

i want when the check box checked, write in header that checkbox(in that column) write the number and so in that row, write the diffrent number. i want it occure client-side.

View 1 Replies

Web Forms :: Code-Behind Null Reference Exception Accessing Controls With Derived PageBase?

Feb 16, 2010

I have a class that derives from System.Web.UI.Page and have set my pages to derive from this custom page class instead of Page. At runtime, the controls are never initialized and throw a NullReferenceException. I've changed some class names and namespaces in the pasted code to protect the innocent. The only thing that I currently override in my PageBase is OnPreLoad and I do call the base.OnPreLoad. I'll eventually add more functionality to this PageBase but for now all that it has is this:

[Code]....

I've tried putting this into a class library (with System.Web referenced) and I've also tried moving the class into the web application and had the same results either way. As another strange twist, I have another class with derives from PageBase called IndexPageBase and it doesn't have this problem:

[Code]....

[Code]....

[Code]....

View 7 Replies

AJAX :: Accessing Placeholder From Webmethod - An Object Reference Is Required For The Non-static Field

Mar 22, 2010

Aplogies if this has been discussed before but I couldn't find an answer.

I'm trying to use jquery/Ajax to access some webmethods in my codebehind. This is fine, but I would in my function like to reference a placeholder (phStory in the code below) on my page and also load a usercontrol into that placeholder.

Unfortunately I get the message: "An object reference is required for the non-static field, method, or property 'TestControls.phStory' " and similar for the usercontrol. Does anyone know how I can still access my placeholder and usercontrol from within this.

It has to be stati as it's a WebMethod but this then throws up these errors.

[code]....

View 4 Replies

Forms Data Controls :: Accessing Inside Formview Edit Template

Jan 6, 2010

I keep getting a null reference when I try to access a listbox inside the EditItemTemplate of a formview. I check the mode before accessing the control (Formview1.CurrentMode) to make sure it is in edit mode and even set it manually to edit mode again! But formview1.findcontrol("blah") returns null. Formview1.EditItemTemplate does not have a FindControl method, not sure what else to try.

View 1 Replies

Forms Data Controls :: Accessing Unbound DetailsView Cell Values In Edit Mode?

Apr 12, 2010

i have a DetailsView that is populated by a Linq to Entities query. Example query is below.

Dim leaveApp = From L In db.CompassionateLeaveApplications _

View 1 Replies

Web Forms :: Serializing An Array From Code Behind Of One Web Form To JavaScript Of Another Web Form

Feb 16, 2011

I have a web form where I create an array of type structure.

In this form I have:

[code]....

but this is not OK.

View 1 Replies

Web Forms :: Redirecting An Array From One Web Form In The Javascript Section Of The Other Web Form

Feb 16, 2011

I have a web form where I define an array of type struct and I redirected it in the <script runat="server">
section of the second web form. But when I use that array below, in the <script type="text/javascript">
section in the html code of the same web form an error occured in the for cycle saying that the array (Array1) is undefined, and also the counter which I also defined in <script runat="server"> section.

I have this code in the <script runat="server">
section of the second web form:

public struct Point1
{
public float lat;
public float long1;
}
protected void Page_Load(object sender, EventArgs e)
{
//Retreive from session
Point1[] Array1 = Session["s1"] as Point1[];
//Run a Foreach loop
int nCnt
= 0;
foreach (Point1 p1
in Array1)
{
float x1
= p1.lat;
float y1
= p1.long1;
nCnt++;
}
}
and in the <script
type="text/javascript">
section I have:
var
for (var i = 0; i <
nCnt; i++)
{
lineString.getCoordinates().pushLatLngAlt(Array1[i][0], Array1[i][1],0);
}
lineString = ge.createLineString('');
lineStringPlacemark.setGeometry(lineString);

View 17 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved