|
but i am binding grid at run time so how can i do that
|
|
|
|
|
Try this
dgTableCreator.HeaderRow.Cells[1].Width = System.Web.UI.WebControls.Unit.Pixel(50)
|
|
|
|
|
This needs to be done in rowdatabound event for the row - dataheader .....
|
|
|
|
|
I am Trying to Display Serial No and Paging in datagrid.
----------------Bind Function-------
Private Function Bindxx()
dgxx.DataSource = objxx.Getxx()
dgxx.DataBind()
Private i As Integer = 0
Private Item As DataGridItem
For Each Item In dgxx.items
i += 1
Item.Cells(0).Text = i
Next
End Function
----------------------------------Paging----------
Private Sub dgxx_PageIndexChanged(ByVal source As Object, ByVal e As System.Web.UI.WebControls.DataGridPageChangedEventArgs) Handles dgStudents.PageIndexChanged
dgStudents.CurrentPageIndex = e.NewPageIndex
BindStudents()
End Sub
------------------------------
If I set 5 rows Page size, For the First page It will display Perfect Serial No. Now When I click 2nd Page I will dispaly same serial No 1,2,3,4,5 but I want 6,7,8 etc.
Mkanchha
|
|
|
|
|
Use this formula for the serial number column of the DataGrid
(PageIndex * pagesize) + ItemIndex +1
|
|
|
|
|
THanks for Your Replay. But this formula where to write and How?
Mkanchha
|
|
|
|
|
I am using ASP.NET 1.1
Mkanchha
|
|
|
|
|
Hi,
There is an event for the datagrid called ItemDataBound. Suppose your datagrid name is dgrd1. Write the following code under that event.
public void dgrd1_ItemDataBound(object sender, System.Web.UI.WebControls.DataGridItemEventArgs e)
{
if(e.Item.ItemType != ListItemType.Header && e.Item.ItemType != ListItemType.Footer)
{
e.Item.Cells[0].Text=Convert.ToString(e.Item.DataSetIndex + 1);
}
}
Meeram395
|
|
|
|
|
Thanks a Lots. It's worked Prefect.
Mkanchha
|
|
|
|
|
|
I have Quick Test Professional testing tool. But how to use in our dotnet applications. How do we write the script in this testing tool for our dotnet applications? Any one knows , pls give the step by step process.
|
|
|
|
|
i have some textbox on form which have some validation on it's validate event, that work fine but when user open form & directly click on close button of form then , validated event of textbox fired first how can i prevent this
|
|
|
|
|
You can set a property that says if you should validate an empty control or not.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Where are you validating your textbox means after which event you are firring the javascript ?
Thanks and Regards
Sandeep
If you want something you never had,
do something you have never done!
|
|
|
|
|
I would suggest that don't validate the controls for close button. And to achieve the same you need to set the "CauseValidation" property of the control to false.
|
|
|
|
|
when i use Convert.ToDateTime() & pass String Which has date like "15/04/2007". Convert.ToDateTime() return error Passed String is not Recognize datetime formate.
|
|
|
|
|
Maybe your locale settings expected 04/15/2007 ?
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Specify the culture that you want to use for parsing the string, or use DateTime.ParseExact with the "dd/MM/yyyy" format to parse that exact date format.
---
single minded; short sighted; long gone;
|
|
|
|
|
I would suggest that use the overloaded method Convert.ToDateTime (string,System.IFormatProvider) Create an object of type IFormatProvider and then assign the datetime format as string to it....
Ask me if you have anymore queries !!
|
|
|
|
|
Hi all,
how can i get the HTML content of another website [as a string or something like that ]. Any help would be appreciated.
Thanks in advance.
Ali
|
|
|
|
|
Yes you can do that using HttpWebRequesr and response.GetResponseStream(); method that return html in stream .Play around it you will definatly get solution
<br />
HttpWebRequest myHttpWebRequest = (HttpWebRequest)WebRequest.Create(URL);<br />
<br />
HttpWebResponse response = (HttpWebResponse)myHttpWebRequest.GetResponse();<br />
resStream = response.GetResponseStream();<br />
Thanks and Regards
Sandeep
If you want something you never had,
do something you have never done!
|
|
|
|
|
hi sandeep thanks for the help,
but i had already tried this but i get the html upto the starting of tag...
thanks,
Ali
|
|
|
|
|
hi all
i am budling modun check domain on my website
How do i can check a domain exist on Internet ???
some body show for me
|
|
|
|
|
good day to everyone, i would like ask if asp.net is also capable in using classes like vb.net? or modules?
thanks
start a new beginning in every ending; thats what life for......
|
|
|
|
|
moomoooomoo wrote: asp.net is also capable in using classes like vb.net?
ASP.NET is a server side language which can be written using c# and VB.NET.
|
|
|
|