.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

5 GridView Themes Based on Google's Personalized Homepage (igoogle)

Posted By: Rahul     Posted Date: December 31, 2009    Points: 2   Category :ASP.Net
One of the silly features I have found that I like about igoogle is how the pages color palette changes depending upon the time of day. So as the day progresses from morning to afternoon to evening the colors on the page change as well. Like I said, I know this is a silly feature, but I like it. And I have asked around a little bit and seems like other people like it to. To get a better idea of how the colors change, here are the background images from a few of the HTML elements.

View Complete Post

More Related Resource Links

Insert data based on gridview user value on row.. how to



I have three column comes from database table(Table1) and one column is for entering data for the user let us consider it look like this 

ItemNo ItemName Qty  uservalue

001       A               50       20

002       A               20       5

003       B               50  

004       C               60      10

005       D               40 

006       E               90      15 


If its 300 row from database to gridview it will show 50 record with page navigation..

What i need is i need to insert data in to database table which gridview row has user value..

The output of the another table(Table2) will look like this after insert

ItemNo ItemName   uservalue

001       A                    20

002       A                      5  

gridview help on each dynamic row solve this show values based on all columns

<asp:GridView style="Z-INDEX: 101; LEFT: 1px; POSITION: absolute; TOP: 183px" id="Gridview1" runat="server" Width="613px" Height="127px" ForeColor="Teal" Font-Size="12pt" Font-Names="Palatino Linotype" Font-Bold="True" Visible="False" BorderColor="Transparent" AutoGenerateColumns="false" CellSpacing="2" GridLines="None" OnRowCreated="Gridview1_RowCreated" SelectedIndex="5" ShowFooter="true" OnRowDataBound="Gridview1_RowDataBound"><Columns>  <asp:TemplateField HeaderText="ItemCode"><ItemTemplate> <asp:DropDownList id="DropDownList1" tabIndex=16 runat="server" AutoPostBack="True" DataValueField=" ItemCode " DataTextField=" ItemCode" ></asp:DropDownList></ItemTemplate></asp:TemplateField>  <asp:TemplateField HeaderText="ItemName"><ItemTemplate> <asp:DropDownList id="DropDownList2" tabIndex=16 runat="server" AutoPostBack="True" DataValueField="ItemName" DataTextField="ItemName" ></asp:DropDownList> </ItemTemplate> </asp:TemplateField>  <asp:TemplateField HeaderText="Category"&

Get selected row value based on checkbox selected in gridview using jquery

Hi ,    i am having gridview with two columns.one column contains checkboxes and another column contains Name.i have given UserId to DataKeyNames in gridview.Now i will check some checkboxes in gridview and click on button GetData. whenver i click on button GetData i need to get datakey values of all the gridview rows whatever checked in gridview using JQUERYPlease help me i am new to JQUery

Inserting Records Based on Checkbox Selection in a Gridview

Using checkboxes, can the row of record(s) be inserted into a database? I am populating a Gridview. Done. A checkbox field has been added, when the user selects one or more rows, a submit button (which is not working) needs to inserting those records into a table. The insert statment will work outside of the page but is not working using the scenario I jut described. Is this task as I have outlined doable? txs Ayomide

Row-based SharePoint Gridview

Hello, I want to stylize a SPGridview as row-based. I can do it in ASP .Net as follows (this is sample code and doesn't have a meaning. I wrote here because of describing the problem clearly on programmer side): <asp:GridView runat="server" ID="myGrid" AutoGenerateColumns="false"> <Columns> <asp:TemplateField> <ItemTemplate> <table> <tr> <td> <b>Position:</b> <%#Eval("Position") %><br /> <b>Gender</b> <%#Eval("Gender") %> </td> </tr> </table> </ItemTemplate> </asp:TemplateField> </Columns> </asp:GridView> Of couse, Eval sections should match with SQL Columns names in query string. So I want to do same with Sharepoint Gridview. SPGridview supports item template too but the problem is how to bind data to Eval (or whatever in Sharepoint) sections. This problem seems to you silly but there is a big text field in a SPList and I want to show it under title using a webpart. I tried views also but I think SharePoint has "Column-based" logic. Do you have any suggestion?

Disable child links in list.aspx : gridView based on some row condations


In the list.aspx page , Datagridview


I want to disable the links to the child table based on condition ,

let say if filed OrderDate is empty at row in table Orders I want to disable link to OrderDetailes for that specific row

gridview row color based on different values


lets say i have 10 customers total listed on customer table and i only want  to show the customers who bought something on the gridview. each customer has their own unique customer id# from 1 to 10.

if three of them bought something (lets say customer #1,5,8). those three records will be shown on the gridview.

i want to color the first row yellow, and second row red, and again third row yellow, and fourth row red, and so on.

how can i do this?

Fill Gridview Based On Rights


I have a master table that will hold the information for publications for my company.  Not all of the publications can veiwed by all users.  What I am trying to figure out is how can I load all of the publications that the user is allowed to see into one grid view table.  For example: If Mary logs in she will only be able to see Accounts publications; if Sally logs in she can see General and Legal publications and if John logs in he can see IT, Legal and General publications.

I figured out how to do it with separate gridview tables on a page based on the roles.  I would make a gridview viewable if the user was in that role.  But I would really like to put all of this in one gridview if that is possible.  Does anyone have any ideas as to how I can do this?

Gridview column based on other columns


I realize this is a simple question.

I have a gridview with 3 columns, price, tax, and total (for example).

  I want the total column to contain price + tax. 

I've set all three columns to be templated, although maybe they don't need to be.  This grid is read-only. 

I'd like to do it in code and not in a Bind, because there are some other calculations I need to do for other columns and it's easier for me to do it in VB. 

Do I do this in pre-render for the label in column 3? If so, how do I access the contents of the other columns in that row? 



Round Gridview footer template textbox value based on this JavaScript



This is my aspx javascript to get total in gridview footer template.. its working fine

The problem is : some time it show footer value is 6.9999999999

I need 6.99 as a result how to achieve this.

Aspx page:-

<script type="text/JavaScript">
function updateControls(elementId)
 var parentElementRef = document.getElementById(elementId);
 var elementRefArray = parentElementRef.getElementsByTagName('INPUT');
 var textBoxTotals = 0;

 for (var i=0; i<elementRefArray.length; i++)
  var elementRef = elementRefArray[i];

  if ( (elementRef.type == 'text') && (elementRef.gridTextBoxType == 'calcTextBox') )
   var textBoxAmount = parseFloat(elementRef.value);
   if ( isNaN(textBoxAmount) == true )
    textBoxAmount = 0;

   textBoxTotals += textBoxAmount;

 if ( isNaN(textBoxTotals) == true ) 
  textBoxTotals = 0;

 for (var i=0; i<elementRefArray.length; i++)
  var elementRef = elementRefArray[i];

  if ( (elementRef.type == 'text') && (elementRef.gridTextBoxType == 'totalsTextBox') )
   elementRef.value = textBoxTotals;
// -->


protected void Gridview1_RowDataBound(object sender, Grid

Its a task which had never before... how to get column and design in gridview Dynamic based on value



I need to generate gridview based on table value... let us consider i have in my aspx page one dropdownlist in which i have binded somevale

for example: dropdownlist contain:- Item1

based on Item1 i have three table first table conists A,B,C,D value.

Second Table consist 1,2,3,4,5

Third Table consist (0.5,0.6,0.7) for 1, (0.7,1.0) for 2, (0.6) for 3, (0.8) for 4, and another(0.8) for 5

based on this three table i need to show girdview like this which is below

If its Item2 dropdownlist then row  and column of girdview will be any number based on first,second,third table value for Item2

like this if Item3 dropdownlist then row  and column of girdview will be any number based on first,second,third table value for Item3.

help me to achieve dynamic rows and column based on database value... 

Its a very help if you guys will give me code in asp.net C#....

Google Maps API with Gridview


I am attempting to create an ASP.NET website that incorporates Google Maps to geocode the location of bus stops that the user selects from a gridview that is bound to a SQL database.  Any ideas on how to use a buttonfield to pass the address (text) for a given row to a command that will geocode that address and place a marker on the map?

How to Resize Button Field in gridview if we use Google chrome browser


Hi Everybody,

  I am using google chorme to test my asp.net application. In that <asp:buttonfield> control with in gridview is not resized. I am able to rotate text using following code.

 -webkit-transform: rotate(90deg);

But I am not able to resize the <asp:buttonField>.Please help me to resolve this.

Thanks in Advance.



Inplace Edit in GridView

In this article I am presenting a different way to look at EditItemTemplate, using which user navigation for editing is reduced and . it looks very different (see screeen shots) then regular implementation of GridView.

GridView Confirmation Box Using JQuery BlockUI in asp.net

JQuery is the most popular JavaScript library. One of the main reasons for its fame is the plugin architecture. Anyone can create a separate library that leverage the JQuery library. In this article we are going to look at the BlockUI library which is used to block the user screen while performing a task.

Textbox Editable GridView in ASP.NET

This article describes how I made a fully editable gridview in C# using ASP.NET 2. The idea is that the GridView looks and works like an Excel spreadsheet. You see all the cells in the table, and you can edit any of the cells you like, and they are automatically updated (i.e. saved to the database). This is very often how people expect data tables to work in web pages, and I've often seen people clicking in vain on un-editable gridview cells, somehow expecting to edit them, and not understanding that they need to click an Edit button at the end of the row.

Adding Dynamic Rows in ASP.NET GridView Control with TextBoxes and with Delete functionality

In my previous examples, I have demonstrated on how to add dynamic rows in GridView control with TextBoxes and how to save the values into the database. Now, seems that most of the developers are asking if how to add a delete functionality with it. So in this example, I'm going to show on how to delete a certain row in the dynamic GridView with TextBoxes.
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend