|
Thanx
|
|
|
|
|
If you using visio studio to create it, you can simply change the style by
1. select the datagrid
2. open the properties windows
3.click the Auto Format
at there you can chose the predefined style of the datagrid.
hope you can find it.
|
|
|
|
|
Hi
am trying to bind the data to table control.
what i need is the table should have only two columns and it should have some 30 rows.
how to do this?
thanks in advance
|
|
|
|
|
Hi, try to use the DataGrid control from asp.net, there you can say
dgMyDatagrid.DataSource = dtMyDataTable;
dgMyDatagrid.DataBind();
and it's fixed
Greetings,
KrIstOfK
|
|
|
|
|
Hi,
Plase a Table control on the UI, SO it generates a code for CodeBehind as like
=======>Protected WithEvents Table1 As System.Web.UI.WebControls.Table
Then declare variables as followes
Private tableRow As New System.Web.UI.WebControls.TableRow
Private tableRowCells(1) As System.Web.UI.WebControls.TableCell
and Code as followes
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
tableRow = New System.Web.UI.WebControls.TableRow
tableRowCells(0) = New System.Web.UI.WebControls.TableCell
tableRowCells(1) = New System.Web.UI.WebControls.TableCell
tableRowCells(0).Text = "A"
tableRowCells(1).Text = "B"
tableRow.Cells.AddRange(tableRowCells)
Table1.Rows.Add(tableRow)
End Sub
Now suppose if you are displaying data from a dataset, you can have loop and can also ristrict to any number of recs to display using loop
hops this helps
Chinna Srihari
Tech Lead, Capgemini
|
|
|
|
|
I need to display my data in the dropdownlist in ascending order. i can't find the properties to allow me make it happen. How i do to sort the dropdownlist ? coding or just chosing the properties? Thanks...
|
|
|
|
|
When you bind an arraylist to your dropdownlist you can first sort the arraylist and then bind the data to the dropdown
myArrayList.Sort();
you can also make a comparer to sort it like you want or implement IComparer if the arraylist contains self-made class-objects.
Afterwards you can get your collection of items by myDropDownList.Items which will get you a list of listitems
|
|
|
|
|
I no use array to sort the items. My dropdownlist's items is load from the database, so how i code to sort the list before i bind the dropdownlist..thanks.
|
|
|
|
|
You can get the data in the sorted order from the database itself.
Best Regards,
Apurva Kaushal
|
|
|
|
|
There are two ways to achive this
1. When populating dropdownlist from database include the sorting there and there itself (by default ASC / DESC)
2. If you are populating from XML or code creats a dataset with specific column and set as following
.<tablename>.DefaultView.Sort = .<tablename>.<columnname>.ToString
is same at both the ends
Chinna Srihari
Tech Lead, Capgemini
|
|
|
|
|
There are two ways to achive this
1. When populating dropdownlist from database include the sorting there and there itself (by default ASC / DESC)
2. If you are populating from XML or code creats a dataset with specific column and set as following
<dataset>.<tablename>.DefaultView.Sort = <dataset>.<tablename>.<columnname>.ToString
<dataset> is same at both the ends
Chinna Srihari
Tech Lead, Capgemini
|
|
|
|
|
I sort the problem already by you all helping...Thank for you all !!
|
|
|
|
|
After opening word document in the browser, back button is getting disabled. How to enable the back button?
|
|
|
|
|
How to insert or add a table in powerpoint presentation from ASP.NET using C#?
|
|
|
|
|
First of all: I don't think this belongs to the asp.net section, but in the C# forum.
To answer your question: how do you generate your powerpoints. You use xml based generation or interops or something else?
|
|
|
|
|
|
|
Hey,
One of our clients wanted to integrate an accounting tool to the website basically for calculating commissions for his network-marketing. If any of you had come across similar tool or know of any, plz let me know...
Thanks in Advance...
-- modified at 7:43 Thursday 11th May, 2006
|
|
|
|
|
Are you the same person that asked about an accounting library a while back? If so, you got some suggestions. Did you pursue any of them and what did you think? If not just ignore me. I'm getting tired and should go sleep now.
The enemy's gate is down.
Welcome to CP in your language. Post the unicode version in My CP Blog [ ^ ] now.
People who don't understand how awesome Firefox is have never used CPhog. The act of using CPhog alone doesn't make Firefox cool. It opens your eyes to the possibilities and then you start looking for other things like CPhog and your eyes are suddenly open to all sorts of useful things all through Firefox. - (Self Quote)
|
|
|
|
|
i have a datagrid in my page. Each row of the datagrid consists a button to allow user to open a new window to display data. My problem is how i open EACH record details in a SEPARATE window when i click the button?
Can show me some sample code? Thanks.
-- modified at 2:20 Thursday 11th May, 2006
|
|
|
|
|
You can add some javascript to all the buttons in the datagrid at the time of binding the rows of the datagrid. The javascript will open a new window where you can display the data you want.
Best Regards,
Apurva Kaushal
|
|
|
|
|
How to apply javascript in all button in the datagrid? Can you give me some sample code? Or do you have another solution besides using javascript because i use VB code in ASP.Net to develop this page. Thanks
|
|
|
|
|
Hi,
You can use OnItemDataBound event of the datagrid to attach the javascript code to all the buttons. This event gets fired for all the rows of the datagrid. In this event you find the button control and add the javascript code using ButtonID.Attributes.Add.
Best Regards,
Apurva Kaushal
|
|
|
|
|
first in button function declare a string variable
Public str as string = e.item.cell[0].text
Now create an object for the window you want to open.
Now on the form load of that window write the following code.
if u r using the oledbconnection then
dim con as new OLedbconnection("Provider=;DataSource=;)
con.open
dim str as string = "select * from tablename where id = " + str
dim cmd as new oledbcommand("select * from tablename",con)
datagrid1.datasource = cmd.executereader()
datagrid1.databind()
Enjoy
|
|
|
|
|
What is basic diff between , datareader and repeater and record set
and what is diff between all above and dataset
|
|
|
|