473,387 Members | 1,517 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Need Help to get Selected Range from DataGrid using C# WebForm

6
Hello I am new to all this, i am trying to have a range selecter for A DataGrid on a WebForm, for example the user needs to select a start Row and an end one, Like Date in a single Row in a Columne etc.

i tryed adding two Labels and Data Binding them to the Selected_Item_Index and then take the String out of them and use an SQL Command "Select Columnename From Tablename Where Columne 1 is Between String1 and String2"
then put the Data into A DataSet or Something.

but its very unclean code.

any ideas?
Jun 27 '07 #1
2 1820
r035198x
13,262 8TB
Hello I am new to all this, i am trying to have a range selecter for A DataGrid on a WebForm, for example the user needs to select a start Row and an end one, Like Date in a single Row in a Columne etc.

i tryed adding two Labels and Data Binding them to the Selected_Item_Index and then take the String out of them and use an SQL Command "Select Columnename From Tablename Where Columne 1 is Between String1 and String2"
then put the Data into A DataSet or Something.

but its very unclean code.

any ideas?
Moved to forum section
Jun 27 '07 #2
nateraaaa
663 Expert 512MB
Hello I am new to all this, i am trying to have a range selecter for A DataGrid on a WebForm, for example the user needs to select a start Row and an end one, Like Date in a single Row in a Columne etc.

i tryed adding two Labels and Data Binding them to the Selected_Item_Index and then take the String out of them and use an SQL Command "Select Columnename From Tablename Where Columne 1 is Between String1 and String2"
then put the Data into A DataSet or Something.

but its very unclean code.

any ideas?
Have you considered creating a search on your page so that it will only display the criteria that the user searches for (Start Date to End Date)? You would then pass these parameters to a stored procedure that would return a result set. Store your result set in a dataset and assign the dataset as the datasource property of your datagrid.

Nathan
Jun 27 '07 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

4
by: Angel | last post by:
How can I update the datatable with the datagrid values after the datagrid itself has been modified.? I assume it's not automatically done. Thanks.
7
by: Jack Addington | last post by:
I've got a fairly simple application implementation that over time is going to get a lot bigger. I'm really trying to implement it in a way that will facilitate the growth. I am first writing a...
5
by: BBFrost | last post by:
Win2000 ..Net 1.1 SP1 c# using Visual Studio Ok, I'm currently in a "knock down - drag out" tussle with the .Net 1.1 datagrid. I've come to realize that a 'block' of rows highlighted within...
4
by: Rod | last post by:
I posted a message to this group yesterday asking how to pass parameters to a web form that is the source of an IFrame on a parent web form. I've gotten my answer, and it works. Thanks! Now I...
1
by: Willem | last post by:
Hi, I'm using a datagrid on a webform with 4 visible and 1 invisible columns. When clicking a button I want to make the invisible column visible. I use the code DataGrid1.Columns(4).Visible =...
1
by: Khurram Rafiq | last post by:
Start Page: ASPX webform with three iframes, two which I am currently using. iFrame1: ASPX webform which contains html options for iframe2. iFrame2: ASPX webform which contains a...
0
by: DC Gringo | last post by:
I am trying to output simply DataGrid of a coutry listing on a web form via a business object and XML web service...I receive no errors but no table HTML either. (I know the service and business...
0
by: DC Gringo | last post by:
I am trying to output simply DataGrid of a coutry listing on a web form via a business object and XML web service...I receive no errors but no table HTML either. (I know the service and business...
5
by: Tony | last post by:
How do I get the selected item from a datagrid? Thanks
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.