Forms Data Controls :: Which Controls To Use - Dependent Datagrids Or Other

Mar 21, 2011

1) I should have one table-like column, where data are taken from database. It should contain sorted surname-name.

2) Every surname-name is a link to another table-like control. Content of it depans on surname-name that was clicked. This table will contain relatives of particular person.

Say, I have a column with John Anderson, George Washington etc. I click John Andreson and another table load data (relatives of John Anderson) - Anegline Jolly, Peter Pan etc.Then I click George Washingto and another table load data (relative of George Washington) - Zera Zebra, Aflen Aleks etc. Every relative should have a checkbox nearby. So the second table-like control will look like:

Angeline | Jolly | <some other information from db> | <checkbox>
Peter | Pen | <some other information from db> | <checkbox>
etc.

3) I have a button "A-D", When it is clicked, then first table is populated only with surnames with first letter from A to D. I have a button "E-G". When it is clicked, then table is populated only with surnames starting with letters E to G. I have nevere used DataGrids and other db binding controls. Which of them should I use?

View 3 Replies


Similar Messages:

Forms Data Controls :: Two Datagrids Which One Sent Command?

Feb 3, 2010

Using vb.net 2003,asp.net 1.1

I have a usercontrol on a page with 2 dynamic datagrids

on it with dynamic custom buttons, I get a questionID from

the buttons and that is ok.

What I need to know is which one of the grids gave me the questionID

so I can transfer to an approriate page.

For Instance:

If gridone was the sender/commandsource Then
Server.Transfer(pg1.aspx)
Else
Server.Transfer(pg2.aspx)
End If
Hope thats enough info,

View 1 Replies

Forms Data Controls :: Exporting DataGrids To Excel?

Jan 27, 2010

I currently have a data grid that exports to Excel on an ASP.NET page (which is used for reporting purposes) which works great until we put it under the stresses of a full scale production environment. With a multitude of users using it it seems to fill up the server memory quite quickly since the data thats being pulled is rather large. The requirements of the page are: The data needs to be queried and exported to excel, so theres no point to getting around that. I've noticed that xls files are rather large in comparison to their xlsx counter parts, using xlsx files would be fine for my application. I've noticed that xlsb (Excel binary) are even smaller(approx 25% the size of the their xls counterpart). Is there anyway to change my code to export to xlsb (first choice) or xlsx rather than xls? I think it has something to do with Mime Types but I'm not positive.

Here is the code that I'm using for exporting:

[Code]....

View 8 Replies

Forms Data Controls :: Adding Columns To Databound Datagrids?

Mar 5, 2010

I have started creating a DAL and have successfully bound my adaptor and the query within the adaptor to a gridview.

In lots of the intranet type apps I code in regular ASP for myself I often have a few columns with little icons in that do various things for that rows identity, such as drill down to more details, overlay a graph, text the person via an ajax call, send em an email via ajax and so on.

I think Ive got the hang of styling elements of each row depending on the data but Im completely at a loss as how to add a column which would have an icon whos url link properties would be dependant on the data.

EG

ROW1 | Name | Email Address | ICONFOR EMAIL(with a querystring id matching the row id) | ICON FOR MORE DETAILS (with a querystring id matching the row id)

I realise I am probably looking at this the wrong way but its difficult when you are almost on autopilot doing these things in classic ASP.

View 1 Replies

Forms Data Controls :: Handling Linkbutton Or Control In Nested Datagrids?

Mar 31, 2011

I have a Datagrid inside a Datagrid and I am trying to perform an action (open an pop-up window with related values in the querystring) when the inner datagrid control is clicked.In this simplified example I have 2 datagrids (datagrid1 and
datagrid2). In the second datagrid (datagrid2) I have a LinkButton (lbViewDetails) that I want to control what it does based on the value in the upper datagrid (datagrid1)'s lblRecordId value.

View 4 Replies

Forms Data Controls :: How To Determine The Exactly Datagrids Row And Column That Exists A Button

Feb 11, 2010

how can we determine the exactly datagrids row and column that exists a button that has been pushed?

Protected
Sub ela(ByVal
sender As
Object,
ByVal e
As
System.Web.UI.WebControls.DataGridCommandEventArgs)
' Dim id As Integer = datagrid1.DataKeys(CInt(e.Item.ItemIndex))
Dim id
As
Integer = e.Item.Cells.GetCellIndex
Response.Write(ID)
End
Sub

but how exactly we determine the row and the column?

View 6 Replies

Forms Data Controls :: Dependent GridViews?

Mar 15, 2010

I have this "how to" type of question. I have a page where there are four gridviews. Now these four grids pull data from four different tables. The 1st grid retrieves data from table 1 with a where clause in it's query that comes from a hidden fileld value in the page. Till this things are fine. However, the 2nd grid has a dependency on the 1st grid and the where clause in it's query should be the data selected in grid view1. The 3rd depends on the 2nd one..and so on.

View 2 Replies

Forms Data Controls :: When Select Items From Second Dependent Dropdown Does The Grid Display Data

Jun 8, 2010

Iam trying to understand why my sqldatasource control bound to gridview will not return data while i have cascading dropdownlist coded in pageload and selected events respectively?

from which sqldatasource control stored procedure obtains its parameter values.

only when i select items from second dependent dropdown does the grid display data?

View 10 Replies

Forms Data Controls :: DetailsView - Change Cell Colour Dependent On Text Value?

Jun 9, 2010

I am trying to highlight a cell in a DetailsView if the value displayed is either "Desktop Computer" or "Laptop Computer" say red, I seem to be able to find examples for gridview but I don't seem to be able to apply this to a DetailsView.

View 4 Replies

Forms Data Controls :: Gridview-Calculate Value Based On Formula That Varies Dependent On Selected Code In Dropdownlist?

Jul 2, 2010

GridViewDetails uses templatefields. In edittemplate I put a button called "ButtonUpdateAdjustAmount" with OnClick="Update_AdjustAmount" in the EditItemTemplate for the "Amt to be Adj" column. There is also a textbox. My user's should be able to edit the textbox, but I also want the ability to click the button and the textbox populated with the correct calculated value. The formula varies based on the "code" column which is a dropdownlist called "DropListCode".

I am fairly new to asp.net, vb, etc...so forgive my code writing. Eventually I need to also put the same functionality on the insertrow for my gridview. But first wanted to get the edit one working. I am using templatefields for all columns and the FooterTemplate to perform the Insert New Detail Line.

I can get the functionality to work for the first data row and only if I take out the If code.SelectedValue = ... line and leave 1 static formula. However that isn't going to work. If DropListCode.SelectedValue is DNR then AdjAmt should be ((q_ordered - q_received) * cost). If DropListCode. SelectedValue is OV then AdjAmt should be (RKNumber * cost). If DropListCode.SelectedValue is NB the AdjAmt should be ((q_received - q_ordered) * cost). If DropListCode.SelectedValue is DAM then AdjAmt should be (RKNumber * cost)

Code behind for the OnClick:

[Code]....

.aspx page - GridViewDetails programming:

[Code]....

View 6 Replies

Data Controls :: Implement Dependent Cascading DropDownList In GridView TemplateField

Dec 23, 2013

How do I fill ProductNameID on selection of ProductCategoryID dropdown by passing

ProductCategoryID .SelectedValue...

aspx Code

<asp:GridView ID="gridPosition" runat="server" AutoGenerateColumns="False" ShowFooter="True" OnRowDataBound="gridPosition_onRowDataBound"
DataKeyNames="SaleDetailID" OnRowEditing="gridPosition_RowEditing"
OnRowCancelingEdit="gridPosition_RowCancelingEdit" OnRowUpdating="gridPosition_RowUpdating"
OnRowDeleting="gridPosition_RowDeleting" ShowHeaderWhenEmpty="True" CssClass="manage-admin"
Width="500px" GridLines="None">

[Code] .....

View 1 Replies

Validator For Two Controls Dependent On Each Other?

Nov 10, 2010

I have a textbox and a datepicker control.The validator requires that neither can be selected. ie. both blank. However if one has a value the other must also have a value.

Can anybody tell me how to implement this given that a CustomValidator requires a RequiredFieldValidator to fire?

View 1 Replies

DataSource Controls :: Make A Time Dependent Input And Store In Database In C#?

Apr 19, 2010

I am trying to make a routine system(school, college) where i will use three text field as input1> Class start time(input: 8:00 AM) // when school/college will start.2> Class ending time(input: 1:00 PM) // when all of my class will finish3> Duration of class(input: 1.5(hour))// class hourdesired output: A class routine where time(hour) will be shown in row and Day(e.g, sunday,monday) will be shown in column.questions:
1> how i'll take the input as time:hour from text field?2> how i can save the calculated time in database for use in other page?

View 3 Replies

C# -retrieve The Table From Two Different Datagrids With Some Certain Constraints?

Jul 20, 2010

I have two tables invoices and receipts

i have to show the alternate data of invoices and receipts in datagrid; condition is that
if Date column in INVOICE table matches with invoice columns in RECEIPTS table then the corresponding row of RECEIPTS table should come after INVOICES table row
if there is no match then INVOICES table next row will come, and
if there is match then then RECEIPTS TABLE row will appear

tables are below

INVOICES:
Date Sales Client Amount Paid Status Notes
03/27/2008 Chinmoy Panda ETA Prospect 100 SENT qwwert
04/30/2008 Amit Sharma ETA Prospect 1000 FROZEN
05/13/2008 Chinmoy Panda ETA Prospect 40000 SENT
[code]...

View 1 Replies

Add Space Between Datagrids Items Vertical

Jul 22, 2011

How can i add space between only the vertical borders of a grid??

View 8 Replies

Web Forms :: How To Create Textboxes On Demand Dependent On Selection

Mar 11, 2010

I have a shopping cart. Basically when looking at the product i want to display certain textbox and fields. e.g. if shoes then display the sizes available with qunaityt box against each

what is the best approach for this?

create textboxes dynamically or have static on screen and hide and unhide depending on value

View 4 Replies

Web Forms :: Dependent Drop Down List Not Working (Access DB)

Feb 22, 2010

I'm struggling with a web form where I have created one date field and couple of drop down lists. These drop down lists populate themselves from a backend MS ACCESS database file. My problem is that I am not able to make the two drop down menus dependent in a manner that when the first drop down menu is selected the second should be populated accordingly?

This is the code for the website form:

[Code].....

View 3 Replies

Web Forms :: Creating A Class Or ID For The Body Tag Dependent On Browser?

May 12, 2010

Im new to learning C# and .Net platform,

I have been wondering how i would go about:

1. Detecting the browser version

2. Using the browser version and associating a class or id for it

3. Using this class or id to be assigned to the html body tag.

Keeping one stylesheet for all browsers but having browser specific styles if any fixes are required. I know this can be done, i just dont know how.

View 6 Replies

Web Forms :: Setting Page Index When Working With Multiple DataGrids On Page

Jul 18, 2012

I have 2 DataGrid in a single page.

First DataGrid contain 2 page and 10 records per page

Second DataGrid contain 5 page and 10 records per page

When i click 3rd page of second DataGridthe following error occur

"Invalid CurrentPageIndex value. It must be >= 0 and < the PageCount."

public partial class Admin_Over_all_report : System.Web.UI.Page {
Dataconnection dc = new Dataconnection();
protected void Page_Load(object sender, EventArgs e) {
if (IsPostBack == false) {
bind();

[Code] ....

View 1 Replies

Web Forms :: The SelectedValue In The Dependent Dropdown Is Always Empty After Paper Is Loaded?

Feb 22, 2011

There are two dropdowns in my ASP.NET form. The second dropdown is dependent on the first dropdown - the second onedoes not have the item selected in the first one. My problems is that the selectedValue for the second dropdown is always empty after load event. I tried to set the selectedIndex to be 0 before access selectedValue property in the page load event, but it is still empty. What I want is to get the first item of the second dropdown as the default value.

[Code]....

View 1 Replies

Asp MVC Validation - Dependent Fields?

Jan 5, 2010

I'm currently trying to work through MVC validation, and am coming up against some problems where a field is required depending on the value of another field. An example is below (that I haven't figured out yet) - If the PaymentMethod == "Cheque", then the ChequeName should be required, otherwise it can be let through.

[Required(ErrorMessage = "Payment Method must be selected")]
public override string PaymentMethod
{ get; set; }

[Required(ErrorMessage = "ChequeName is required")]
public override string ChequeName
{ get; set; }

I'm using the System.ComponentModel.DataAnnotations for the [Required], and have also extended a ValidationAttribute to try and get this working, but I can't pass a variable through to do the validation (extension below)

public class JEPaymentDetailRequired : ValidationAttribute
{
public string PaymentSelected { get; set; }
public string PaymentType { get; set; }
public override bool IsValid(object value)
{
if (PaymentSelected != PaymentType)
return true;
var stringDetail = (string) value;
if (stringDetail.Length == 0)
return false;
return true;
}
}

Implementation:

[JEPaymentDetailRequired(PaymentSelected = PaymentMethod, PaymentType = "Cheque", ErrorMessage = "Cheque name must be completed when payment type of cheque")]

Has anyone had experience with this sort of validation? Would it just be better to write it into the controller?

View 1 Replies

.net Plateform Dependent Or Independent?

Oct 15, 2010

Can any 1 give a proper explanation of this

View 2 Replies

C# - How To Debug An Application That Is Time-dependent

Nov 3, 2010

I'm working on an application (a web application, asp.net and c#) which is datetime-dependent, so, based on the current date, it will launch forms for the logged user to fill in.

I've been thinking about how we're going to simulate real usage of the application, for debugging and testing purposes.

So I'm talking about replacing all those:

DateTime currentDate = DateTime.Now;

with something like:

DateTime currentDate = MyDateClass.GetCurrentDate();

And then I'll have a class:

public class MyDateClass
{
private DateTime _currentDate;
public DateTime GetCurrentDate()
{
// get the date, which may be different from DateTime.Now
return _currentDate;
}
public void SetCurrentDate(DateTime newCurrentDate)
{
// set the date to the value chosen by the user
_currentDate = newCurrentDate;
}
}

allowing me to set the current data, by invoking the SetCurrentDate method, for example, in the code-behind of a link button and a calendar input.

how should I exactly store the DateTime variable, throughout all the application? I can't work with the session in this class, right? Should I work with the Thread?

[code]....

View 2 Replies

C# - Is The Result Of A Md5 Hash Consistent Or Server Dependent

Mar 12, 2010

I am doing a md5 hash, and just want to make sure the result of:

md5.ComputeHash(bytePassword);

Is consistent regardless of the server?

e.g. windows 2003/2008 and 32/64 bit etc.

View 4 Replies

GridView RowStyle Dependent On Property Of Item Row Bound To?

Jan 19, 2010

I'm currently using a GridView and I want to set the CssClass for the Row depending on a property of the object that the row is being bound to.I tried the following:

<asp:GridView id="searchResultsGrid" runat="server" AllowPaging="true" PageSize="20" AutoGenerateColumns="false">
<!-- The following line doesn't work because apparently "Code blocks
aren't allowed in this context --> <RowStyle CssClass="<%#IIF(DataBinder.Eval(Container.DataItem,"NeedsAttention","red","") %>
<Columns>
<!--............-->
</Columns>
</asp:GridView>

Now I could simply handle theGridView's RowDataBound event and change the css class of the row there...but I'm trying to keep a clear separation between the UI and the page/business logic layers.

View 1 Replies







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