Tracking Forums, Newsgroups, Maling Lists
Home Submit Tracker Forums
  Advanced Search
  HOME    TRACKER    ASP.NET


Advertisements:










Get The Values Of A Cell In A Selected Row Of A RadGrid On Client Side?


I am putting together a module that will drop into a DotNetNuke portal and I'm populating a Telerik RadGrid with data. I have followed every tutorial and example I can find, but the result keeps coming back with "object Object", "null", or "undefined".

I need to:

1) get the value of the "BookingID'" column for each row that is selected

2) pass the value into a url string that opens up in a RadWindow.

I'm trying to do all of this using javascript, but if you know a better way, I'm down for anything at this point.

Here is my current JavaScript and a stripped down radGrid:

[Code]....


View 1 Replies (Posted: Jun 23 10 at 16:25)

Sponsored Links:

Related Forum Messages For ASP.NET category:
Server Side Control Hidden - Possible To Read Values Client Side
I've got two textboxes running server side and have their visibility turned off. I'm using a couple of ASP.NET controls which require the textboxes to exist. However, I am filling them from the code behind and would not like the user to see this. Can the user turn the visibility on and see the values entered in the text box? I tried using FireBug, and I couldn't seem to select the visibility option in order to edit it. However, I'm quite new to Firebug, so there may be another way? Or does running it server side mean that the client can't ever view the contents of the textbox?

Posted: Jan 30 10 at 19:40

View 1 Replies!   View Related
Forms Data Controls :: Client Side Code To Pass Values To Server Side Variable?
I have ListBox_SelectedTextChanged() method that creates another list box in the runtime as follows:

// Get Action Level List
lbxActionLevel = new
ListBox();lbxActionLevel.ID =
"ddlA" + i.ToString();
lbxActionLevel.Width = 100;
lbxActionLevel.Rows = 2;
SqlDataReader dr =
new BusinessLogicLayer().bllGetActionLevels();
lbxActionLevel.Items.Clear();
while (dr.Read())
{
ListItem lAction =
new ListItem();
lAction.Text = dr.GetString(1).Trim();
lAction.Value = Convert.ToString(dr.GetInt32(0));
lbxActionLevel.Items.Add(lAction);
lbxActionLevel.SelectedIndex = 0;
}

I guess because this lbxActionLevel object is generated on the fly, I can't get the selection values once I click the "Done" button. I don't want the lbxActionLevel to do autopostback bacause for some reason most of the user input gets wiped out. Is there a way to get the user selection collected on the client side (javascript) and pass it to the C# code?

Posted: Mar 13, 2008 04:57 PM

View 7 Replies!   View Related
Web Forms :: Pass Client Side Values To Server Side?
Actually i wanna implement a code like... a string in HTML textbox retrieve in server side control. suppose i hv a HTML control <input type="text" id="txtHTML"/>, and dis control txtHTML.text="abc". now i want to retrieve dis client side string "abc" in d server side textbox named "txtASP"...which hs a property runat="server" how to pass values from client side to server side

Posted: Feb 23, 2008 01:04 PM

View 5 Replies!   View Related
Forms Data Controls :: Client Side AJAX Timer In GridView Cell?
I've a GridView bound to an object data source which gets data from a remote server. The GridView is inside an AJAX UpdatePanel. For each GridView row, I have a status data item for a person's status(like busy, free, etc.)and I need to show a running timer since a person has been inthe currentstatus. Different persons can be in different status at different times and so running timer for each person needs to be different and should be reset when a person changes status. Is it possible to show such a running timer for a cell in each row of a GridView and manipulate it differently i.e. start, stop and reset each instance individually?

Posted: Jan 20, 2010 10:41 PM

View 11 Replies!   View Related
Forms Data Controls :: Get Selected Cell Values From Gridview?
How Get particular selected cell valuefrom gridview. my grid so many cell available..i'm created dynamic row and cell ...

Posted: Sep 23, 2010 01:48 PM

View 2 Replies!   View Related
Grid View - Find Selected Rows At Client Side?
I have a Grid View control on my ASP.NET page with checkbox select column as the first column in the Grid view.In javascript (client side), i want to get the second column's value for all the rows where checkbox is checked.want to do only in javascript, please let me know if someone has done similar to this.

Posted: Feb 20, 2009 07:43 AM

View 2 Replies!   View Related
How To Force The User To Have At Least One Selected Checkbox And Postback From Client-side JavaScript
I have two checkboxes: cb1 and cb2. They are both hooked up to an onClick event which checks if at least one checkbox is clicked. If this is not the case, it throws an alert and reverts the change. If a legal change was made (e.g. cb2 was checked, followed by cb1 being unchecked), the function calls the server function checkChange() which needs the object and eventargs.

I'm having trouble with the following:

Reverting the change: how can i find out which checkbox was clicked without adding an extra javascript function for the second checkbox? This has to be a scalable solution as more checkboxes may be added later.
How do I call the server function checkChange(). I am aware of "this.Page.GetPostbackEventReference" but I am confused as to the parameters it takes.

Posted: Jul 8 10 at 0:00

View 1 Replies!   View Related
Javascript - Trying To Add A Client Side Event To A Dropdownlist And I Need To Access The Currently Selected Text?
I am trying to add a client side event to a dropdownlist and I need to access the currently selected Text. I have tried:

ddl_tech.Attributes.Add("onclick", "document.getElementById('" + chk_techreview.ClientID + "').disabled = this.options[this.selectedIndex].text.Equals(' UNASSIGNED');");
and
ddl_tech.Attributes.Add("onclick", "document.getElementById('" + chk_techreview.ClientID + "').disabled = this.text.Equals(' UNASSIGNED');");

Both of which give me runtime errors when the event is fired.Whats the correct way to access this text property client side?I tried this but it does not enable the checkbox...

ddl_tech.Attributes.Add("onchange", "document.getElementById('" + chk_techreview.ClientID + "').disabled = this.options[this.selectedIndex].text == ' UNASSIGNED';");

ANSWER:

Well, along with having to use == rather than .Equals, when you set a checkbox.enabled = false on the server side it raps the checkbox in tags and sets it to disabled=true; therefore you must set BOTH the checkbox.disabled = false and checkbox.parentElement.disabled = false; on the client side to enable the checkbox!The solution:

ddl_tech.Attributes.Add("onchange", "document.getElementById('" + chk_techreview.ClientID + "').parentElement.disabled = (this.options[this.selectedIndex].text == 'UNASSIGNED'); document.getElementById('" + chk_techreview.ClientID + "').disabled = (this.options[this.selectedIndex].text == 'UNASSIGNED');");

Posted: Sep 1 10 at 13:10

View 2 Replies!   View Related
Web Forms :: Storing Values At Client Side?
I am having a page where I need to maintain around 70 to 80 hidden fields to store some values. These are required because I need these values for executing some code at the client side (validations, calculations, etc,.) in java script.

Wanted to know if there is a better way of storing these values in my page instead of using hidden controls because I guess using so many hidden controls is making my page very heavy.

Something like a hash table or list dictionay that I can access from both the server side code and clint side java script?

Posted: Apr 14, 2010 08:00 AM

View 2 Replies!   View Related
C# - Getting DataTable Values From Code Behind To Client Side Using JavaScript
getting a particular datatable values from the server to the client using javascript.

Ex.In my class which is Countries.aspx.cs I have this somewhere on my code say on the page load.

DataTable dtbCountries = Repository.GetAllCountries;

my dtbCountries now contains this record

ID Country
1 HongKong
2 Japan
3 Korea

In my webform I want to get the values of my dtbCountries using javascript

<script type="text/javascript">
// my code here to get the dtbCountries values
</script>

What should I do? Or what's the best thing to do to expose my dtbCountries in the client.

Posted: Dec 9 10 at 17:21

View 1 Replies!   View Related
How To Access Values Of Previous Page At Client Side
I have a page and clicked on the button there it will open a new page containing some text boxes, user fill all the text boxes and clicked the button now first page open again and the question is : How can I get the vales of text boxes on the current page using both server-side and client-side

There is a restrictions to use of :

- Cross-paging
- Cookies
- Sessions
- Query strings

Posted: Apr 19 10 at 15:42

View 4 Replies!   View Related
Javascript - User Control With Client + Server Side CustomValidation; Wrong Client Side Validator Is Picked
I have a user control which contains a CustomValidator which is used according to whether a RadioButton is checked or not (there are several RadioButtons, I'm only showing the relevant one)

<asp:RadioButton runat="Server" ID="RadioBetween" GroupName="DateGroup" CssClass="date_group_options_control_radio" />
[code]...

There is some client + server side validation code (the server side code does exactly the same thing and is skipped for brevity)

<script type="text/javascript">
function ValidateDateFields_Client(source, args) [code]...

There are two instances of this control in the page. When running the client side version it hits the wrong one (the version of the control which is disabled). You can see from the generated HTML both are correctly specified. I'm not sure how .NET works out which clientside function to call given they both have the same name.

<script type="text/javascript">
//<![CDATA[
var ctl00_MCPH1_QueryTextValidator = document.all ? document.all["ctl00_MCPH1_QueryTextValidator"] : document.getElementById("ctl00_MCPH1_QueryTextValidator");

[code]...
Do i need to add something in to scope it? What's the best way to achieve this? If I disable the loading of the second control everything works fine.

Posted: Nov 23 10 at 20:46

View 1 Replies!   View Related
Forms Data Controls :: Check Values In Client Side In DataList
I have a problem with data list. Iwant to check the binding value is empty or not.We may use theOn Item DataBind(). But i wantto check in the client side itself. here i give my code for your reference.

[Code]....

Posted: Dec 01, 2009 04:34 PM

View 4 Replies!   View Related
Web Forms :: Client Side Custom Validator Changing Textbox Values?
I've been working on a task to add a validator to compare the values of two text fields in a ASP.NET 1.1 application.

It uses validators already, so the best approached seemed to involve a CustomValidator. I was inspired by the following example:

[URL]

I got the server side validation working - now I'm trying to add some client-side validation but I'm having a strange issue.

When I click in either of the two text fields, the value of the txtFinalGrade field is overridden to either "true" or "false". I've been having a tough time tracking down the code that's causing this. I tried using the IE Developer Toolbar to trace the script - as well as FireBug in Firefox (though this is an IE-only app) and I'm still trying to figure out what's causing this to happen.

Since I think this is a JavaScript issue, I'm posting that part of my code:

[Code]....

Anyone have ideas of things to try? Anyone have similar issues with textboxes being set to true/false when working with custom validators?

Posted: Mar 19, 2010 08:23 PM

View 3 Replies!   View Related
Validation - Using RangeValidator To Validate User Input On Client Side For Double Values?
I was using RangeValidator to validate user input on client side for double values.One of my user said that when he enters 5E-10, my range validator does not understand that number as a valid double.

Posted: Feb 4 10 at 23:28

View 1 Replies!   View Related
Assign Validation Group To Asp.Button Dynamically On Client Side Using Javascript On The Base Of Item Selected In Drop Down List?
n a form I have multiple group of controls which are grouped using validation group property. I want to assign validation group to asp.Button dynamically on client side using javascript on the base of item selected in drop down list.

Here is JavaScript which I am using, but it is not working. It shows validation group undefined but actually a default group is defined.

<script type="text/JavaScript">
function NextClicked() {
var _ddlStatus = document.getElementById("<%=ddl.ClientID%>");
var _selectedIndex = _ddlStatus.selectedIndex;
var _btn = document.getElementById("<%=btnNext.ClientID%>");

alert(_btn.ValidationGroup); // here in messge it shows undefiend, yet I have defiend a group in button as default.

if (_selectedIndex == 1) {
_btn.ValidationGroup = "G1";
}
if (_selectedIndex == 2) {
_btn.ValidationGroup = "G2";
}
}

Posted: Jun 15 10 at 5:28

View 1 Replies!   View Related
C# - Fire Off The Server Side Selectedindexchanged Method Of A Radgrid On Doubleclick
I would like to fire off the server side selectedindexchanged method of a radgrid on doubleclick and not on click. Is it possible to do this???

[code]....

Is it possible to do this? To postback on doubleclick or is there an alternative?

Posted: Jul 19 10 at 17:53

View 1 Replies!   View Related
How To Change The Data In Telerik's RadGrid Based On Calendar's Selected Dates
I was creating another usercontrol with Telerik's RadGrid and Calendar.

[code].....

The problems are, (1) when I click the submit button. the data in the RadGrid is not changed. (2) how can we check if there is nothing selected in the Calendar controls, because there is a date (01/01/0001) set even if we do not select anything from that calendar, thus Calendar1.SelectedDate != null is not enough.

Posted: Feb 24 10 at 7:14

View 1 Replies!   View Related
Finding Values In A Telerik Radgrid?
I've tried to find the answer, but am not having any luck and am wasting to much time trying to figure it out. Using RadGrid from Telerik, latest version of their Ajax Controls, I've added a Select to each row, and can't figure out how to get the value of the selected row. Prefer to get the value of the ID column (from ID field in my database) or other specific columns. C# or VB example will work, VB preferred.

Posted: Nov 26 10 at 21:54

View 2 Replies!   View Related
How To Change Values Of Fields In GridView/RadGrid EditTemplate When A ChkBox Is Checked
When a 'Update' is clicked the row shows the Edititem mode.

I have a check box that when it is 'clicked' I want the other fields to dissapear/become read-only.

How can this be done client or server side?

My best guess is for server side I have something like this below.. but then in the event how do I get access to those items in edit mode and change them ?

<EditItemTemplate>
<asp:CheckBox ID="cbNR" runat="server" AutoPostBack="True"
OnCheckedChanged="cbNR_Clicked"
Checked='<%# Boolean.Parse(Eval("NR").ToString()) %>' />
</EditItemTemplate>

Posted: Oct 19 10 at 18:02

View 1 Replies!   View Related
Forms Data Controls :: Showing Image In One Column In Radgrid Using Values From Database?
I am having one column in each row of my radgrid in which i want to show an image. I am getting values from database saying 1,2 for that particular column and for each of these values i want to show different images for different values. For Example if i am getting 1 from database i want to show "roseImage" and for 2 i want to show "lotusimage",

Posted: Jan 19, 2010 07:48 AM

View 3 Replies!   View Related
Web Forms :: How Do You Write To A Client-side Control (text Box) With Server-side Code
If I have a standardHTML textbox

[Code]....

but got a readonly error.

Posted: Jan 06, 2010 01:46 PM

View 10 Replies!   View Related
Access Server Side Variable On Client Side And Vice Versa And JavaScript?
I have a requirement of adding server side variables in client side and other way round. Because I need to set a value from client side using javascript and access the same in code behind page.

I have to use C#.Net and JavaScript.

Posted: Dec 9 10 at 9:47

View 2 Replies!   View Related
Jquery - Options For Page With Matching Client-side And Server-side Markup?
Suppose I'm building a StackOverflow clone using webforms ASP.NET and jQuery. The Question page has a question, several answers, and comments under each. Requirements:Users can post new answers and comments, and edit existing ones, without postbacks. No UpdatePanels; the AJAX calls retrieve just the JSON they need, not HTML fragments. The page loads with all existing answers and comments in place (no javascript needs to run to read the page).

What I'm trying to figure out is how to do this without having to maintain two sets of markup (one that's bound on the client using some form of jQuery templating, and one that's bound on the server using traditional WebForms).

Posted: Oct 17 10 at 22:44

View 7 Replies!   View Related
Clear Browser History In Code(may Be In Client-side Script Or Server-side)?
How to clear browserhistory in code(may be in client-side script or server-side)?

There is window.document.history object in javascript, but we can not delete it's items.

Posted: Jul 26, 2008 09:35 AM

View 19 Replies!   View Related
Ajax - Listbox Items Client Side Reordering Not Reflected In Server Side?
I reordered some items in a listbox using Javascript. When I read the items in a postback in the code behind (ASP.NET), the order is in the original order. How do I get the same order as shown in the screen after Javascript manipulation?

Posted: Jan 5 10 at 18:07

View 3 Replies!   View Related
AJAX :: To Know Error Like Username Or Password Is Incorrect On Client Side Instead Server Side?
I m using site login Control in my login.ascx file and disaplaying login control in Div so if there is login link in page and i click on that then Login Div will popup whichis site login.May i know how canhandleerror like username or password is incorrect on client side instead server side?

Posted: Oct 04, 2010 11:37 AM

View 6 Replies!   View Related
Print The Aspx Page Either Using Server Side Or Client Side Approach?
I have to implement the print functionality on aspx page like on click of print image icon user will be able to get the print out of aspx page .aspx page will contain the server controls like textboxes , Gridviewetc which one approach will be the best server side or client side printing ?

Posted: Feb 09, 2011 05:03 AM

View 4 Replies!   View Related
Web Forms :: Setting Hidden Value Server Side And Accessing On Client Side?
I am trying to set a hidden type value to x on Server Side and then access it with Javascript. I have tried multiple ways to accomplish this.

At the basic level this is what I am trying to do.

Aspx page
<asp:HiddenField ID="HidRowNumber" runat="server" />
CS Page
In IsPostBack
HidRowNumber.Value = EFileRowNumber.Text;
Javscript
var status = document.getElementById("<%= HidRowNumber.ClientID %>").value;

When I am debugin it say it HidRowNumber's Value has changed to x but when I access the value with JS it always returns ''.

Posted: Jul 19, 2010 03:07 PM

View 23 Replies!   View Related
Web Forms :: How To Unescape( Escaped HTML) By Server Side Not By Client Side
i can use escape() and unescape()functions by Client side easily, but the problem when i have use escape() method for peice of HTML , then i dont know how to unescape this piece of HTMl By Server Side not By Client Side. how i can unescape (escapped HTML) by server side?

Posted: Aug 07, 2010 12:36 PM

View 2 Replies!   View Related
Web Forms :: Retrieve Value If Server Side Control Value Is Updated On Client Side
I have a hidden variable and its value is being updated using javascript(client side) which I make a call from server side code. After making the call I am not able to retrieve the updated value from Server side variable. I went through this forum [URL] but not able find a way how to implement functionality with IFRAME. I am trying to call the client side code and retrieve the updated value from server side in page_load event.

Posted: Oct 26, 2010 09:09 AM

View 5 Replies!   View Related
VS 2005 AJax Tab Container - Enable The Server Side Not Client Side
I have set the ajax tabs disable on form load. ON button click, I want to enable the tab server side,not client side.

protected void btnEnableCostPetroleumTab_Click(object sender, EventArgs e)
{
TabContainer2.Tabs[0].Enabled = true;
}

But its not enabling the tab?

Posted: Feb 4th, 2010, 10:55 AM

View 12 Replies!   View Related
JavaScript - Exposing Server-side State Through Client-side Controls
I have a list of items on an ASP.net page. That list is selectable in that whenever the user clicks on one, the page does a postback and the server code stores the index or some unique identifier of the picture in a ViewState property indicating that it is currently selected.

I would like to minimize the load on the server and therefore I would like to store the index or unique identifier representing the image in some way on the client side. The best way I can think to do this is to store said information in a hidden field ), however I had two questions about this before I go crazy:

Is this a security risk in any way, shape or form (i.e., exposing implementation details of the page)?
Is there a better/best way to do this that is more industry-standard? Does ASP.net provide a framework to do this that is cleaner than my idea? Seems like this would be a fairly common requirement to me...

Posted: Feb 11 at 14:31

View 1 Replies!   View Related
First Invoke Server Side Code Then Client Side Script Without Using AJAX?
in a form i have a buttoin, when click both OnclientClick and postback should happen. on clicking the "Email" button a client side "mailto" tag should do the work and pull a new message window on the client's machine.

whereas, the email addresses should be invoked by the post back. so , when clicking the button the server side post should happen and on return the client side script should be invokded with the values read during post back, and populate all the email addresses.

i need know how to first do a server hit take the values and then execute the client script with those values without using AJAX

Posted: May 18 10 at 20:51

View 1 Replies!   View Related
How To Write To A Client-side Control (text Box) With Server-side Code
If I have a standard HTML textbox: I can retrieve the value using Request.Form. But how do I go about populating this textbox from the server-side? I tried Request.Form["txtTest"] = "blah"; but got a readonly error.

Posted: Jan 6 10 at 16:11

View 2 Replies!   View Related
Accessing Client - Side Generated Table Rows Through Server - Side
The idea is that a pure html table will be generated on the client side. (using jQuery to add dynamic new rows to the table when the user clicks a button). These rows contain textboxes, dropdownlists, checkboxes and other input controls. When the user clicks a button, a PostBack is triggered in which I need to access this data from the table on server side, validate it and perform other actions on it.

I'm able to perform the client side and access the table data on server side by adding runat="server" to the table tag. However, I only see the initial table rows (not the ones added through JavaScript) and I have troubles retrieving the different inputs from the rows. put me in the right direction?? Or someone offering a better solution to the problem?

Posted: Feb 23 10 at 5:07

View 2 Replies!   View Related
C# - Encrypting Text Fields At Client - Side And Decrypting Them At Server - Side
I have a content-sensitive firewall between my clients and my server. If we exclude SSL solution (it's not available in my case) then I was thinking of a javascript library which encrypts custom fields at client-side and a .NET class decrypts them at server-side. Is there any solution out of the box (maybe a server control) ?

Posted: Feb 5 at 22:32

View 2 Replies!   View Related
How To Preserve Literal Text From Server Side When Displaying On Client Side
ASP.NET newbie question - fastest fingers!

I have a page that needs to pull some script off the server, including tag info, for the page. Thus:

<html><body>
blahblahblah
<%: Model.TaggedField %>
</body></html>

Problem is, the value of Model.TaggedField may include HTML tags, but the page automatically converts the tag info to <myTag> etc.

What method can I call to make the value of Model.TaggedField be transmitted verbatim to the page?

Posted: Mar 2 at 12:46

View 2 Replies!   View Related
HTTP POST, Redirect To JSP/ColdFusion,best Server Side Or Client Side?
I want to post data to another server (JSP or ColdFusion).

Note:Post which means the data is required at the another server also the browser should be redirected automatically.Is it better to use form tag...input type hidden fields, values...

and from javascript

form.submit();

[code]...

I should use WebClient class?Please provide the points from Security view also.

Posted: Jan 25 10 at 9:56

View 1 Replies!   View Related
Copyright 2005-08 www.BigResource.com, All rights reserved