Telerik RadGrid Manipulating data from data source before databinding an item - asp.net

I am working with a Telerik Radgrid on an aspx page, which basically has to bind to a datatable, which gets populated by data returned from a web service. I need to be able to fill out some of the columns in the RADGRID based on the data returned by the web service.
For example, I need to be able to build the Hyperlink column based on the parts data returned by the web service. I need a way to access the datasource before the grid item gets populated and direct execution to a routine which builds the URL for the parts on a website.
Can anybody please suggest an efficient way to do this?
I highly appreciate any help/suggestions.
Thanks
Karthik

(Moving my comment to an answer, because I'm thinking this will work out for you.)
You could always cheat and bind it to the grid, allowing you to access the data, but then hide the columns so the users could never get the data.
Let me know how it works out.
EDIT:
My select statement is "select top 5 ProductName from products"
I then created a hyperlink column and assigned the properties under the data tab as such.
When run, it makes the data clickable and when clicked, it navigates to the url seen in the SS.
That what you need?

Related

Way of temporarily holding data

I'm after a bit of advice really. In an C# ASP.NET web solution I need to create a form whereby a user can add names and email addresses (an unlimited amount of times) and when they've finished adding these names and addresses they click a submit button and the 'records' then get posted to an SQL database.
So to summarise I need a wayto hold some data on the page that users can insert to and delete and I was after some advice on the best way to go about this. I did look at listviews and gridviews but they seem to suggest that I need a datasource to connect to and I don't have one the data purely needs to exist for the length of time that they have the form open and will be destroyed either when they submit to the database or cancel out of the form. I'm also presuming that it'll need to exist in an ajax update form as I don't want postbacks when they click to add a name/password.
Any ideas would be gratefully received!
Thanks,
Craig

Binding gridview with xml file at client side

hi i have two xml file and i want to bind grid view eith this xml file on client side. i try to describe the complete senerio. in my .aspx page i have a drop down list which has number of department. when the user select the department the data i want the data according to department comes on the grid view from first xml file, in this gridview the rows are field with various tests and the row also have a checkboxes ,when user click on that checkbox the datafrom yhe second xml file will come and the second grid view is bind with that data. i want all that on client side. how is that possible, please help me and thanks in advance for help
I would suggest you to either use jqgrid/html table and use this article to read xml using javascript or if you wants to use gridview only and don't wants to show post back to the user then use updatepannel with gridview will help you out.

ASP.Net, how to put hyperlinks in datagrids.

Hi i have a datagrid I've put in on a aspx web form in visual studio 2010, I'm new to this so I've been following the ms tutorials.
One of the columns on my data grid contains a lot of information, is there a way i can add a "+more" option in the cell next to the entry that shows only the first few characters of that cell, but once clicked opens all the information on that particular entry but onto a new aspx form?
Thanks for any help!!
There are basically three different ways...
Structure your data object/query so that it returns a key and and abbreviation (i.e, first name, last name, id, bio) and use a template that turns id into a link.
Use the onrowbound event to manipulate the controls on the row, so that you have a href to your details page.
Use css to show the additional info on a hover/mouse over (I like this, but it doesn't play well with mobile devices, which don't have either event).
EDIT: Methods 1&3 would be done on your aspx page, method 2 would be done in the codebehind for your page. Method 1 is really dependent upon your being able to control the data object/ query results. If you are calling a stored proc that someone else controls, it may be very difficult to make it work.

collecting data from checkboxlist

Pretty basic question, I have a checkboxlist inside of a wizard control. I need to collect the value of all items that are checked, as well as whatever value is inside of a textbox if "other" is checked, to insert into my database during the Wizard.FinishButtonClick event. How do I do this? I need this in VB, please.
We cannot give you complete code to implement the task you want to implement, but can provide some starting point. Please go through the articles given below. Get back to us if you still have problems in implementing what you want after reading these.
Wizard control in .net
Asp.net and Vb.net wizard
Wizard control
I found all these in a simple google search.

Can database fields be dragged and dropped (as textboxes, not a gridview) into an ASP.Net form?

In VisualStudio, when you drag and drop a table or an individual column from a data connection in server explorer, a gridview is created.
What I want to be able to do is drag and drop the columns to make a quick and dirty detail form to display an individual record. Is this possible in any way?
An even better way to do this would be via a custom T4 or LLBLGen template but I have no clue how to do this.
Any other suggested approaches?
UPDATE: A DetailsView is the type of thing I am looking for, in that you can select a data source and the specific columns you want, but I'd like to be able to have manual control of the layout and formatting after the initial drag and drop.
I suggest binding a DetailsView to the table using a data source (SqlDataSource) instead. You might find these tutorials, especially this one helpful.
In response to your update, have a look at the FormView control. It gives you complete control of the layout using templated sections.
There appears to be literally no way to do this in VS that I have come across.

Resources