|
I am getting a text box value in to a variable by using java script
a=document.getElementById("mstxtOSRPoor1").value;
How can I trim this text?
Thanks in adv
Balasubramanian K.
|
|
|
|
|
Check this out:
http://www.delphifaq.com/faq/f1031.shtml
We are not a Code Charity
|
|
|
|
|
Thank you very much. It is very useful.
Balasubramanian K.
|
|
|
|
|
faching a problem
Error 1 'System.Data.OleDb.OleDbCommand' does not contain a definition for 'BeginExecuteReader
how to solve this problem
if i use this process in sqlserver 2000 then no problem
but i use this process in access then i faching a problem
Thank's and Best Regords
Ashutosh
|
|
|
|
|
Can you post your entire code
We are not a Code Charity
|
|
|
|
|
IAsyncResult BeginAsyncWork1(Object sender, EventArgs e, AsyncCallback cb, object state)
{
string db = Server.MapPath("~/DB/AsynchronousProcess.mdb");
string connectionstring = "Provider=Microsoft.Jet.OLEDB.4.0; Data Source='" + db + "';";
_connection1 = new OleDbConnection(connectionstring);
_connection1.Open();
int i;
for (i = 2; i <= 1001; i++)
{
_command1 = new OleDbCommand("Insert Into Information values('xyz',#01/01/01#)", _connection1);
_command1.ExecuteNonQuery();
}
return _command1.BeginExecuteReader(cb, state);
}
|
|
|
|
|
check you have
using System.Data.OleDb;
at the top of your page
We are not a Code Charity
|
|
|
|
|
Hi,
i have one radgrid binded to datasource (clusters) of type clusterinfo.
this is my code.
public clusterInfo clusters;
radgrid1.datasource=clusters;
my problem is,
i want to get selected row of radgrid ,with row type clusterinfo.
Thanks in advance.
madhavi.kona
|
|
|
|
|
How to select your row?
in your ASP you can do
<ItemTemplate>
<asp:ImageButton runat="server" ID="imgAnnul" CssClass="GridPlaatje" ImageUrl="~/Images/NewDesign/trashcan.png" CommandName="AnnulGrid" AlternateText="Delete" OnCommand="Grid_OnCommand" /><asp:ImageButton runat="server" ID="imgEdit" CssClass="GridPlaatje" ImageUrl="~/Images/NewDesign/pencil.png" CommandName="EditGrid" AlternateText="Edit" OnCommand="Grid_OnCommand" />
</ItemTemplate>
in your code behind you create the method
protected void Grid_OnCommand(Object sender, CommandEventArgs e)
which has the next lines of code
ImageButton btn = (ImageButton)sender;
GridViewRow row = (GridViewRow)btn.NamingContainer;
if (e.CommandName.Equals("EditGrid"))
{
radgrid1.EditIndex = row.RowIndex;
}
else if (e.CommandName.Equals("CancelItem"))
{
radgrid1.EditIndex = -1;
}
else if (e.CommandName.Equals(<name you="" choose="">))
{
}
radgrid1.SelectedIndex = -1;
</name>
|
|
|
|
|
Hi,
I am using the MVVM Pattern to develop a wpf application.
Here I am unable to bind the selected row of a datagrid from view to viewmodel.
the code is like this:
<telerik:RadGridView ReorderColumnsMode="Interactive" Height="251" HorizontalAlignment="Left" SelectedItem="{Binding SelectedListCollection,Mode=Default}" Width="Auto" AutoGenerateColumns="False" ItemsSource="{Binding UserListCollection, Mode=TwoWay}">
both the SelectedListCollection and UserListCollection are of same type.
ObservableCollection<UserEntity>SelectedListCollection
ObservableCollection<UserEntity>UserListCollection
Can any one help me please....
Thanks in advance.
|
|
|
|
|
i am trying to convert any video file into .flv format. .avi,.wmv,.mpeg also convert successfully but .3gp not convert to .flv format. i will get zero bytes.. pls help me
Process ffmpeg; // creating process
string video;
string mpg;
video = HttpContext.Current.Server.MapPath("inputfolder\\uploads\\" + FileUpload1.FileName); // setting video input name with path
mpg = Page.MapPath("") + "\\video.flv"; // thumb name with path !
ffmpeg = new Process();
ffmpeg.StartInfo.Arguments = " -i " + video + "-s 480*360 -deinterlace -ab 32 -r 15 -ar 22050 -ac 1 " + mpg; // arguments !
ffmpeg.StartInfo.FileName = Page.MapPath("ffmpeg\\ffmpeg.exe");
ffmpeg.Start(); // start !
ffmpeg.WaitForExit();
ffmpeg.Close();
string AppPath = Request.PhysicalApplicationPath; //This is the path of your application
//string inputPath = AppPath + "ffmpeg\\myVideo.wmv"; //Source Video Path
string inputPath = AppPath + "inputfolder\\uploads\\video.flv";
inputPath = FileUpload1.PostedFile.FileName;
FileUpload1.SaveAs(MapPath("inputfolder/" + FileUpload1.FileName));
string outputPath = AppPath + "outputfolder\\" + FileUpload1.FileName.Split('.')[0] + ".flv"; //Destination Video Path
string fileargs = " -i ";
fileargs += "\"" + inputPath + "\"";
fileargs += " \"" + outputPath + "\""; //Command Line
Process proc = new Process();
proc.StartInfo.FileName = AppPath + "ffmpeg\\ffmpeg.exe"; //Path of FFMPEG
proc.StartInfo.Arguments = fileargs;
proc.StartInfo.UseShellExecute = false;
proc.StartInfo.CreateNoWindow = false;
proc.StartInfo.RedirectStandardOutput = true; ;
proc.StartInfo.RedirectStandardError = true;
proc.Start();
System.Threading.Thread.Sleep(1000);
string strErr = proc.StandardError.ReadToEnd();
proc.WaitForExit();
|
|
|
|
|
You asked this last week, were the answers not suitable?
We are not a Code Charity
|
|
|
|
|
i saw your reply but it is not suitable in my project
|
|
|
|
|
Hi i am binding datas to my grid in run time,,
Its auto generate columns...,
I given my grid width =100% its inside a panel...,
I like to allocate width for my columns...,
So i used this code after databind in my grid...,
for (int r = 0; (r <= (gvViewData.Columns.Count - 1)); r++)
{
gvViewData.Columns[0].ItemStyle.Width = Unit.Percentage(10);
gvViewData.Columns[1].ItemStyle.Width = Unit.Percentage(20);
gvViewData.Columns[2].ItemStyle.Width = Unit.Percentage(40);
gvViewData.Columns[3].ItemStyle.Width = Unit.Percentage(15);
gvViewData.Columns[4].ItemStyle.Width = Unit.Percentage(15);
}
But its not at all considering the what i have allocated for my items...,
any one help me to solve this...,
Anyother solution is there?,
Thanks & Regards,
NeW OnE,
please don't forget to vote on the post
|
|
|
|
|
New one wrote: for (int r = 0; (r <= (gvViewData.Columns.Count - 1)); r++)
Yet you don't use r for anyting. How bizarre.
Why don't you set this up in the aspx instead ?
Christian Graus
Please read this if you don't understand the answer I've given you. If you're still stuck, ask me for more information.
|
|
|
|
|
If i use r also it wont work..,
Whatever i cant allocate width for items properly ,
how to solve this
plz help me
Thanks & Regards,
NeW OnE,
please don't forget to vote on the post
|
|
|
|
|
If you know how many gridview columns there are why not put it in the gridview in the front end code i.e.
<ItemStyle Width="10%" />
We are not a Code Charity
|
|
|
|
|
i know how many columns and same time i dont like to use databound columns...,
Thats y i said its auto generate columns..,.,
Anyway if u give bound column also its not at all considering...,
Its considering only grid view width...,
according to that its taking its own space for columns
Thanks & Regards,
NeW OnE,
please don't forget to vote on the post
|
|
|
|
|
I am using VS 2008 as IDE and developed web application. I am putting all the messages shown to the users in a resx file in App_GlobalResources/App_LocalResources directory. I am unable to access the resource using,
Resources.TooltipResource.MNT_CLIENT_SELECT
which is previously working fine with Website (project type).
Can anyone help me to fix this problem?
|
|
|
|
|
The problem is solved.
Previously I created under App_LocalResources and then drag dropped it into the App_GlobalResources. I removed it and created new in App_GlobalResources. Now I am able to access it.
|
|
|
|
|
DataRow drow = dt.NewRow();
drow[ddlFacilityName.SelectedItem.Text] = "<font color='Red'>" + m_dtCSV1.Rows[i][ddlFacilityName.SelectedItem.Text].ToString() + " is not found </font>";
"<font color='Red'>" working in DataGrid but not in GridView so what can I do in case of grid view.
thanks
You get the best out of others when you give the best of yourself.
|
|
|
|
|
What does 'not working' mean ? What happens ? Is the gridview HTML encoding your text ?
Christian Graus
Please read this if you don't understand the answer I've given you. If you're still stuck, ask me for more information.
|
|
|
|
|
It is giving output like this.
<font color='Red'>Resources12256$Test Resources56 is not found </font>
but I want "Resources12256$Test Resources56 is not found" in RED color. in GridView
thanks
You get the best out of others when you give the best of yourself.
|
|
|
|
|
OK, so it's HTML encoding it. The problem is you can't do this at the level of the data row, you have to do it at the level of the template in the gridview. You need to add code to the template that makes it red if you want it to be red.
Christian Graus
Please read this if you don't understand the answer I've given you. If you're still stuck, ask me for more information.
|
|
|
|
|
ok,how to do it and how can I do in red color particular item only in gridview but It will be dynamic some time needed or some time not.
thanks
You get the best out of others when you give the best of yourself.
|
|
|
|