I have dynamically created labels which has id as "label+i". Those labels get their text from again dynamically created textboxes with id's as ""text"+i". I get total numbers of textbox from user. What I'm trying is if I get 12 labels I want to have 3 row in total. All rows has 4 columns in db. Max number of label will be 28 or 32 so there will not be a hundred of labels.
For example if I have
label1, label2, label3, label4,label5,label6,label7,label8
then first row of database will be
col1=label1
col2=label2
col3=label3
col4=label4
and second row will be
col1=label5
col2=label6
col3=label7
col4=label8
Since I don't know how to separate rows in a single query execution I couldn't think of a good algorithm. I need your help guys :)
thanks in advance.
you can do itsimple but hopefully will give you an idea how to do it.
for (int i=1;i<=NumOfLabels;i++){
if (i%4==0)
{
insert into yourTable values( labels[i-4],labels[i-3],labels[i-2],labels[i-1]);
}
}
Related
i have a question: is there any way to show a single row of a table in two rows? The problem is that my table has too many fields and is too wide. So, I think that maybe you can split each row in the table to make it in a row. For example (my idea in Excel, just for example):
Complete table
...and my idea
I hope for your help!
You can:
add a Tablix with 4 columns and without header
add a Rectangle in every detail cell
add 4 TextBox for every Rectangle: use 2 TextBox as labels and two TextBox as values
increase Rectangle height in order to put spaces between every rows
Once you perform this operation for value 1 and 5, you can copy and paste Rectangle in the other 3 cells and simply change label and value.
I Have created a report in report viewer and I want to show two tablix on one page of report viewer.
For example if both tables have 10 rows to show then i want to show 5 rows of first table and 5 rows of second table on 1 page and rest of the rows show on next page like next 5 rows from first table and next 5 rows from second table.
How can I got this?
Please Help me. Thanks
You need to add some criteria to group by. For example, add pageNumber column to each of two datasets and then add group by this column to each table and set to page break by this value.
I want to delete column data from a particular column, not column , column number will be dynamic ..
suppose an excel has 10 columns , and if I give 3 as input then on button click it should delete column 3 data....same way input may be 1,2,3,4,5....
how to start with this, can any one please help me in this...
Friends, I've a datagridview with 5 columns and 10 fixed rows. That means I've 5 columns with different fieldnames like(Id,FirstName,Middle Name,LastName,Age) and 10 rows with different field name like(City,State,Pin,Country,STDCode,PhoneNo,Mobile,Email,OtherContacts,Status). Now I want to populate this datagridviw with data from database using dataset/datatable. Can you suggest me, how will I start populating the grid say from position (1,0) or any other cell? Please help me regarding this.
In this case you can not use a DataBinding but need to insert data in the datagridview, row-by-row.
this link has an example on both techniques.
I got a Column Series that looks like this:
As you can see i got lots of columns, that I need to group somehow. A group consists out of 1 shuttle and for each shuttle there are 5 nests. My preferred form of grouping would be a, the nest written underneath each column and the shuttle again underneath. Between groups there should be a vertical line or some space to separate them. If this isn't possible I would greatly appreciate any other suggestions.
create a datatable with a column for each nest( so total five columns) , add five column series to the chart , DependentValueBinding to each column name, set ItemsSource to datatable( same for each column series).
Let me know if you want the code.