This is a migrated thread and some comments may be shown as answers.

Radgrid View with Custom Add into Data source

3 Answers 84 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Victor
Top achievements
Rank 1
Victor asked on 15 Sep 2015, 07:19 AM

I have a problem for this scenario

 Some External hardware device for passing message to the grid

GridViewRowInfo rowinfo = radGridView1.Rows.AddNew();

rowinfo.Cells[0] = 12  // which is the id

rowinfo.Cells[1] = "Some Values"

 

someTableAdatper.Update(someDataSet)

 

Since ID is unique generate, is there way to get that ID+1 auto generate or I have to found out the # of row and + 1 to it?

 

 

 

 

 

 

 

 

 

3 Answers, 1 is accepted

Sort by
0
Accepted
Dimitar
Telerik team
answered on 17 Sep 2015, 09:39 AM
Hi Victor,

Thank you for contacting us.

This depends on how the data set is configured. For example, if the AutoIncrementStep and Unique are set in the column properties (see first attached image) the id will be auto-populated when the row is added (see the second image).

I hope this helps.

Regards,
Dimitar
Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
0
Victor
Top achievements
Rank 1
answered on 17 Sep 2015, 09:47 AM

Works like charm

 

An other one question come in mind, when i deploy my winform

 

 

the connectionstring change from  TestPC to localhost\SQLExpress

 

no grid data display,no error ->  that is pretty odd

 

 

 

0
Dimitar
Telerik team
answered on 18 Sep 2015, 11:09 AM
Hi Victor,

Thank you for writing back.

In this case, I would recommend you to debug the application on your client machine. This will allow you to determine if the issue is in the connection or there is something else that is causing it. In addition, you should check if there are empty try catch blocks in your code, maybe this is why there is no error message. 

I hope this will be useful.

Regards,
Dimitar
Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Tags
GridView
Asked by
Victor
Top achievements
Rank 1
Answers by
Dimitar
Telerik team
Victor
Top achievements
Rank 1
Share this question
or