|
The link points to the same thing posted by the OP. I am honestlly baffled.
|
|
|
|
|
Hi,
I have 2 dataset. I am getting values from database and binding same values to dataset1.
This method is written in refresh call so that what ever changes done or update done in the database that will be affected the values to that dataset1. but with the same time i m passing these same values from dataset1 to dataset2.
Now in that I want only those values that changed. Means i want only updated values so that my dataset2 will change accordingly. so by passing every time full dataset1 I want to pass or update only updated information.
Thanks
sjs
|
|
|
|
|
|
I want updated fields row only.
|
|
|
|
|
Hiii everyone
Actually i am geting memberid from database as 1,2,123,124 but i want to amend the id as 00001,00002,00123 etc.
Anyone can suggest me how i can get it. using array or any collection.
Thanks in advance
Gaurav Gupta
|
|
|
|
|
you can use split method then made a new id.
string _temp="1,12,123";
string[] arr=_temp.split(new char[]{','});
|
|
|
|
|
Hii Ali
Thnaks for the response but actually i have id like 1.Now i want to make the id 0001 dynamically using for loop and array.
e.g. if i have id 123 first read 3 then submit 3 in array which have 00000 now string have 12 read 2 and then submit in array noe 00023 i have now anly 1 remain get 1 and submit in array now id becomes 00123.Like that
Thanks
Gaurav
|
|
|
|
|
string formatted = 123.ToString("00000");
TVMU^P[[IGIOQHG^JSH`A#@`RFJ\c^JPL>;"[,*/|+&WLEZGc`AFXc!L
%^]*IRXD#@GKCQ`R\^SF_WcHbORY87֦ʻ6ϣN8ȤBcRAV\Z^&SU~%CSWQ@#2
W_AD`EPABIKRDFVS)EVLQK)JKQUFK[M`UKs*$GwU#QDXBER@CBN%
R0~53%eYrd8mt^7Z6]iTF+(EWfJ9zaK-iTV.C\y<pjxsg-b$f4ia>
-----------------------------------------------
128 bit encrypted signature, crack if you can
|
|
|
|
|
int id = 1;
string longID = string.Format("{0:00000}", id);
this will result in "00001";.45 ACP - because shooting twice is just silly ----- "Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997 ----- "The staggering layers of obscenity in your statement make it a work of art on so many levels." - J. Jystad, 2001
|
|
|
|
|
Hi,
When the data are integers, you store them as integers in the database, which will hold their value, and isn't interested in any formatting.
When you show such numbers, make sure to apply the format you want. One way of getting that is:
int a=123;
Console.WriteLine("a="+a.ToString("D5"));
|
|
|
|
|
i have a c# dll containing a public function
<br />
public double[,] sum(double[,] a,double[,] b)<br />
{<br />
}<br />
in and dynamic code execution, i am passing an array (double[,]) to the above function using reflection.
assigning Type to theMethod => parameterType=typeof(double[,]),
when executing the following statement, i got an error Exception has been thrown by the target of an invocation".
<br />
theMethod.Invoke(this, userParameters);<br />
any help please. thanks in advance
|
|
|
|
|
Hari Om Prakash Sharma wrote: in and dynamic code execution, i am passing an array (double[,]) to the above function using reflection.
It would help if you posted that code.
Hari Om Prakash Sharma wrote: //do a[,]+b[,] sum and returns the result.
And if you actually have code where you've placed that comment, probably would be helpful if you posted that too.
|
|
|
|
|
When you get an exception, read all available information.
That means, use Exception.ToString() and do not limit yourself to Exception.Message
|
|
|
|
|
Actually my Test.dll was not updated. I deleted it and pasted a new copy of DLL into bin folder. I dont know how this trick works but problem was solved! Thanks for your help.
|
|
|
|
|
I wanted to save bitmap file as vector image with emf extention.
bitmap.save(filepath, ImageFormate.Emf);
While running the program above line throws ArguementNull exception that "encoder value is null".
For getting encoder information :
ImageCodecInfo[] list = ImageCodecInfo.GetImageEncoder();
this list containing 5 element : BMP,JPEG, GIF, TIFF, PNG
These are the built -in- image codec.
But codec related to .emf is not there. Might be thats why exception is throwing.
Am I need to install codec for emf or there is any other solution?
Thanks alot....
|
|
|
|
|
http://stackoverflow.com/questions/152729/gdi-c-how-to-save-an-image-as-emf[^]
TVMU^P[[IGIOQHG^JSH`A#@`RFJ\c^JPL>;"[,*/|+&WLEZGc`AFXc!L
%^]*IRXD#@GKCQ`R\^SF_WcHbORY87֦ʻ6ϣN8ȤBcRAV\Z^&SU~%CSWQ@#2
W_AD`EPABIKRDFVS)EVLQK)JKQUFK[M`UKs*$GwU#QDXBER@CBN%
R0~53%eYrd8mt^7Z6]iTF+(EWfJ9zaK-iTV.C\y<pjxsg-b$f4ia>
-----------------------------------------------
128 bit encrypted signature, crack if you can
|
|
|
|
|
I want to have DataGridView that show nested data. it maybe have a column like treeview object.
It is on Windows form application.
any idea for it?Mahdi 82161021
|
|
|
|
|
Here is a complete list[^]
TVMU^P[[IGIOQHG^JSH`A#@`RFJ\c^JPL>;"[,*/|+&WLEZGc`AFXc!L
%^]*IRXD#@GKCQ`R\^SF_WcHbORY87֦ʻ6ϣN8ȤBcRAV\Z^&SU~%CSWQ@#2
W_AD`EPABIKRDFVS)EVLQK)JKQUFK[M`UKs*$GwU#QDXBER@CBN%
R0~53%eYrd8mt^7Z6]iTF+(EWfJ9zaK-iTV.C\y<pjxsg-b$f4ia>
-----------------------------------------------
128 bit encrypted signature, crack if you can
|
|
|
|
|
As the title says System.IO.Ports.SerialPort.Open() is catching TimeoutException popping a MessageBox and continuing to try to connect until I call close. I would prefer to catch the exception myself. Is there a setting somewhere in my VS8 that controls this? I don't see anything in the docs that mention it.
TIA,
Greg.
|
|
|
|
|
greg_martin wrote: System.IO.Ports.SerialPort.Open() is catching TimeoutException popping a MessageBox
Are you sure that is not in your code? According to the documentation[^] the Open() method neither throws nor catches TimeoutException .txtspeak is the realm of 9 year old children, not developers. Christian Graus
|
|
|
|
|
Your right. Mea culpa. I was expecting open to fail but it isn't it's the first read that is failing. Thanks.
|
|
|
|
|
greg_martin wrote: popping a MessageBox
Ummm... what?
|
|
|
|
|
the port has a letter box.
|
|
|
|
|
Another member when using code in one of my articles came across a peculiarity that I'm trying to resolve.
It seems that whenever the DataSource of a DataGridView is changed, if the mouse is over the Control, a WM_MOUSEMOVE (0x0200) message is generated
Is there any reason why this would be the case, and any idea of a workaround as the component does something on that message so this situation is causing undesired and unexpected behaviour!?
[Edit] The only quick workaround I can think of is to store and check against the previous lParam of this message to see if the mouse has actually moved - yuk! [/Edit]
[Edit2] The workaround using lParam is here[^] if anyone else comes across this. [/Edit2]
Dave
Binging is like googling, it just feels dirtier. (Pete O'Hanlon)
BTW, in software, hope and pray is not a viable strategy. (Luc Pattyn) Why are you using VB6? Do you hate yourself? (Christian Graus)
modified on Sunday, March 21, 2010 9:45 PM
|
|
|
|
|
Hi Guys!
I am in a bit of a Dilemma here and need some help. I have a table that has a row and three columns which are showed to the user after the page loads. There is a button which calls a code behind function to add a new row. The first time the user clicks, the row is added properly, no problem. The second time however, the row is not added but the previous row that was added is updated with the new id/name etc. Also the second time, the drop down menu gives an error which is quiet ridiculous, something to do with accessing innerHtml of the drop down menu when I am not even asking the compiler to assign anything of that sort. Please have a look and let me know where the problem is which my brain cells are failing to recognise.
Note: I have tried all the different methods to add the row for example table.Rows.Insert(index,htmlRow) etc.
Thanks is Advance.
Below id my code for reference:
=============================
Front End [HTML - Table only]
=============================
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
<table cellpadding="3" cellspacing="3" runat="server">
<tr>
<td style="font-family:Courier New; font-size:12pt;"><b>Loan Type</b></td>
<td style="font-family:Courier New; font-size:12pt;"><b>Amount Owing</b></td>
<td style="font-family:Courier New; font-size:12pt;"><b>Monthly Repayments</b></td>
</tr>
</table>
<table cellpadding="3" cellspacing="3" id="tblLoanTypes" runat="server">
<tr>
<td width="33%">
<select name="loanType1" id="loanType1" class="txtNormalDrp" runat="server">
<option value="" selected="selected">Please Select</option>
<option value="Home Loan">Home Loan</option>
<option value="Investment Loan">Investment Loan</option>
<option value="Credit Card">Credit Card</option>
<option value="Personal Loan">Personal Loan</option>
<option value="Store Cards">Store Cards</option>
<option value="Tax Debt">Tax Debt</option>
<option value="Other">Other</option>
</select>
</td>
<td width="33%"><input type="text" class="txtBalrepayments" name="balance1" id="balance1" onfocusout="fcnAddTotals();" onkeypress="return numbersonly(event, false)" /></td>
<td><input type="text" class="txtBalrepayments" name="mRepayments1" id="mRepayments1" onfocusout="fcnAddPayments();" onkeypress="return numbersonly(event, false)" /></td>
</tr>
</table>
<table>
<tr>
<td><asp:ImageButton ID="iBtnAddRow" runat="server"
ImageUrl="images/btnAddRows.jpg" onclick="iBtnAddRow_Click" /> <asp:ImageButton
ID="iBtnRemoveRow" runat="server" ImageUrl="images/btnRemoveRows.jpg"
onclick="iBtnRemoveRow_Click" />
</td>
</tr>
</table>
</asp:Content>
======================
Code Behind [.cs File]
======================
protected void iBtnAddRow_Click(object sender, ImageClickEventArgs e)
{
int iIndex = Convert.ToInt32(Session["iKeyIndex"]);
iIndex = iIndex+1;
//Instantiate and create new items
HtmlTableRow rTableRow = new HtmlTableRow();
HtmlTableCell cTableCellLoanTypeDropDown = new HtmlTableCell();
HtmlTableCell cTableCellBalance = new HtmlTableCell();
HtmlTableCell cTableCellMonthlyRepayments = new HtmlTableCell();
HtmlSelect hSelect = new HtmlSelect();
TextBox txtBalance = new TextBox();
TextBox txtRepayments = new TextBox();
try
{
///******************** First we create the drop down menu *******************************///
hSelect.Attributes.Add("name", "loanType" + iIndex);
hSelect.Attributes.Add("id", "loanType" + iIndex);
hSelect.Attributes.Add("class", "txtNormalDrp");
hSelect.Attributes.Add("runat", "server");
//Add the selection items to hSelect
ListItem lst = new ListItem("Please Select", "");
lst.Attributes.Add("Selected", "Selected");
hSelect.Items.Add(lst);
ListItem lst1 = new ListItem("Home Loan", "Home Loan");
hSelect.Items.Add(lst1);
ListItem lst2 = new ListItem("Investment Loan", "Investment Loan");
hSelect.Items.Add(lst2);
ListItem lst3 = new ListItem("Credit Card", "Credit Card");
hSelect.Items.Add(lst3);
ListItem lst4 = new ListItem("Personal Loan", "Personal Loan");
hSelect.Items.Add(lst4);
ListItem lst5 = new ListItem("Store Cards", "Store Cards");
hSelect.Items.Add(lst5);
ListItem lst6 = new ListItem("Tax Debt", "Tax Debt");
hSelect.Items.Add(lst6);
ListItem lst7 = new ListItem("Other", "Other");
hSelect.Items.Add(lst7);
//Assign the drop down to the first cell
//cTableCellLoanTypeDropDown.Controls.Add(hSelect);
///**************************************************************************************///
///*************** Second we create the Text box for Balance*****************************///
txtBalance.Attributes.Add("class", "txtBalrepayments");
txtBalance.Attributes.Add("name", "balance" + iIndex);
txtBalance.Attributes.Add("id", "balance" + iIndex);
txtBalance.Attributes.Add("onfocusout", "fcnAddTotals();");
txtBalance.Attributes.Add("onkeypress", "return numbersonly(event, false)");
//Assign the textbox to the second column
cTableCellBalance.Controls.Add(txtBalance);
///**************************************************************************************///
///*************** Second we create the Text box for Monthly Repayments******************///
txtRepayments.Attributes.Add("class", "txtBalrepayments");
txtRepayments.Attributes.Add("name", "mRepayments" + iIndex);
txtRepayments.Attributes.Add("id", "mRepayments" + iIndex);
txtRepayments.Attributes.Add("onfocusout", "fcnAddTotals();");
txtRepayments.Attributes.Add("onkeypress", "return numbersonly(event, false)");
//Assign the textbox to the third column
cTableCellMonthlyRepayments.Controls.Add(txtRepayments);
///**************************************************************************************///
///************************************ FINALLY *****************************************///
//Add the Row to the table
//tblLoanTypes.Rows.Insert((tblLoanTypes.Rows.Count+1), rTableRow);
tblLoanTypes.Rows.Add(rTableRow);
//Add the cells and rows to the table: tblLoanTypes
rTableRow.Cells.Add(cTableCellLoanTypeDropDown);
rTableRow.Cells.Add(cTableCellBalance);
rTableRow.Cells.Add(cTableCellMonthlyRepayments);
//Increase the index and save it to the session variable
Session["iKeyIndex"] = iIndex;
}
catch (Exception sError)
{
//Functions._sendEmail(Error generating Rows", System.Configuration.ConfigurationManager.AppSettings["sWebAdminEmail"].ToString(),
// "An error has occured generating Dynamic Rows on Error: " + sError.Message);
}
finally
{
//Flush all the declarations
hSelect.Dispose();
txtBalance.Dispose();
txtRepayments.Dispose();
cTableCellLoanTypeDropDown.Dispose();
cTableCellBalance.Dispose();
cTableCellMonthlyRepayments.Dispose();
rTableRow.Dispose();
}
}
P.S: Sorry but my previous post caused some issue to the forum. I appologise for any inconvenience caused.
Thanksmodified on Wednesday, March 17, 2010 3:16 PM
|
|
|
|
|