|
Hope this helps u.
private void dgGrid_PageIndexChanged(object source, System.Web.UI.WebControls.DataGridPageChangedEventArgs e)
{
dgGrid.CurrentPageIndex = e.NewPageIndex ;
DataSet ds = GetEmployeeList();//Bind List again
}
|
|
|
|
|
hi it didnt work...
here is my code ... can u please tell me what is wrong with it ?
thanks alot.
private void Page_Load(object sender, System.EventArgs e)
{
if (!IsPostBack)
{
FillDataGrid();
}
}
private void FillDataGrid()
{
cUpload upload=new cUpload();
bool Success;
dsUpload1=upload.GetAllUpload(out Success);
if(Success)
{
dgUpLoad.DataSource=dsUpload1.tblUpLoad;
}
dgUpLoad.DataBind();
}
private void dgUpload_PageIndexChanged(object source, System.Web.UI.WebControls.DataGridPageChangedEventArgs e)
{
cUpload upload=new cUpload();
bool Success;
dgUpLoad.CurrentPageIndex= e.NewPageIndex ;
dsUpload1=upload.GetAllUpload(out Success);
//Bind List again
}
|
|
|
|
|
What is out Success and dgUpLoad.DataSource=dsUpload1.tblUpLoad;??
U can dierctly bind datagrid with dataset.
|
|
|
|
|
Thats because I want to bind My datagrid to dataset which is connected to table name tblupload ...
the items which is shown in datagrid is the items in my table ( tblupload ) ...
So,If you have any suggestion please correct my code above and write it here...thanks alot
|
|
|
|
|
No need to that way.Try this:
Dim strSql as String
strsql = "Select * from tblupload"
'Open DB connection here
Dim dtad As SqlDataAdapter
Dim dtst As DataSet
dtst = New DataSet
dtad = New SqlDataAdapter(strsql, GetConnection)
'Close DB connection here
dtad.Fill(dtst)
DataGrid1.DataSource = dtst
DataGrid1.DataBind()
I think this much is enough to display the Datagrid.
|
|
|
|
|
1.the language I use is C#
2.I have problem with working numbers of pages not showing the grid.
thanks
|
|
|
|
|
Try this :
private void Page_Load(object sender, System.EventArgs e)
{
if (!IsPostBack)
{
FillDataGrid();
}
}
private void FillDataGrid()
{
string strsql = "Select * from tblupload"
//Open DB Connection here
DataSet ds = con.GetDataSet(SQL,tableName);
DataGrid1.DataSource = ds;
DataGrid1.DataBind();
//Close DB Connection here
}
private DataSet GetDataSet(String sql)
{
string tableName = "tblupload";
SqlDataAdapter da = new SqlDataAdapter(sql, connectionStr);
da.Fill(ds, tableName);
return ds;
}
|
|
|
|
|
Hi All,
I have 2 combo, a textbox and a checkbox. On Add button Click event(which is outside the Gridview) I put all the values in datatable and then bind it the GridView.
I am creating dynamically columns for datatable and keeping them in Viewstate.I have two columns of edit and delete in Girdview.Now my problem is that when I click on edit image button which is in the Gridview Edit column I want to add the above combo ,textbox and checkbox in the gridview so that I can edit that row.
Also I need to delete the record.
Can anyone tell me how do I do this.
Thanks in advance.
-- modified at 5:12 Thursday 1st February, 2007
|
|
|
|
|
hi alll,
how can i get the ajaxToolkit:PopupControlExtender.
control to use in as.net 2.0 project.
pls help.
thanks in advance.
srinandan.
-- modified at 4:27 Thursday 1st February, 2007
|
|
|
|
|
Download the toolkit, add the DLL as a reference, add the control to the toolbox (right click->choose items, browse to the DLL). Hey presto....but then it would of been easier to read the instructions....
|
|
|
|
|
How to do load balancing in an application
Regards,
Sylvester G
Senior Software Engineer
Xoriant Solutions
|
|
|
|
|
|
Hi friends
i have bit probelm
my code is.
TextBox txt1 = new TextBox();<br />
foreach(Control txt in tbl.Controls)<br />
{<br />
if (txt is TextBox)<br />
{<br />
txt1 = (TextBox)Convert.ChangeType(txt, typeof(TextBox));<br />
txt1.Text = string.Empty;<br />
} <br />
<br />
<br />
}
tbl is my table in which i have many textboxes.
plz help me
its urgent.
thanks in advance
Pathan
|
|
|
|
|
Hi,
Is this not working?
txt1.Text = "";
|
|
|
|
|
hi atul
i have tried it too.
but not working
pathan
|
|
|
|
|
tbl.Controls only contains the controls directly contained by the table, in other words TableRows. These contain Cells, which contain the Textboxes. So either you find an easier way, like adding the Textboxes to a List, to do this or
<code>foreach (TableRow tr in tbl.Rows)
foreach (TableCell tc in tr.Cells)
foreach (Control txt in tc.Controls)
if (txt is TextBox)
{
((TextBox)txt).Text = String.Empty;
}</code>
|
|
|
|
|
Hi! Suppose that there is an aspx page say base.aspx. in this page threr is a iFrame. on base page there is two tabs A & B. on clicking tab A, the source of the iFrame become a.aspx & on clicking tab B, source of the iFrame become b.aspx. now i want to show a progress bar on the base page until the target page is not loaded completely. can any one help me???
Thanks & Regards,
SAMir Nigam,
Software Developer,
STPL, Lucknow, India.
|
|
|
|
|
Hi
Created a small VB 6.0 ActiveX control Which has an event CallMe. This event is triggered when a button the control is clicked.
Public Event CallMe()
Public Property Let Text(value As String)
txtString.Text = value
End Property
Public Property Get Text() As String
Text = txtString.Text
End Property
Private Sub cmdFireEvent_Click()
RaiseEvent CallMe
End Sub
I have tested it with a VB 6 project and it worked.When i tried to use the control in a web page, events are not getting fired.
Sub myCtrl_CallMe()
MsgBox "yes"
End Sub
<object id="myCtrl"
classid="clsid:55F1D62E-0C61-4637-BA76-594B493A0341">
What should be the problem?
|
|
|
|
|
but MsgBox not run on the web plz use response.write.............
Parwej Back...............DON of Developer.......
Parwej Ahamad
g_parwez@rediffmail.com
|
|
|
|
|
Hi
I need to choose files by dragging from widows to browser in asp.net. the list of dragged files should be in any one of the container like data grid,list item ,etc anyone please give me some idea or code related this
Regards
Pavel
r_palanivel83 10:01 4 Jan '06
|
|
|
|
|
could someone please suggest to me a query i can run on the query analyzer to retrieve logical file name (physical file location) of a database?
|
|
|
|
|
Hi John,
To get file info, you can use system's "sp_helpfile" stored procedure. This will return full information of all the files used by current database.
Atul.
IBM India
|
|
|
|
|
|
i want to create short cut keys in web page in ASP.NET. can we use Ctrl or Shift button with short cut keys in web browser?? if Yes plz tell me.
Anas
|
|
|
|
|
Plz read the
SendKey()
window.event.keyCode
It will be helpfull.........
Parwej Back...............DON of Developer.......
Parwej Ahamad
g_parwez@rediffmail.com
|
|
|
|