|
yeah which as i said, can use red to set form to be transparent and controls still visible. I can only work with the info the OP gives that why i asked more questions
Life goes very fast. Tomorrow, today is already yesterday.
|
|
|
|
|
How To Save image in any directory/foldar and how to show image in any picturebox in windows application
|
|
|
|
|
Did you even try it? It's very easy, I can't imagine you actually need help with this..
|
|
|
|
|
I actually wonder what is taught on collleges, if we always get question by clearly clueless people.
I mean, college is hardly learning by doing, it should much more theory than praxis.
So, that must mean people that post such clueless questions here don't pay attention during lessons.
|
|
|
|
|
programming is not for you
Life goes very fast. Tomorrow, today is already yesterday.
|
|
|
|
|
|
cdz plz rgnt!
Panic, Chaos, Destruction.
My work here is done.
|
|
|
|
|
We may provide the code, indeed. As payment you might teach us about: "how to post silly questions on forums".
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
Hi,
I need develop an quiz project using GridView Control .
I try to include question with RadioButtonList in single cell but i am unable to embeded RadioButtonList for GridView Control .kindly suggest me how to solve this problem.
Thanks,
Murugan k
|
|
|
|
|
Hi,
Try out like this:
<asp:GridView ID="GridViewContactOptions" runat="server"
AutoGenerateColumns="False" DataKeyNames="ID"
DataSourceID="AccessDataSourceContactOptions" Width="494px">
<Columns>
<asp:BoundField DataField="ID" HeaderText="ID" InsertVisible="False" ReadOnly="True" SortExpression="ID" />
<asp:BoundField DataField="AccountNo" HeaderText="AccountNo" SortExpression="AccountNo" />
<asp:BoundField DataField="Contact" HeaderText="Contact" SortExpression="Contact" />
<asp:TemplateField HeaderText="HN">
<ItemTemplate>
<asp:RadioButtonList AutoPostBack="true" ID="RadioButtonListHydraNotes" runat="server" Enabled="true"
RepeatDirection="Horizontal" TextAlign="Left" SelectedIndex='<%#Convert.ToInt32(DataBinder.Eval(Container.DataItem , "HydraNotes"))%>'
OnSelectedIndexChanged="rbl_SelectedIndexChanged">
<asp:ListItem Value="1">E</asp:ListItem>
<asp:ListItem Value="2">F</asp:ListItem>
<asp:ListItem Value="3">M</asp:ListItem>
</asp:RadioButtonList>
</ItemTemplate>
</asp:TemplateField>
</Columns>
</asp:GridView>
|
|
|
|
|
this is my array syntax..
int[,] numbers = { { 1, 1 }, { 1, 2 }, { 1, 3 }, { 2, 4 }, { 2, 5 }, { 2, 6 }, { 2, 7 }, { 3, 8 }, { 1, 9 }, { 1, 10 }, { 2, 11 }, { 3, 12 }, { 2, 13 }, { 1, 14 }, { 1, 15 } };
now my question is
i want 2 delete frist element of 1's means delete {1,1},{1,2},{1,3},{1,9},{1,10},{1,14},{1,15}
my o/p should be like this :{2,4},{2,5},{2,6},{2,7},{3,8},{2.11},{3,12},{2,13}
please can u tell me how to do this ..
thanx in advance brothers..
Some Thing need 2 do NEW
modified on Tuesday, March 24, 2009 8:08 AM
|
|
|
|
|
int[,] numbers = {{2,4},{2,5},{2,6},{2,7},{3,8},{2,11},{3,12},{2,13}};
edit: sorry copied the wrong thing first
but now more serious, you probably have and array of small 2-length arrays and you want to remove the fist of all pairs and let the rest fill up the gaps Without knowing the array in advance. Otherwise it just doesn't make sense.
But that isn't too hard..
|
|
|
|
|
ok thns brother ,. i ll try with u r logic..
Some Thing need 2 do NEW
|
|
|
|
|
Ok yes let me help some more then, cause I didn't actually do anything to help yet
Anyway, what I would probably do, if it is sure that you number of elements will halve, create a new int[2,length/2] , scan through the old array and only use the correct places like:
int[,] result = new int[2,array.GetLength(0)/2];
for (int i = 0; i < array.GetLength(0); i++)
{
result[i&1,i/2] = array[1,i];
}
I hope that is what you mean?
edit: aah no it is not what you mean, but it's close..
Ok this is harder, since you don't know the size of the result yet..
maybe first put all elements that are not 1 into a List<int> and then turn that into an int[2,List.Count/2] ?
|
|
|
|
|
OK new code
List<int> temp = new List<int>;
foreach (int i in array)
temp.Add(i);
int[,] result = new int[2,tmp.Count/2];
for (int i = 0; i < temp.Count; i++)
result[i&1,i/2] = temp[i];
warning: untested
|
|
|
|
|
thnx dude..
Some Thing need 2 do NEW
|
|
|
|
|
ok yea don't use it though, I still messed up!
I'm really not in shape today
Ok, attempt #3
List<int[]> temp = new List<int[]>();
for (int i = 0; i < array.GetLength(1); i++)
{
if (array[0,i] != 1)
temp.Add(new int[] { array[0,i], array[1,i] });
}
int[,] result = new int[2,temp.Count];
for (int i = 0; i < temp.Count; i++)
{
result[0,i/2] = temp[i][0];
result[1,i/2] = temp[i][1];
}
Untested, but I think it should be alright..
|
|
|
|
|
Nope, try again
your second for loop will chuck an error when trying to access i/2 as your loop is incremnting by only 1
...well if it does work it will be the wrong index
...actually you may just get a 'divide by zero' error on first run
Life goes very fast. Tomorrow, today is already yesterday.
|
|
|
|
|
There is no opportunity to divide by zero
Ok maybe that divide by 2 makes no sense after all, it seemed like a good idea at the time
|
|
|
|
|
harold aptroot wrote: There is no opportunity to divide by zero
...my bad
Life goes very fast. Tomorrow, today is already yesterday.
|
|
|
|
|
thanx buddy..
Some Thing need 2 do NEW
|
|
|
|
|
What is it your trying to achieve? do you want to remove any array items that start with 1?
if so you just need to loop the original array and copy and items that do not start with a one to a new output array
Life goes very fast. Tomorrow, today is already yesterday.
|
|
|
|
|
thanx musefan ...
yes i want 2 remove start with 1 ..can u tell me do u have any code like kind of this probelm..
Some Thing need 2 do NEW
|
|
|
|
|
ok ill try give you a sample but im not sure if with compile but will hopefully give you an idea if it does not...
int[,] RemoveEntries(int[,] original, int numberToRemove)
{
System.Collections.ObjectModel.Collection<int> newVals = new System.Collections.ObjectModel.Collection<int>();
for(int i = 0; i < orignal.GetLength(0); i++)
{
if(original[i, 0] != numberToRemove)
{
newVals.Add(original[i, 0]);
newVals.Add(original[i, 1]);
}
}
int[,] result = new int[newVals.Length/2, 2];
int count = 0;
for(int i = 0; i < newVals.length; i+=2)
{
result[count, 0] = newVals[i];
result[count, 1] = newVals[i+1];
count++;
}
return result;
}</int></int>
Its prob not the most effecient way but I have not worked with 2D arrays in a while and thought it best to post something that has a better chance of working.
Hope this helps
Life goes very fast. Tomorrow, today is already yesterday.
|
|
|
|
|
I have a dataGridView whos datasource is a bindingSource.
When I recompile my solution all the bindingSource fields are added into the dataGridView again. How can I stop this please?
Oh, and AutoGenerateColumns is set to False
modified on Tuesday, March 24, 2009 8:32 AM
|
|
|
|
|