Kiran Angara
2017-06-10T02:30:01Z
Hello Good Morning,

Recently brought 10Tec ActiveX Suite controls.

After create the grid with these column names (ProductID, ProductName, OrderQty, UnitPrice, UOM, Discount, LineTotal)
I would like to know

1. After select the Product ID in column 1 how to display Product Name in column 2.
2. How to update only certain columns to the database (ProductID, OrderQty, UnitPrice,Discount, LineTotal).

Could please explain.

Thank You.
Igor/10Tec
2017-06-10T12:49:58Z
You did not provide enough info to answer your questions. Can you show us how you populate iGrid?
Kiran Angara
2017-06-13T10:46:13Z
Hello Good Evening,

Thank you for your concern and support.

I followed example as mentioned in demo.

Set m_RS = CreateObject("ADODB.Recordset")
With m_RS
.ActiveConnection = m_Cnn
.CursorLocation = adUseClient
.CursorType = adOpenStatic
.LockType = adLockBatchOptimistic
.Open "SELECT SOD.ProductID, P.ProductName, SOD.OrderQty, SOD.UnitPrice, SOD.UOM, SOD.Discount, SOD.LineTotal FROM SalesOrderDetails AS SOD JOIN Product AS P ON SOD.ProductID = P.ProductID"
End With

Thank you.
Igor/10Tec
2017-06-13T14:04:11Z
Originally Posted by: Kiran Angara 

1. After select the Product ID in column 1 how to display Product Name in column 2.



If your query return proper values for the 2nd column (ProductName), you should see them in the grid too.

What do you mean by "select the Product ID"? Does it mean you can change Product ID by typing the required numeric ID, or by selecting it from a drop-down list, etc.?

Originally Posted by: Kiran Angara 

2. How to update only certain columns to the database (ProductID, OrderQty, UnitPrice,Discount, LineTotal).



iGrid is not a databound control, but you can implement any database update strategy using its events. We have a set of samples dedicated to this functionality in the main iGrid demo. See the Editing Databases sample section.

One of the possible solutions is to use the AfterCommitEdit event to update only the required fields in the database. That's why we asked for a complete sample to see how you populate your grid. Having it, we can understand your needs and suggest a solution. The update strategy depends on your database access technology, table relations and so on.

Feel free to ask us more if you have any troubles with implementing your solution.
Kiran Angara
2017-06-23T06:11:28Z
Hi,

First of all thank you for designing a feature rich grid control. With less code can implement cool features.

Coming back to my earlier post as i am driving through the grid features please give ample time to get better understanding.
But in the mean time I would like to know how to arrange the first column as S.No (serial number). What are the possible options available? Something similar like FixedCols.

Thank you.
Igor/10Tec
2017-06-23T06:18:44Z
If you need to freeze or fix the 1st column so it is always visible, use the FrozenCols property:

iGrid1.FrozenCols = 1
Kiran Angara
2017-07-12T07:19:33Z
Hi,

Good afternoon.

In the grid the first column set as a serial number.
When the user adding data in to the rows i am incrementing the serial number by rowcount but when i use the FillFromRS to fill grid rows how i can assign a number for each row.
Could you please give some idea.

Thank you.

15

Click to View Image

Igor/10Tec
2017-07-12T15:40:10Z
Is it a question related to post #1 in this thread? It seems, it should be a separate topic as it is another problem.

We do not see how you store serial numbers in the database. If you call FillFromRS, sure, it will repopulate iGrid and clear the cells in the Serial Number column if you did not save these values in the database before calling this method.
Kiran Angara
2017-08-14T08:17:38Z
Originally Posted by: Igor/10Tec 

Is it a question related to post #1 in this thread? It seems, it should be a separate topic as it is another problem.

We do not see how you store serial numbers in the database. If you call FillFromRS, sure, it will repopulate iGrid and clear the cells in the Serial Number column if you did not save these values in the database before calling this method.




I utilise this feature to full fill my requirement.

iGrid.StoreInitRowNumbers = igStoreInitRowNoIn1stCol

so please consider this post as completed.

Thank you.