|
Get It Rich Text Editor
Best Regard
Pathan
---------------------------------------------------
|
|
|
|
|
|
I have a databound GridView-component on an ASP.NET page.
I need to display 12 months in that GridView. Sometimes the Stored Procedure reutrns less than 12 months of data (incomplete year of data like current year).
In that case I need to add rows to the gridview with Monthname and some 0 values in other cells.
How can I achieve this?
I found out already:
GridViewRow row = new GridViewRow(rownum, -1, DataControlRowType.DataRow, DataControlRowState.Normal);
But how to add filled cells to the row and how to add the created row to the already databound GridView ?
|
|
|
|
|
Easy, use a dataAdapter to get a datatable. Add new rows to the table.
<br />
DataTable dt new DataTable();<br />
YourDataAdapter.fill(dt);<br />
<br />
DataRow r = dt.NewRow();<br />
dt.Rows.Add(r);<br />
<br />
<br />
grid.datasource = dt;<br />
grid.databind();<br />
To sort use a dataview, good luck.
I didn't get any requirements for the signature
|
|
|
|
|
It was a hussle but this works:
Int32 position = grdClaimsData.Rows.Count;
GridViewRow row;
for (Int32 orgRijnum = 0; orgRijnum < 12 - position; orgRijnum++)
{
Int32 plek = position + orgRijnum + 1;
row = new GridViewRow(orgRijnum, grdClaimsData.Rows.Count, DataControlRowType.EmptyDataRow, DataControlRowState.Normal);
row.Cells.Add(new TableCell());
String MaandNaam = String.Empty;
switch (plek)
{
case 1: MaandNaam = "January"; break;
case 2: MaandNaam = "February"; break;
case 3: MaandNaam = "March"; break;
case 4: MaandNaam = "April"; break;
case 5: MaandNaam = "May"; break;
case 6: MaandNaam = "June"; break;
case 7: MaandNaam = "July"; break;
case 8: MaandNaam = "Augustus"; break;
case 9: MaandNaam = "September"; break;
case 10: MaandNaam = "October"; break;
case 11: MaandNaam = "November"; break;
case 12: MaandNaam = "December"; break;
default: MaandNaam = "Don't know the month-error"; break;
}
row.Cells[0].Text = MaandNaam;
row.Cells[0].Font.Bold = true;
Int16 Waarde = 0;
for (int i = 1; i < 11; i++)
{
row.Cells.Add(new TableCell());
if (i > 4)
row.Cells[i].Text = Waarde.ToString("C");
else
row.Cells[i].Text = "0";
}
row.HorizontalAlign = HorizontalAlign.Right;
grdClaimsData.Controls[0].Controls.AddAt(plek, row);
}
|
|
|
|
|
Hello !!
Actually i wanted to know that how can I display the contents of a .txt file in a table column in asp.net
Martand
|
|
|
|
|
File.ReadAllText(Server.MapPath("content.txt"));
It returns the content of .txt file as string format
Best Regard
Pathan
---------------------------------------------------
|
|
|
|
|
Is this supported in vs.net 2003.I am getting an error and ReadAllText does not exist in vs.net 2003
Mrinal
|
|
|
|
|
have U Declare namespance "System.IO" for File class.
Best Regard
Pathan
---------------------------------------------------
|
|
|
|
|
Hi,
I have a dropdownlist.on it selectedindexchange event i want to call a java script function.
how i do it.
i am using VisualStudio 2005.
Plz Tell me answer for it.
thanking u to all
|
|
|
|
|
Put this code .aspx.cs file.
ClientScript.RegisterClientScriptInclude((this.GetType), "MyScript", "JScriptFileName.js");
DrpArtifact.Attributes.Add("OnSelectedIndexChanged", "return ValidateFunction('" + DrpEntityType.ClientID + "');
satyaki mishra
|
|
|
|
|
I dont think "OnSelectedIndexChanged" is an event in javascript... instead try this:::
DrpArtifact.Attributes.Add("OnChange", "return ValidateFunction('" + DrpEntityType.ClientID + "');
|
|
|
|
|
Hello friends.. I am using datalist inside a datalist.
the problem is how to get datakey of the inner datalist for which the button is pressed....
|
|
|
|
|
|
|
|
I am using atlas framework for developing an application. And
in my aspx page having 3 buttons. it was working early but the minute when i insert an update panel it has not been working.. If anyone knows de answer plsss help mee.plsssssssss
-- modified at 6:35 Wednesday 5th September, 2007
Sarith...
|
|
|
|
|
What is the application indented to do?
What is going wrong?
How are the Buttons and the UpdatePanel related?
Are there other Ajax controls present? ScriptManager?
plssssssssssssssssssssssssss give some more information
-^-^-^-^-^-
no risk no funk ................... please vote ------>
|
|
|
|
|
I've started a website which works fine when I launch it with visual studio 2005 entreprise edition. But when I publish it on internet, the login page appears but when I want to use login control, an CONNECTION error ocures.
I use the ASPNETDB.MDF database to authenticate users.
And use 'Form' authentification mode.
any one can help me..
thanks
|
|
|
|
|
how can i get the animation text and picture working with ajax 2.0 from asp.net give in details.
lucky
|
|
|
|
|
|
use atlas u can easily do animations
Sarith...
|
|
|
|
|
what is atlas i don, t know hey i am software eng but i have knowledge of vb.net and c#.net, small konledge of asp.net i did not attend the class of asp.net atlas ajax so can u send me the attachment of notes of asp.net using with ajax atlas i want to create a web page using ajax2.0
send me :-
how ajax work
uses of ajax (atlas)
uses of toolbox
how can i animated the images and screensaver
byeeeeeeeeeeeee
lucky
|
|
|
|
|
http://www.asp.net/ajax
Even i am also not familiar with Atlas..
Sarith...
|
|
|
|
|
Atlas is the project name for ASP.NET AJAX.
Therefore it's the same thing.
-^-^-^-^-^-
no risk no funk ................... please vote ------>
|
|
|
|